-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Evaluate argument of (DYNAMIC_)SECTION, TEST_CASE in static-analysis mode #2817
Merged
horenmar
merged 7 commits into
catchorg:devel
from
mjerabek:fix-static-analysis-sections-warnings
Mar 1, 2024
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
a8587a0
Evaluate argument of (DYNAMIC_)SECTION in static-analysis mode
mjerabek 0909e39
Evaluate argument of TEST_CASE in static-analysis mode
mjerabek e4db7fd
add .clang-tidy config
mjerabek 827755b
ci: add clang-tidy run
mjerabek 0dcb134
Fix various useful clang-tidy warnings
mjerabek b49f5f0
less copies and allocations in replaceInPlace
mjerabek c700cae
releaseCommon: fix SyntaxWarning: invalid escape sequence '\s'
mjerabek File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
--- | ||
# Note: Alas, `Checks` is a string, not an array. | ||
# Comments in the block string are not parsed and are passed in the value. | ||
# They must thus be delimited by ',' from either side - then they are | ||
# harmless. It's terrible, but it works. | ||
Checks: >- | ||
clang-diagnostic-*, | ||
clang-analyzer-*, | ||
-clang-analyzer-optin.core.EnumCastOutOfRange, | ||
|
||
bugprone-*, | ||
-bugprone-unchecked-optional-access, | ||
,# This is ridiculous, as it triggers on constants, | ||
-bugprone-implicit-widening-of-multiplication-result, | ||
-bugprone-easily-swappable-parameters, | ||
,# Is not really useful, has false positives, triggers for no-noexcept move constructors ..., | ||
-bugprone-exception-escape, | ||
-bugprone-narrowing-conversions, | ||
-bugprone-chained-comparison,# RIP decomposers, | ||
|
||
modernize-*, | ||
-modernize-avoid-c-arrays, | ||
-modernize-use-auto, | ||
-modernize-use-emplace, | ||
-modernize-use-nullptr,# it went crazy with three-way comparison operators, | ||
-modernize-use-trailing-return-type, | ||
-modernize-return-braced-init-list, | ||
-modernize-concat-nested-namespaces, | ||
-modernize-use-nodiscard, | ||
-modernize-use-default-member-init, | ||
-modernize-type-traits,# we need to support C++14, | ||
-modernize-deprecated-headers, | ||
,# There's a lot of these and most of them are probably not useful, | ||
-modernize-pass-by-value, | ||
|
||
performance-*, | ||
-performance-enum-size, | ||
|
||
portability-*, | ||
|
||
readability-*, | ||
-readability-braces-around-statements, | ||
-readability-container-size-empty, | ||
-readability-convert-member-functions-to-static, | ||
-readability-else-after-return, | ||
-readability-function-cognitive-complexity, | ||
-readability-function-size, | ||
-readability-identifier-length, | ||
-readability-implicit-bool-conversion, | ||
-readability-isolate-declaration, | ||
-readability-magic-numbers, | ||
-readability-named-parameter, | ||
-readability-qualified-auto, | ||
-readability-redundant-access-specifiers, | ||
-readability-simplify-boolean-expr, | ||
-readability-static-definition-in-anonymous-namespace, | ||
-readability-uppercase-literal-suffix, | ||
-readability-use-anyofallof, | ||
-readability-avoid-return-with-void-value, | ||
|
||
,# time hogs, | ||
-bugprone-throw-keyword-missing, | ||
-modernize-replace-auto-ptr, | ||
-readability-identifier-naming, | ||
|
||
,# We cannot use this until clang-tidy supports custom unique_ptr, | ||
-bugprone-use-after-move, | ||
,# Doesn't recognize unevaluated context in CATCH_MOVE and CATCH_FORWARD, | ||
-bugprone-macro-repeated-side-effects, | ||
WarningsAsErrors: >- | ||
clang-analyzer-core.*, | ||
clang-analyzer-cplusplus.*, | ||
clang-analyzer-security.*, | ||
clang-analyzer-unix.*, | ||
performance-move-const-arg, | ||
performance-unnecessary-value-param, | ||
readability-duplicate-include, | ||
HeaderFilterRegex: '.*\.(c|cxx|cpp)$' | ||
FormatStyle: none | ||
CheckOptions: {} | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's supposed to be duplicated here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
else
branch waaay down.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ugh, that's dumb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very 😄