Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 333cc77

Browse filesBrowse files
Code format
1 parent d23c035 commit 333cc77
Copy full SHA for 333cc77

File tree

3 files changed

+8
-11
lines changed
Filter options

3 files changed

+8
-11
lines changed

‎cpp/common/src/codingstandards/cpp/alertreporting/DeduplicateMacroResults.qll

Copy file name to clipboardExpand all lines: cpp/common/src/codingstandards/cpp/alertreporting/DeduplicateMacroResults.qll
+4-6Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ signature module MacroReportConfigSig<ResultType ResultElement> {
110110
* string getMessageResultInIsolatedExpansion(InvalidFoo foo) {
111111
* result = "Invocation of macro $@ has invalid foo '" + foo.getName() + "'."
112112
* }
113-
*
113+
*
114114
* string getMessageNotInMacro(ResultElement element) {
115115
* result = "Invalid foo '" + element.getName() + "'."
116116
* }
@@ -286,9 +286,7 @@ module DeduplicateMacroResults<
286286
TReportMacroResultWithVariedName(PrimaryMacroDifferentResultElementInAllInvocations def) or
287287
TReportIsolatedMacroResult(IsolatedMacroExpansionWithResultElement def) or
288288
TReportNotInMacro(ResultElement def) {
289-
not exists (ResultMacroExpansion macroExpansion |
290-
macroExpansion.getResultElement() = def
291-
)
289+
not exists(ResultMacroExpansion macroExpansion | macroExpansion.getResultElement() = def)
292290
}
293291

294292
/**
@@ -368,8 +366,8 @@ module DeduplicateMacroResults<
368366
)
369367
or
370368
(
371-
this = TReportMacroResultWithSameName(_)
372-
or this = TReportNotInMacro(_)
369+
this = TReportMacroResultWithSameName(_) or
370+
this = TReportNotInMacro(_)
373371
) and
374372
result = "(ignored)"
375373
or

‎cpp/common/src/codingstandards/cpp/deadcode/UnusedObjects.qll

Copy file name to clipboardExpand all lines: cpp/common/src/codingstandards/cpp/deadcode/UnusedObjects.qll
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ module ReportDeadObjectConfig implements MacroReportConfigSig<UnusedObjectDefini
4848
}
4949

5050
string getMessageVariedResultInAllExpansions(Macro m) {
51-
result = "Macro '" + m.getName() + "' defines unused object with an invocation-dependent name, for example, '$@'."
51+
result =
52+
"Macro '" + m.getName() +
53+
"' defines unused object with an invocation-dependent name, for example, '$@'."
5254
}
5355

5456
string getMessageResultInIsolatedExpansion(UnusedObjectDefinition unused) {

‎cpp/common/test/library/codingstandards/cpp/alertreporting/DeduplicateMacroResults.ql

Copy file name to clipboardExpand all lines: cpp/common/test/library/codingstandards/cpp/alertreporting/DeduplicateMacroResults.ql
+1-4Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,7 @@ module FindMeReportConfig implements MacroReportConfigSig<FindMe> {
2323
result = "Invocation of macro $@ has findme var '" + f.getName() + "'."
2424
}
2525

26-
string getMessageNotInMacro(FindMe f) {
27-
result = "Findme var '" + f.getName() + "'."
28-
29-
}
26+
string getMessageNotInMacro(FindMe f) { result = "Findme var '" + f.getName() + "'." }
3027
}
3128

3229
import DeduplicateMacroResults<FindMe, FindMeDedupeConfig>

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.