Add .clang-tidy and .clang-format configurations

This commit is contained in:
2023-05-16 09:49:47 +02:00
parent a9759f51fa
commit 093ee73d54
3 changed files with 19 additions and 13 deletions

12
.clang-format Normal file
View File

@@ -0,0 +1,12 @@
---
AccessModifierOffset: '-4'
AllowShortFunctionsOnASingleLine: InlineOnly
AllowShortIfStatementsOnASingleLine: Never
BinPackArguments: 'false'
BinPackParameters: 'false'
BreakBeforeBraces: Allman
ColumnLimit: '100'
ConstructorInitializerAllOnOneLineOrOnePerLine: 'true'
IndentWidth: '4'
...

7
.clang-tidy Normal file
View File

@@ -0,0 +1,7 @@
---
Checks: 'clang-diagnostic-*,clang-analyzer-*,modernize-*,bugprone-*,concurrency-*,cppcoreguidelines-*,performance-*,portability-*,readability-*,-modernize-use-trailing-return-type,-readability-braces-around-statements,-readability-identifier-length'
WarningsAsErrors: ''
HeaderFilterRegex: ''
AnalyzeTemporaryDtors: false
FormatStyle: file
...

View File

@@ -1,13 +0,0 @@
---
BasedOnStyle: LLVM
AccessModifierOffset: '-4'
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: 'false'
AlwaysBreakTemplateDeclarations: 'true'
BreakBeforeBraces: Allman
ColumnLimit: '120'
IndentWidth: '4'
PointerAlignment: Right
...