diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2024-11-05 17:21:44 +0100 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2024-11-14 14:23:05 +0100 |
commit | faba5b7d385311f08d421ee99511912b55f7582f (patch) | |
tree | 9eeab1f36862218cbda28c0733e8c00bd38da5c6 /.clang-format | |
parent | aa89a9959b041538d8039f02aa34b65c7355b461 (diff) | |
download | justbuild-faba5b7d385311f08d421ee99511912b55f7582f.tar.gz |
clang-format: Update config file
The base style already handles correctly the system includes, so
one needs to only add regex expressions to handle third-party and
own includes.
This fixes also the include formatting of git_config_run.test.cpp.
Diffstat (limited to '.clang-format')
-rw-r--r-- | .clang-format | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/.clang-format b/.clang-format index a1d49bf1..e5d1971f 100644 --- a/.clang-format +++ b/.clang-format @@ -19,14 +19,13 @@ 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 + # The base style already correctly handles system includes + # C-style third-party includes - Regex: '^<.*\.(h|hpp)>' - Priority: 3 + Priority: 10 + # General external and project includes - Regex: '^".*"' - Priority: 4 + Priority: 20 IndentWidth: 4 KeepEmptyLinesAtTheStartOfBlocks: true PenaltyBreakString: 100 |