Skip to content

Commit 553a752

Browse files
authored
Merge branch 'main' into m0-1-4/issue-6/constexpr-as-use
2 parents dad6bc1 + 5dd8526 commit 553a752

35 files changed

+122
-78
lines changed

.github/workflows/bump-version.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
jobs:
1111

1212
apply-version-bump:
13-
runs-on: ubuntu-latest
13+
runs-on: ubuntu-22.04
1414
name: Apply Version Bump
1515
steps:
1616
- name: Checkout

.github/workflows/code-scanning-pack-gen.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ env:
1919
jobs:
2020
prepare-code-scanning-pack-matrix:
2121
name: Prepare CodeQL Code Scanning pack matrix
22-
runs-on: ubuntu-latest
22+
runs-on: ubuntu-22.04
2323
outputs:
2424
matrix: ${{ steps.export-code-scanning-pack-matrix.outputs.matrix }}
2525
steps:

.github/workflows/codeql_unit_tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414
jobs:
1515
prepare-unit-test-matrix:
1616
name: Prepare CodeQL unit test matrix
17-
runs-on: ubuntu-latest
17+
runs-on: ubuntu-22.04
1818
outputs:
1919
matrix: ${{ steps.export-unit-test-matrix.outputs.matrix }}
2020
steps:
@@ -157,7 +157,7 @@ jobs:
157157
validate-test-results:
158158
name: Validate test results
159159
needs: [run-test-suites]
160-
runs-on: ubuntu-latest
160+
runs-on: ubuntu-22.04
161161
steps:
162162
- name: Collect test results
163163
uses: actions/download-artifact@v2

.github/workflows/create-draft-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ on:
2121
jobs:
2222
create-draft-release:
2323
name: Create draft release
24-
runs-on: ubuntu-latest
24+
runs-on: ubuntu-22.04
2525
env:
2626
# AWS CONFIGURATION
2727
AWS_EC2_INSTANCE_TYPE: ${{ github.event.inputs.aws_ec2_instance_type }}

.github/workflows/generate-html-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ on:
1515
jobs:
1616
generate-html-doc:
1717
name: Generate HTML documentation
18-
runs-on: ubuntu-latest
18+
runs-on: ubuntu-22.04
1919
steps:
2020
- name: Checkout
2121
uses: actions/checkout@v2

.github/workflows/standard_library_upgrade_tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414
jobs:
1515
prepare-unit-test-matrix:
1616
name: Prepare CodeQL unit test matrix
17-
runs-on: ubuntu-latest
17+
runs-on: ubuntu-22.04
1818
outputs:
1919
matrix: ${{ steps.export-unit-test-matrix.outputs.matrix }}
2020
steps:
@@ -154,7 +154,7 @@ jobs:
154154
validate-test-results:
155155
name: Validate test results
156156
needs: [run-test-suites]
157-
runs-on: ubuntu-latest
157+
runs-on: ubuntu-22.04
158158
steps:
159159
- name: Install Python
160160
uses: actions/setup-python@v4

.github/workflows/upgrade_codeql_dependencies.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
env:
2121
CODEQL_CLI_VERSION: ${{ github.event.inputs.codeql_cli_version }}
2222
CODEQL_LIB_COMMIT: ${{ github.event.inputs.codeql_standard_library_commit }}
23-
runs-on: ubuntu-latest
23+
runs-on: ubuntu-22.04
2424
steps:
2525
- name: Checkout
2626
uses: actions/checkout@v2

.github/workflows/validate-coding-standards.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ env:
1818
jobs:
1919
validate-package-files:
2020
name: Validate Package Files
21-
runs-on: ubuntu-latest
21+
runs-on: ubuntu-22.04
2222
steps:
2323
- name: Checkout
2424
uses: actions/checkout@v2
@@ -63,7 +63,7 @@ jobs:
6363
6464
validate-codeql-format:
6565
name: "Validate CodeQL Format"
66-
runs-on: ubuntu-latest
66+
runs-on: ubuntu-22.04
6767
steps:
6868
- name: Checkout
6969
uses: actions/checkout@v2
@@ -94,7 +94,7 @@ jobs:
9494
9595
validate-query-help-files:
9696
name: Validate Query Help Files
97-
runs-on: ubuntu-latest
97+
runs-on: ubuntu-22.04
9898
steps:
9999
- name: Checkout
100100
uses: actions/checkout@v2
@@ -129,7 +129,7 @@ jobs:
129129
130130
validate-cpp-test-files:
131131
name: Validate C++ Test Files
132-
runs-on: ubuntu-latest
132+
runs-on: ubuntu-22.04
133133
steps:
134134
- name: Checkout
135135
uses: actions/checkout@v2
@@ -152,7 +152,7 @@ jobs:
152152
153153
validate-c-test-files:
154154
name: Validate C Test Files
155-
runs-on: ubuntu-latest
155+
runs-on: ubuntu-22.04
156156
steps:
157157
- name: Checkout
158158
uses: actions/checkout@v2

c/cert/src/qlpack.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
name: cert-c-coding-standards
2-
version: 2.9.0
2+
version: 2.11.0-dev
33
suites: codeql-suites
44
libraryPathDependencies: common-c-coding-standards

c/cert/test/qlpack.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
name: cert-c-coding-standards-tests
2-
version: 2.9.0
2+
version: 2.11.0-dev
33
libraryPathDependencies: cert-c-coding-standards
44
extractor: cpp

c/common/src/qlpack.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
name: common-c-coding-standards
2-
version: 2.9.0
2+
version: 2.11.0-dev
33
libraryPathDependencies: common-cpp-coding-standards

c/common/test/qlpack.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
name: common-c-coding-standards-tests
2-
version: 2.9.0
2+
version: 2.11.0-dev
33
libraryPathDependencies: common-c-coding-standards
44
extractor: cpp

c/misra/src/qlpack.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
name: misra-c-coding-standards
2-
version: 2.9.0
2+
version: 2.11.0-dev
33
suites: codeql-suites
44
libraryPathDependencies: common-c-coding-standards

c/misra/test/qlpack.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
name: misra-c-coding-standards-tests
2-
version: 2.9.0
2+
version: 2.11.0-dev
33
libraryPathDependencies: misra-c-coding-standards
44
extractor: cpp

cpp/autosar/src/qlpack.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
name: autosar-cpp-coding-standards
2-
version: 2.9.0
2+
version: 2.11.0-dev
33
suites: codeql-suites
44
libraryPathDependencies: common-cpp-coding-standards

cpp/autosar/test/qlpack.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
name: autosar-cpp-coding-standards-tests
2-
version: 2.9.0
2+
version: 2.11.0-dev
33
libraryPathDependencies: autosar-cpp-coding-standards
44
extractor: cpp

cpp/autosar/test/rules/A5-1-9/test.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,16 +86,16 @@ void test_noncompliant() {
8686
#include <string>
8787
class Test_issue468 {
8888
public:
89-
template <typename... As> static void LogInfo(const As &... rest) {
89+
template <typename... As> static void LogInfo(const As &...rest) {
9090
[](const std::string &s) -> void { LogInfo(s); }; // COMPLIANT
9191
}
92-
template <typename... As> static void LogWarn(const As &... rest) {
92+
template <typename... As> static void LogWarn(const As &...rest) {
9393
[](const std::string &s) -> void { LogWarn(s); }; // COMPLIANT
9494
}
95-
template <typename... As> static void LogError(const As &... rest) {
95+
template <typename... As> static void LogError(const As &...rest) {
9696
[](const std::string &s) -> void { LogError(s); }; // NON_COMPLIANT
9797
}
98-
template <typename... As> static void LogFatal(const As &... rest) {
98+
template <typename... As> static void LogFatal(const As &...rest) {
9999
[](const std::string &s) -> void { LogError(s); }; // NON_COMPLIANT
100100
}
101101
void instantiate() {

cpp/autosar/test/rules/A5-2-2/test.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@ void test_cpp_style_cast() {
4545
class A5_2_2a {
4646
public:
4747
template <typename... As>
48-
static void Foo(const std::string &name, As &&... rest) {
48+
static void Foo(const std::string &name, As &&...rest) {
4949
Fun(Log(
5050
std::forward<As>(rest)...)); // COMPLIANT - reported as a false positive
5151
}
5252

53-
template <typename... As> static std::string Log(As &&... tail) {
53+
template <typename... As> static std::string Log(As &&...tail) {
5454
return std::string();
5555
}
5656

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
| test.cpp:1:6:1:6 | C | Base type of enumeration is not explicitly specified. |
2-
| test.cpp:3:12:3:12 | A | Base type of enumeration is not explicitly specified. |
2+
| test.cpp:5:12:5:12 | A | Base type of enumeration is not explicitly specified. |
Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
enum C // NON_COMPLIANT
2-
{ c1 };
2+
{
3+
c1
4+
};
35
enum class A // NON_COMPLIANT
4-
{ a1 };
6+
{
7+
a1
8+
};
59
enum class B : int // COMPLIANT
6-
{ b1 };
10+
{
11+
b1
12+
};
713
enum D : int // COMPLIANT
8-
{ d1 };
14+
{
15+
d1
16+
};
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
| test.cpp:1:6:1:6 | C | Enum C is not a scoped enum. |
2-
| test.cpp:11:6:11:6 | D | Enum D is not a scoped enum. |
2+
| test.cpp:21:6:21:6 | D | Enum D is not a scoped enum. |
Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,24 @@
11
enum C // NON_COMPLIANT
2-
{ c1 };
2+
{
3+
c1
4+
};
35
enum class A // COMPLIANT - Violates a different rule (A7-2-2)
4-
{ a1 };
6+
{
7+
a1
8+
};
59
enum struct A1 // COMPLIANT - Violates a different rule (A7-2-2)
6-
{ a12 };
10+
{
11+
a12
12+
};
713
enum class B : int // COMPLIANT
8-
{ b1 };
14+
{
15+
b1
16+
};
917
enum struct B1 : int // COMPLIANT
10-
{ b12 };
18+
{
19+
b12
20+
};
1121
enum D : int // NON_COMPLIANT
12-
{ d1 };
22+
{
23+
d1
24+
};
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
| test.cpp:9:12:9:13 | A2 | Neither none, the first, or all enumerated constants are initialized in this enumeration. |
2-
| test.cpp:33:14:33:15 | B3 | Neither none, the first, or all enumerated constants are initialized in this enumeration. |
3-
| test.cpp:45:6:45:6 | D | Neither none, the first, or all enumerated constants are initialized in this enumeration. |
4-
| test.cpp:53:6:53:7 | E1 | Neither none, the first, or all enumerated constants are initialized in this enumeration. |
1+
| test.cpp:13:12:13:13 | A2 | Neither none, the first, or all enumerated constants are initialized in this enumeration. |
2+
| test.cpp:47:14:47:15 | B3 | Neither none, the first, or all enumerated constants are initialized in this enumeration. |
3+
| test.cpp:63:6:63:6 | D | Neither none, the first, or all enumerated constants are initialized in this enumeration. |
4+
| test.cpp:75:6:75:7 | E1 | Neither none, the first, or all enumerated constants are initialized in this enumeration. |
Lines changed: 46 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,79 @@
11
enum class A // COMPLIANT
2-
{ a1 };
2+
{
3+
a1
4+
};
35

46
enum class A1 // COMPLIANT
5-
{ a1 = 0,
7+
{
8+
a1 = 0,
69
a2 = 1,
7-
a3 = 2 };
10+
a3 = 2
11+
};
812

913
enum class A2 // NON_COMPLIANT
10-
{ a1,
14+
{
15+
a1,
1116
a2 = 0,
12-
a3 };
17+
a3
18+
};
1319

1420
enum class A3 // COMPLIANT
15-
{ a1 = 0,
21+
{
22+
a1 = 0,
1623
a2,
17-
a3 };
24+
a3
25+
};
1826

1927
enum class B : int // COMPLIANT
20-
{ b1 };
28+
{
29+
b1
30+
};
2131

2232
enum class B1 : int // COMPLIANT
23-
{ b1,
33+
{
34+
b1,
2435
b2,
25-
b3 };
36+
b3
37+
};
2638

2739
enum class B2 : int // COMPLIANT
28-
{ b1 = 0,
40+
{
41+
b1 = 0,
2942
b2,
30-
b3 };
43+
b3
44+
};
3145

3246
int f() {
3347
enum class B3 : int // NON_COMPLIANT
34-
{ b1,
48+
{
49+
b1,
3550
b2 = 0,
36-
b3 = 0 };
51+
b3 = 0
52+
};
3753

3854
return 0;
3955
}
4056

4157
enum C // COMPLIANT
42-
{ c1,
43-
c2 };
58+
{
59+
c1,
60+
c2
61+
};
4462

4563
enum D // NON_COMPLIANT
46-
{ d1,
47-
d2 = 0 };
64+
{
65+
d1,
66+
d2 = 0
67+
};
4868

4969
enum E : int // COMPLIANT
50-
{ e1,
51-
e2 };
70+
{
71+
e1,
72+
e2
73+
};
5274

5375
enum E1 : int // NON_COMPLIANT
54-
{ e11,
55-
e22 = 0 };
76+
{
77+
e11,
78+
e22 = 0
79+
};

cpp/autosar/test/rules/A8-4-5/test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class TestClass4 {
4848

4949
// template type
5050
template <typename T, typename... X>
51-
T test_forward(X &&... f) { // forward parameter
51+
T test_forward(X &&...f) { // forward parameter
5252
return T{std::forward<X>(f)...}; // COMPLIANT
5353
}
5454

0 commit comments

Comments
 (0)