disabled all clang-tidy checks for Qt generated files (#4525)
* disabled cll clang-tidy checks for Qt generated files * enabled `bugprone-suspicious-include` clang-tidy warning
This commit is contained in:
parent
88be6ec596
commit
858585ceb1
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
Checks: '*,-abseil-*,-altera-*,-android-*,-boost-*,-cert-*,-cppcoreguidelines-*,-darwin-*,-fuchsia-*,-google-*,-hicpp-*,-linuxkernel-*,-llvm-*,-llvmlibc-*,-mpi-*,-objc-*,-openmp-*,-zircon-*,google-explicit-constructor,-readability-braces-around-statements,-readability-magic-numbers,-bugprone-macro-parentheses,-readability-isolate-declaration,-readability-function-size,-modernize-use-trailing-return-type,-readability-implicit-bool-conversion,-readability-uppercase-literal-suffix,-modernize-use-auto,-readability-else-after-return,-modernize-use-default-member-init,-readability-redundant-member-init,-performance-faster-string-find,-modernize-avoid-c-arrays,-modernize-use-equals-default,-readability-container-size-empty,-readability-simplify-boolean-expr,-bugprone-branch-clone,-bugprone-narrowing-conversions,-modernize-raw-string-literal,-readability-convert-member-functions-to-static,-modernize-loop-convert,-readability-const-return-type,-modernize-return-braced-init-list,-performance-inefficient-string-concatenation,-misc-throw-by-value-catch-by-reference,-readability-avoid-const-params-in-decls,-misc-non-private-member-variables-in-classes,-clang-analyzer-*,-bugprone-signed-char-misuse,-misc-no-recursion,-readability-use-anyofallof,-performance-no-automatic-move,-bugprone-suspicious-include,-readability-function-cognitive-complexity,-readability-redundant-access-specifiers,-performance-noexcept-move-constructor,-concurrency-mt-unsafe,-bugprone-easily-swappable-parameters,-readability-suspicious-call-argument,-readability-identifier-length,-readability-container-data-pointer,-bugprone-assignment-in-if-condition,-misc-const-correctness,-portability-std-allocator-const,-modernize-deprecated-ios-base-aliases,-bugprone-unchecked-optional-access,-modernize-replace-auto-ptr,-readability-identifier-naming,-portability-simd-intrinsics'
|
||||
Checks: '*,-abseil-*,-altera-*,-android-*,-boost-*,-cert-*,-cppcoreguidelines-*,-darwin-*,-fuchsia-*,-google-*,-hicpp-*,-linuxkernel-*,-llvm-*,-llvmlibc-*,-mpi-*,-objc-*,-openmp-*,-zircon-*,google-explicit-constructor,-readability-braces-around-statements,-readability-magic-numbers,-bugprone-macro-parentheses,-readability-isolate-declaration,-readability-function-size,-modernize-use-trailing-return-type,-readability-implicit-bool-conversion,-readability-uppercase-literal-suffix,-modernize-use-auto,-readability-else-after-return,-modernize-use-default-member-init,-readability-redundant-member-init,-performance-faster-string-find,-modernize-avoid-c-arrays,-modernize-use-equals-default,-readability-container-size-empty,-readability-simplify-boolean-expr,-bugprone-branch-clone,-bugprone-narrowing-conversions,-modernize-raw-string-literal,-readability-convert-member-functions-to-static,-modernize-loop-convert,-readability-const-return-type,-modernize-return-braced-init-list,-performance-inefficient-string-concatenation,-misc-throw-by-value-catch-by-reference,-readability-avoid-const-params-in-decls,-misc-non-private-member-variables-in-classes,-clang-analyzer-*,-bugprone-signed-char-misuse,-misc-no-recursion,-readability-use-anyofallof,-performance-no-automatic-move,-readability-function-cognitive-complexity,-readability-redundant-access-specifiers,-performance-noexcept-move-constructor,-concurrency-mt-unsafe,-bugprone-easily-swappable-parameters,-readability-suspicious-call-argument,-readability-identifier-length,-readability-container-data-pointer,-bugprone-assignment-in-if-condition,-misc-const-correctness,-portability-std-allocator-const,-modernize-deprecated-ios-base-aliases,-bugprone-unchecked-optional-access,-modernize-replace-auto-ptr,-readability-identifier-naming,-portability-simd-intrinsics'
|
||||
WarningsAsErrors: '*'
|
||||
CheckOptions:
|
||||
- key: misc-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic
|
||||
|
|
|
@ -117,10 +117,6 @@ Produces a lot of false positives since it is too vague in its analysis.
|
|||
|
||||
Produces many warnings which very much look like false positives (needs to be reported upstream).
|
||||
|
||||
`bugprone-suspicious-include`<br>
|
||||
|
||||
Causes warnings with `*.cpp` includes in Qt generated files.
|
||||
|
||||
`modernize-avoid-c-arrays`<br>
|
||||
`readability-container-size-empty`<br>
|
||||
`bugprone-branch-clone`<br>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
---
|
||||
Checks: '-*,misc-definitions-in-headers'
|
||||
WarningsAsErrors: '*'
|
||||
CheckOptions:
|
||||
- { key: HeaderFileExtensions, value: "x" }
|
||||
|
|
|
@ -1,5 +1,14 @@
|
|||
if (BUILD_GUI)
|
||||
|
||||
# disable all clang-tidy checks for Qt generated files
|
||||
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/.clang-tidy"
|
||||
"---
|
||||
Checks: '-*,misc-definitions-in-headers'
|
||||
WarningsAsErrors: '*'
|
||||
CheckOptions:
|
||||
- { key: HeaderFileExtensions, value: 'x' }
|
||||
")
|
||||
|
||||
if (CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||
add_definitions(-DQT_NO_DEBUG)
|
||||
add_definitions(-DQT_NO_DEBUG_OUTPUT)
|
||||
|
|
|
@ -1,4 +1,13 @@
|
|||
if (BUILD_GUI AND BUILD_TESTS)
|
||||
# disable all clang-tidy checks for Qt generated files
|
||||
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/.clang-tidy"
|
||||
"---
|
||||
Checks: '-*,misc-definitions-in-headers'
|
||||
WarningsAsErrors: '*'
|
||||
CheckOptions:
|
||||
- { key: HeaderFileExtensions, value: 'x' }
|
||||
")
|
||||
|
||||
if (CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||
add_definitions(-DQT_NO_DEBUG)
|
||||
add_definitions(-DQT_NO_DEBUG_OUTPUT)
|
||||
|
|
Loading…
Reference in New Issue