summaryrefslogtreecommitdiff
path: root/.clang-format
diff options
context:
space:
mode:
authorKlaus Aehlig <klaus.aehlig@huawei.com>2022-11-07 15:32:22 +0100
committerKlaus Aehlig <klaus.aehlig@huawei.com>2022-11-07 17:55:53 +0100
commit67875bfa8377c85f44f35111582b7522414b86fc (patch)
treed3dccf42dda8ee39ec54be8a815bb1cacf4d4e08 /.clang-format
parent4b91c4314090e02f7bc9ea44bed2e5a49010b305 (diff)
downloadjustbuild-67875bfa8377c85f44f35111582b7522414b86fc.tar.gz
Add configuration for clang-format and clang-tidy
Diffstat (limited to '.clang-format')
-rw-r--r--.clang-format32
1 files changed, 32 insertions, 0 deletions
diff --git a/.clang-format b/.clang-format
new file mode 100644
index 00000000..c2571773
--- /dev/null
+++ b/.clang-format
@@ -0,0 +1,32 @@
+---
+Language: Cpp
+BasedOnStyle: Google
+AccessModifierOffset: -2
+AllowAllParametersOfDeclarationOnNextLine: false
+AllowShortFunctionsOnASingleLine: Inline
+AllowShortIfStatementsOnASingleLine: false
+AllowShortLoopsOnASingleLine: false
+BinPackArguments: false
+BinPackParameters: false
+BraceWrapping:
+ BeforeElse: true
+ IndentBraces: false
+ SplitEmptyFunction: true
+ SplitEmptyNamespace: true
+ SplitEmptyRecord: true
+BreakBeforeBraces: Custom
+ColumnLimit: 80
+DerivePointerAlignment: false
+IncludeCategories:
+ - Regex: '^(<|")(assert|complex|ctype|errno|fenv|float|inttypes|iso646|limits|locale|math|setjmp|signal|stdalign|stdargh|stdatomic|stdbool|stddef|stdint|stdio|stdlib|stdnoreturn|string|tgmath|threads|time|uchar|wchar|wctype)\.h'
+ Priority: 1
+ - Regex: '^(<|")(cstdlib|csignal|csetjmp|cstdarg|typeinfo|typeindex|type_traits|bitset|functional|utility|ctime|chrono|cstddef|initializer_list|tuple|any|optional|variant|new|memory|scoped_allocator|memory_resource|climits|cfloat|cstdint|cinttypes|limits|exception|stdexcept|cassert|system_error|cerrno|cctype|cwctype|cstring|cwchar|cuchar|string|string_view|array|vector|deque|list|forward_list|set|map|unordered_set|unordered_map|stack|queue|algorithm|execution|teratorslibrary|iterator|cmath|complex|valarray|random|numeric|ratio|cfenv|iosfwd|ios|istream|ostream|iostream|fstream|sstream|strstream|iomanip|streambuf|cstdio|locale|clocale|codecvt|regex|atomic|thread|mutex|shared_mutex|future|condition_variable|filesystem|ciso646|ccomplex|ctgmath|cstdalign|cstdbool)(>|")$'
+ Priority: 2
+ - Regex: '^<.*\.(h|hpp)>'
+ Priority: 3
+ - Regex: '^".*"'
+ Priority: 4
+IndentWidth: 4
+KeepEmptyLinesAtTheStartOfBlocks: true
+PenaltyBreakString: 100
+...