Skip to content

Commit

Permalink
chore: clean up clang-tidy (acts-project#3145)
Browse files Browse the repository at this point in the history
- Sort alphabetically
- Add missing values to `.clang-tidy`
- Reformat for readability and to keep track of changes

In a dream world, we have just a single place, where we can manage the checks.
  • Loading branch information
AJPfleger authored and asalzburger committed May 21, 2024
1 parent 5351471 commit e4bc565
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 29 deletions.
21 changes: 20 additions & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
---
Checks: '-*,readability-container-size-empty,readability-implicit-bool-cast,readability-implicit-bool-conversion,modernize-concat-nested-namespaces,modernize-use-equals-default,modernize-use-override,modernize-use-using,readability-braces-around-statements,modernize-use-nullptr,performance-move-const-arg,cppcoreguidelines-pro-type-member-init,cppcoreguidelines-init-variables,clang-analyzer-optin.cplusplus.UninitializedObject,readability-operators-representation'
Checks: '-*, \
clang-analyzer-optin.cplusplus.UninitializedObject, \
cppcoreguidelines-init-variables, \
cppcoreguidelines-pro-type-member-init, \
modernize-concat-nested-namespaces, \
modernize-use-equals-default, \
modernize-use-default-member-init, \
modernize-use-nullptr, \
modernize-use-override, \
modernize-use-using, \
performance-for-range-copy, \
performance-move-const-arg, \
performance-unnecessary-value-param, \
readability-braces-around-statements, \
readability-container-size-empty, \
readability-implicit-bool-cast, \
readability-implicit-bool-conversion, \
readability-inconsistent-declaration-parameter-name, \
readability-named-parameter, \
readability-operators-representation'
HeaderFilterRegex: '.*(?<!nlohmann\/json)\.(hpp|cpp|ipp)$'
AnalyzeTemporaryDtors: true
CheckOptions:
Expand Down
30 changes: 15 additions & 15 deletions CI/clang_tidy/limits.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
limits:
"readability-inconsistent-declaration-parameter-name": 0
"readability-named-parameter": 0
"readability-container-size-empty": 0
"readability-braces-around-statements": 0
"readability-implicit-bool-cast": 0
"readability-implicit-bool-conversion": 0
"clang-analyzer-optin.cplusplus.UninitializedObject": 0
"clang-diagnostic-error": 0
"cppcoreguidelines-init-variables": 0
"cppcoreguidelines-pro-type-member-init": 0
"modernize-concat-nested-namespaces": 0
"modernize-use-using": 0
"modernize-use-override": 0
"modernize-use-equals-default" : 0
"modernize-use-equals-default": 0
"modernize-use-default-member-init": 0
"modernize-use-nullptr": 0
"performance-unnecessary-value-param": 0
"performance-move-const-arg": 0
"modernize-use-override": 0
"modernize-use-using": 0
"performance-for-range-copy": 0
"cppcoreguidelines-pro-type-member-init": 0
"cppcoreguidelines-init-variables": 0
"clang-analyzer-optin.cplusplus.UninitializedObject": 0
"clang-diagnostic-error": 0
"performance-move-const-arg": 0
"performance-unnecessary-value-param": 0
"readability-braces-around-statements": 0
"readability-container-size-empty": 0
"readability-implicit-bool-cast": 0
"readability-implicit-bool-conversion": 0
"readability-inconsistent-declaration-parameter-name": 0
"readability-named-parameter": 0
"readability-operators-representation": 0
26 changes: 13 additions & 13 deletions cmake/ActsStaticAnalysis.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,24 @@ if(ACTS_RUN_CLANG_TIDY)

set(_chks "")
list(APPEND _chks "-*")
list(APPEND _chks "readability-inconsistent-declaration-parameter-name")
list(APPEND _chks "readability-named-parameter")
list(APPEND _chks "readability-container-size-empty")
list(APPEND _chks "readability-braces-around-statements")
list(APPEND _chks "readability-implicit-bool-cast")
list(APPEND _chks "readability-implicit-bool-conversion")
list(APPEND _chks "clang-analyzer-optin.cplusplus.UninitializedObject")
list(APPEND _chks "cppcoreguidelines-init-variables")
list(APPEND _chks "cppcoreguidelines-pro-type-member-init")
list(APPEND _chks "modernize-concat-nested-namespaces")
list(APPEND _chks "modernize-use-using")
list(APPEND _chks "modernize-use-override")
list(APPEND _chks "modernize-use-equals-default")
list(APPEND _chks "modernize-use-default-member-init")
list(APPEND _chks "modernize-use-nullptr")
list(APPEND _chks "performance-unnecessary-value-param")
list(APPEND _chks "performance-move-const-arg")
list(APPEND _chks "modernize-use-override")
list(APPEND _chks "modernize-use-using")
list(APPEND _chks "performance-for-range-copy")
list(APPEND _chks "cppcoreguidelines-pro-type-member-init")
list(APPEND _chks "cppcoreguidelines-init-variables")
list(APPEND _chks "clang-analyzer-optin.cplusplus.UninitializedObject")
list(APPEND _chks "performance-move-const-arg")
list(APPEND _chks "performance-unnecessary-value-param")
list(APPEND _chks "readability-braces-around-statements")
list(APPEND _chks "readability-container-size-empty")
list(APPEND _chks "readability-implicit-bool-cast")
list(APPEND _chks "readability-implicit-bool-conversion")
list(APPEND _chks "readability-inconsistent-declaration-parameter-name")
list(APPEND _chks "readability-named-parameter")
list(APPEND _chks "readability-operators-representation")
list(JOIN _chks "," CLANG_TIDY_CHECKS)

Expand Down

0 comments on commit e4bc565

Please sign in to comment.