Skip to content

Commit 160ac0c

Browse files
author
Nicolas Kraiouchkine
committed
Modify alert messages to conform to style guide
1 parent b7e0afb commit 160ac0c

4 files changed

+9
-8
lines changed

cpp/autosar/src/rules/A8-4-7/InParametersForCheapToCopyTypesNotPassedByValue.ql

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,6 @@ where
4040
not v.isFromUninstantiatedTemplate(_) and
4141
not v.isFromTemplateInstantiation(_)
4242
select v,
43-
"Parameter '" + v.getName() + "' is the trivially copyable type '" + t.getName() +
44-
"' but it is passed by reference instead of by value."
43+
"Parameter '" + v.getName() +
44+
"' is the trivially copyable type $@ but it is passed by reference instead of by value.", t,
45+
t.getName()

cpp/autosar/src/rules/A8-4-7/InParametersForNotCheapToCopyTypesNotPassedByReference.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ where
3434
not v.isFromUninstantiatedTemplate(_) and
3535
not v.isFromTemplateInstantiation(_)
3636
select v,
37-
"Parameter " + v.getName() +
38-
" is the trivially non-copyable type $@ but it is passed by value instead of by reference.",
37+
"Parameter '" + v.getName() +
38+
"' is the trivially non-copyable type $@ but it is passed by value instead of by reference.",
3939
v.getType(), v.getType().getName()
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
| test.cpp:22:19:22:21 | f5a | Parameter 'f5a' is the trivially copyable type 'const S1' but it is passed by reference instead of by value. |
1+
| test.cpp:22:19:22:21 | f5a | Parameter 'f5a' is the trivially copyable type $@ but it is passed by reference instead of by value. | file://:0:0:0:0 | const S1 | const S1 |
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
| test.cpp:25:12:25:14 | f8a | Parameter f8a is the trivially non-copyable type $@ but it is passed by value instead of by reference. | test.cpp:16:8:16:9 | S2 | S2 |
2-
| test.cpp:29:13:29:16 | f12a | Parameter f12a is the trivially non-copyable type $@ but it is passed by value instead of by reference. | test.cpp:16:8:16:9 | S2 | S2 |
3-
| test.cpp:70:13:70:16 | f17a | Parameter f17a is the trivially non-copyable type $@ but it is passed by value instead of by reference. | test.cpp:60:8:60:9 | S4 | S4 |
1+
| test.cpp:25:12:25:14 | f8a | Parameter 'f8a' is the trivially non-copyable type $@ but it is passed by value instead of by reference. | test.cpp:16:8:16:9 | S2 | S2 |
2+
| test.cpp:29:13:29:16 | f12a | Parameter 'f12a' is the trivially non-copyable type $@ but it is passed by value instead of by reference. | test.cpp:16:8:16:9 | S2 | S2 |
3+
| test.cpp:70:13:70:16 | f17a | Parameter 'f17a' is the trivially non-copyable type $@ but it is passed by value instead of by reference. | test.cpp:60:8:60:9 | S4 | S4 |

0 commit comments

Comments
 (0)