This commit was merged in pull request #395.
This commit is contained in:
1 parent
aee2f5b9eb
commit
a3cfaf422f
2 files changed
+10
-1
No files matched your search
@@ -171,9 +171,11 @@ rules:
|
||||
- pattern: std::fprintf($F, $FMT, ...)
|
||||
- pattern: std::sprintf($B, $FMT, ...)
|
||||
- pattern: std::snprintf($B, $N, $FMT, ...)
|
||||
# Not a literal, and not an upper-case macro (`#define GET_REQUEST
|
||||
# "GET / HTTP/1.1"`): a macro like that expands to a literal.
|
||||
- metavariable-regex:
|
||||
metavariable: $FMT
|
||||
regex: ^[^"]
|
||||
regex: ^(?![A-Z][A-Z0-9_]*$)[^"]
|
||||
|
||||
- id: cra-ai-8-c-hardcoded-credential
|
||||
languages: [c, cpp]
|
||||
|
||||
@@ -20,3 +20,10 @@ void status(const char* state) {
|
||||
}
|
||||
|
||||
} // namespace cli
|
||||
|
||||
// A format macro expands to a literal: not a finding (#380).
|
||||
#define STATUS_FMT "state: %s\n"
|
||||
|
||||
void status_line(const char* state) {
|
||||
std::printf(STATUS_FMT, state);
|
||||
}
|
||||
Reference in new issue
Block a user