[build] Make the code tidy!

Now the bot will fail when clang-tidy fails. All warnings are fatal.
This commit is contained in:
Thiago Marcos P. Santos
2020-03-27 17:34:00 +02:00
parent 1c5e0ee31e
commit fc29ddc6c2
2 changed files with 31 additions and 4 deletions

View File

@@ -1,4 +1,31 @@
Checks: '-*,bugprone-*,clang-analyzer-*,google-*,modernize-*,performance-*,-clang-analyzer-osx.*,-google-readability-braces-around-statements,-google-readability-todo,-google-runtime-int,-google-runtime-references,-modernize-avoid-c-arrays'
WarningsAsErrors: 'bugprone-use-after-move,modernize-*,performance-*'
Checks: >
-*,
bugprone-*,
clang-diagnostic-*,
google-*,
misc-*,
modernize-*,
performance-*,
portability-*,
readability-*,
-bugprone-narrowing-conversions,
-google-build-using-namespace,
-google-readability-braces-around-statements,
-google-readability-todo,
-google-runtime-int,
-google-runtime-references,
-modernize-avoid-c-arrays,
-readability-braces-around-statements,
-readability-else-after-return,
-readability-implicit-bool-conversion,
-readability-magic-numbers,
-readability-named-parameter,
-readability-uppercase-literal-suffix
WarningsAsErrors: '*'
HeaderFilterRegex: '.*'
FormatStyle: file
CheckOptions:
- key: misc-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic
value: '1'

View File

@@ -684,8 +684,8 @@ jobs:
- run:
name: Clang Tidy
command: |
run-clang-tidy-8 -quiet -j $(nproc) -p build $PWD/src/.*cpp $PWD/platform/.*cpp |tee clang-tidy.log
grep -o \\[[a-z].*-.*[a-z]\] clang-tidy.log |sort |uniq -c |sort -n
# FIXME: Run on the headers, add -header-filter='.*'
run-clang-tidy-8 -quiet -j $(nproc) -p build $PWD/src/.*cpp $PWD/platform/.*cpp
- save
baselines:
executor: ubuntu-disco