From 1e43ce75ffbe1a107b2d8a1b2957747029446f7d Mon Sep 17 00:00:00 2001 From: Olof Johansson Date: Wed, 10 Apr 2019 17:41:37 -0700 Subject: [PATCH] top: add .clang-format Add a clang-format to automate consistent code formatting. Automating coding style reformatting removes a lot of manual checkpatch-type fixups, and can easily be implemented as a linter in code review environments. Signed-off-by: Olof Johansson --- .clang-format | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .clang-format diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..c80c0aa --- /dev/null +++ b/.clang-format @@ -0,0 +1,16 @@ +AlignConsecutiveAssignments: true +AlignEscapedNewlines: Left +AlignTrailingComments: true +AllowShortFunctionsOnASingleLine: None +BraceWrapping: + AfterFunction: true +BreakBeforeBraces: Custom +BreakStringLiterals: false +ContinuationIndentWidth: 8 +Cpp11BracedListStyle: false +IndentWidth: 8 +ReflowComments: false +SortIncludes: false +SpacesInContainerLiterals: false +TabWidth: 8 +UseTab: Always