Skip to content

Commit 96a6358

Browse files
committed
Adjust alert to follow styleguide
1 parent ede9e1b commit 96a6358

File tree

6 files changed

+17
-17
lines changed

6 files changed

+17
-17
lines changed

cpp/autosar/src/rules/M0-1-3/UnusedGlobalOrNamespaceVariable.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ where
2525
not exists(v.getAnAccess()) and
2626
// Exclude members whose value is compile time and is potentially used to inintialize a template
2727
not maybeACompileTimeTemplateArgument(v)
28-
select v, "Variable " + v.getQualifiedName() + " is unused."
28+
select v, "Variable '" + v.getQualifiedName() + "' is unused."

cpp/autosar/src/rules/M0-1-3/UnusedLocalVariable.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,4 @@ where
5050
// Local variable is never accessed
5151
not exists(v.getAnAccess()) and
5252
getUseCountConservatively(v) = 0
53-
select v, "Local variable " + v.getName() + " in " + v.getFunction().getName() + " is not used."
53+
select v, "Local variable '" + v.getName() + "' in '" + v.getFunction().getName() + "' is not used."

cpp/autosar/src/rules/M0-1-3/UnusedMemberVariable.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ where
2828
not exists(UserProvidedConstructorFieldInit cfi | cfi.getTarget() = v) and
2929
// Exclude members whose value is compile time and is potentially used to inintialize a template
3030
not maybeACompileTimeTemplateArgument(v)
31-
select v, "Member variable " + v.getName() + " is unused."
31+
select v, "Member variable '" + v.getName() + "' is unused."
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
| test_global_or_namespace.cpp:3:5:3:6 | g3 | Variable g3 is unused. |
2-
| test_global_or_namespace.cpp:18:4:18:4 | a | Variable a is unused. |
3-
| test_global_or_namespace.cpp:26:5:26:6 | x3 | Variable N1::x3 is unused. |
4-
| test_global_or_namespace.cpp:36:5:36:5 | a | Variable N1::a is unused. |
1+
| test_global_or_namespace.cpp:3:5:3:6 | g3 | Variable 'g3' is unused. |
2+
| test_global_or_namespace.cpp:18:4:18:4 | a | Variable 'a' is unused. |
3+
| test_global_or_namespace.cpp:26:5:26:6 | x3 | Variable 'N1::x3' is unused. |
4+
| test_global_or_namespace.cpp:36:5:36:5 | a | Variable 'N1::a' is unused. |
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
| test.cpp:7:7:7:7 | y | Local variable y in test_simple is not used. |
2-
| test.cpp:14:13:14:13 | y | Local variable y in test_const is not used. |
3-
| test.cpp:17:7:17:7 | z | Local variable z in test_const is not used. |
4-
| test.cpp:23:5:23:5 | t | Local variable t in f1 is not used. |
5-
| test.cpp:23:5:23:5 | t | Local variable t in f1 is not used. |
6-
| test.cpp:44:6:44:6 | a | Local variable a in test_side_effect_init is not used. |
1+
| test.cpp:7:7:7:7 | y | Local variable 'y' in 'test_simple' is not used. |
2+
| test.cpp:14:13:14:13 | y | Local variable 'y' in 'test_const' is not used. |
3+
| test.cpp:17:7:17:7 | z | Local variable 'z' in 'test_const' is not used. |
4+
| test.cpp:23:5:23:5 | t | Local variable 't' in 'f1' is not used. |
5+
| test.cpp:23:5:23:5 | t | Local variable 't' in 'f1' is not used. |
6+
| test.cpp:44:6:44:6 | a | Local variable 'a' in 'test_side_effect_init' is not used. |
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
| test_member.cpp:4:7:4:8 | m1 | Member variable m1 is unused. |
2-
| test_member.cpp:17:9:17:11 | pad | Member variable pad is unused. |
3-
| test_member.cpp:19:9:19:11 | sm2 | Member variable sm2 is unused. |
4-
| test_member.cpp:31:7:31:8 | m1 | Member variable m1 is unused. |
1+
| test_member.cpp:4:7:4:8 | m1 | Member variable 'm1' is unused. |
2+
| test_member.cpp:17:9:17:11 | pad | Member variable 'pad' is unused. |
3+
| test_member.cpp:19:9:19:11 | sm2 | Member variable 'sm2' is unused. |
4+
| test_member.cpp:31:7:31:8 | m1 | Member variable 'm1' is unused. |

0 commit comments

Comments
 (0)