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 b31377d

Browse filesBrowse files
authored
Merge pull request #560 from knewbury01/knewbury01/fix-97
A3-3-1: missing testcases
2 parents 2786f4b + 455f39c commit b31377d
Copy full SHA for b31377d

File tree

Expand file treeCollapse file tree

4 files changed

+14
-8
lines changed
Filter options
Expand file treeCollapse file tree

4 files changed

+14
-8
lines changed
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- `A3-3-1` - `ExternalLinkageNotDeclaredInHeaderFile.ql`:
2+
- Adjust the alert message to comply with the style guide.

‎cpp/autosar/src/rules/A3-3-1/ExternalLinkageNotDeclaredInHeaderFile.ql

Copy file name to clipboardExpand all lines: cpp/autosar/src/rules/A3-3-1/ExternalLinkageNotDeclaredInHeaderFile.ql
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ where
3838
// Main functions are an exception to the rule
3939
not de.getDeclaration() instanceof MainFunction and
4040
if de.getDeclaration() instanceof Function then kind = "function" else kind = "object"
41-
select de, "Externally linked " + kind + " " + de.getName() + " not declared in header file."
41+
select de, "Externally linked " + kind + " '" + de.getName() + "' not declared in header file."
+6-6Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
| test.cpp:3:5:3:6 | definition of g1 | Externally linked object g1 not declared in header file. |
2-
| test.cpp:4:12:4:13 | declaration of g2 | Externally linked object g2 not declared in header file. |
3-
| test.cpp:10:5:10:6 | definition of l1 | Externally linked object l1 not declared in header file. |
4-
| test.cpp:11:6:11:7 | definition of f1 | Externally linked function f1 not declared in header file. |
5-
| test.cpp:22:5:22:5 | definition of f | Externally linked function f not declared in header file. |
6-
| test.cpp:25:5:25:6 | declaration of f1 | Externally linked function f1 not declared in header file. |
1+
| test.cpp:3:5:3:6 | definition of g1 | Externally linked object 'g1' not declared in header file. |
2+
| test.cpp:4:12:4:13 | declaration of g2 | Externally linked object 'g2' not declared in header file. |
3+
| test.cpp:10:5:10:6 | definition of l1 | Externally linked object 'l1' not declared in header file. |
4+
| test.cpp:11:6:11:7 | definition of f1 | Externally linked function 'f1' not declared in header file. |
5+
| test.cpp:22:5:22:5 | definition of f | Externally linked function 'f' not declared in header file. |
6+
| test.cpp:25:5:25:6 | declaration of f1 | Externally linked function 'f1' not declared in header file. |

‎cpp/autosar/test/rules/A3-3-1/test.cpp

Copy file name to clipboardExpand all lines: cpp/autosar/test/rules/A3-3-1/test.cpp
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,8 @@ namespace n {
3535
void f5() { // COMPLIANT
3636
int i = 0;
3737
}
38-
} // namespace n
38+
} // namespace n
39+
40+
const int c = 1; // COMPLIANT - internal linkage
41+
const char *const str2 = "foo"; // COMPLIANT - internal linkage
42+
constexpr int k = 1; // COMPLIANT - internal linkage

0 commit comments

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