diff options
-rw-r--r-- | .clang-format | 32 | ||||
-rw-r--r-- | .clang-tidy | 8 |
2 files changed, 40 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 +... diff --git a/.clang-tidy b/.clang-tidy new file mode 100644 index 00000000..7f632b63 --- /dev/null +++ b/.clang-tidy @@ -0,0 +1,8 @@ +FormatStyle: Google +Checks: '*,-abseil-*,-altera-*,-android-*,-boost-*,-cert-*,-darwin-*,-fuchsia-*,-linuxkernel-*,-llvm-*,-llvmlibc-*,-mpi-*,-objc-*,-zircon-*' +CheckOptions: [ + { + key: misc-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic, + value: '1' + } +]
\ No newline at end of file |