Skip to content

Commit 56bc333

Browse files
authored
Merge branch 'main' into rp/fix-789
2 parents d584e30 + 6bd9ed7 commit 56bc333

File tree

75 files changed

+1211
-138
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+1211
-138
lines changed

.github/dependabot.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
version: 2
2+
updates:
3+
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
6+
schedule:
7+
# Check for updates to GitHub Actions every week
8+
interval: "weekly"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646

4747
- name: Cache CodeQL
4848
id: cache-codeql
49-
uses: actions/cache@v2.1.3
49+
uses: actions/cache@v4
5050
with:
5151
path: ${{ github.workspace }}/codeql_home
5252
key: codeql-home-${{ matrix.os }}-${{ matrix.codeql_cli }}-${{ matrix.codeql_standard_library }}

.github/workflows/codeql_unit_tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
uses: actions/checkout@v4
4949

5050
- name: Install Python
51-
uses: actions/setup-python@v4
51+
uses: actions/setup-python@v5
5252
with:
5353
python-version: "3.9"
5454

@@ -57,7 +57,7 @@ jobs:
5757

5858
- name: Cache CodeQL
5959
id: cache-codeql
60-
uses: actions/cache@v3
60+
uses: actions/cache@v4
6161
with:
6262
# A list of files, directories, and wildcard patterns to cache and restore
6363
path: ${{github.workspace}}/codeql_home
@@ -166,7 +166,7 @@ jobs:
166166
steps:
167167
- name: Check if run-test-suites job failed to complete, if so fail
168168
if: ${{ needs.run-test-suites.result == 'failure' }}
169-
uses: actions/github-script@v3
169+
uses: actions/github-script@v7
170170
with:
171171
script: |
172172
core.setFailed('Test run job failed')

.github/workflows/dispatch-matrix-test-on-comment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
--json \
4141
-R github/codeql-coding-standards-release-engineering
4242
43-
- uses: actions/github-script@v6
43+
- uses: actions/github-script@v7
4444
if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, '/test-matrix') && steps.check-write-permission.outputs.has-permission }}
4545
with:
4646
script: |

.github/workflows/dispatch-release-performance-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
--json \
4141
-R github/codeql-coding-standards-release-engineering
4242
43-
- uses: actions/github-script@v6
43+
- uses: actions/github-script@v7
4444
if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, '/test-performance') && steps.check-write-permission.outputs.has-permission }}
4545
with:
4646
script: |

.github/workflows/extra-rule-validation.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
runs-on: ubuntu-22.04
2222
steps:
2323
- name: Checkout
24-
uses: actions/checkout@v2
24+
uses: actions/checkout@v4
2525

2626
- name: Check Rules
2727
shell: pwsh
@@ -33,7 +33,7 @@ jobs:
3333
runs-on: ubuntu-22.04
3434
steps:
3535
- name: Checkout
36-
uses: actions/checkout@v2
36+
uses: actions/checkout@v4
3737

3838
- name: Ensure CPP Shared Rules Have Valid Structure
3939
shell: pwsh
@@ -44,13 +44,13 @@ jobs:
4444
run: scripts/util/Test-SharedImplementationsHaveTestCases.ps1 -Language c -CIMode
4545

4646

47-
- uses: actions/upload-artifact@v3
47+
- uses: actions/upload-artifact@v4
4848
if: failure()
4949
with:
5050
name: missing-test-report.csv
5151
path: MissingTestReport*.csv
5252

53-
- uses: actions/upload-artifact@v3
53+
- uses: actions/upload-artifact@v4
5454
if: failure()
5555
with:
5656
name: test-report.csv

.github/workflows/finalize-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
path: tooling
5353

5454
- name: Install Python
55-
uses: actions/setup-python@v4
55+
uses: actions/setup-python@v5
5656
with:
5757
python-version: "3.9"
5858

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ jobs:
2020
runs-on: ubuntu-22.04
2121
steps:
2222
- name: Checkout
23-
uses: actions/checkout@v2
23+
uses: actions/checkout@v4
2424

2525
- name: Install Python
26-
uses: actions/setup-python@v4
26+
uses: actions/setup-python@v5
2727
with:
2828
python-version: "3.9"
2929

@@ -35,7 +35,7 @@ jobs:
3535
python scripts/documentation/generate_iso26262_docs.py coding-standards-html-docs
3636
3737
- name: Upload HTML documentation
38-
uses: actions/upload-artifact@v3
38+
uses: actions/upload-artifact@v4
3939
with:
4040
name: coding-standards-docs-${{ github.sha }}
4141
path: coding-standards-html-docs/

.github/workflows/prepare-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ jobs:
3434
runs-on: ubuntu-22.04
3535
steps:
3636
- name: Checkout
37-
uses: actions/checkout@v3
37+
uses: actions/checkout@v4
3838
with:
3939
ref: ${{ inputs.ref }}
4040

4141
- name: Install Python
42-
uses: actions/setup-python@v4
42+
uses: actions/setup-python@v5
4343
with:
4444
python-version: "3.9"
4545

.github/workflows/standard_library_upgrade_tests.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
matrix: ${{ steps.export-unit-test-matrix.outputs.matrix }}
2020
steps:
2121
- name: Checkout repository
22-
uses: actions/checkout@v2
22+
uses: actions/checkout@v4
2323

2424
- name: Export unit test matrix
2525
id: export-unit-test-matrix
@@ -41,16 +41,16 @@ jobs:
4141

4242
steps:
4343
- name: Checkout repository
44-
uses: actions/checkout@v2
44+
uses: actions/checkout@v4
4545

4646
- name: Setup Python 3
47-
uses: actions/setup-python@v2
47+
uses: actions/setup-python@v5
4848
with:
4949
python-version: "3.x"
5050

5151
- name: Cache CodeQL
5252
id: cache-codeql
53-
uses: actions/cache@v2.1.3
53+
uses: actions/cache@v4
5454
with:
5555
# A list of files, directories, and wildcard patterns to cache and restore
5656
path: ${{github.workspace}}/codeql_home
@@ -157,7 +157,7 @@ jobs:
157157
runs-on: ubuntu-22.04
158158
steps:
159159
- name: Install Python
160-
uses: actions/setup-python@v4
160+
uses: actions/setup-python@v5
161161
with:
162162
python-version: "3.9"
163163

.github/workflows/tooling-unit-tests.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
matrix: ${{ steps.export-supported-codeql-env-matrix.outputs.matrix }}
2323
steps:
2424
- name: Checkout repository
25-
uses: actions/checkout@v2
25+
uses: actions/checkout@v4
2626

2727
- name: Export supported CodeQL environment matrix
2828
id: export-supported-codeql-env-matrix
@@ -40,10 +40,10 @@ jobs:
4040
matrix: ${{ fromJSON(needs.prepare-supported-codeql-env-matrix.outputs.matrix) }}
4141
steps:
4242
- name: Checkout
43-
uses: actions/checkout@v2
43+
uses: actions/checkout@v4
4444

4545
- name: Install Python
46-
uses: actions/setup-python@v4
46+
uses: actions/setup-python@v5
4747
with:
4848
python-version: "3.9"
4949

@@ -52,7 +52,7 @@ jobs:
5252

5353
- name: Cache CodeQL
5454
id: cache-codeql
55-
uses: actions/cache@v2.1.3
55+
uses: actions/cache@v4
5656
with:
5757
path: ${{ github.workspace }}/codeql_home
5858
key: codeql-home-${{ matrix.os }}-${{ matrix.codeql_cli }}-${{ matrix.codeql_standard_library }}
@@ -83,10 +83,10 @@ jobs:
8383
runs-on: ubuntu-22.04
8484
steps:
8585
- name: Checkout
86-
uses: actions/checkout@v2
86+
uses: actions/checkout@v4
8787

8888
- name: Install Python
89-
uses: actions/setup-python@v4
89+
uses: actions/setup-python@v5
9090
with:
9191
python-version: "3.9"
9292

@@ -102,10 +102,10 @@ jobs:
102102
runs-on: ubuntu-22.04
103103
steps:
104104
- name: Checkout
105-
uses: actions/checkout@v2
105+
uses: actions/checkout@v4
106106

107107
- name: Install Python
108-
uses: actions/setup-python@v4
108+
uses: actions/setup-python@v5
109109
with:
110110
python-version: "3.9"
111111

.github/workflows/update-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
ref: ${{ inputs.head-sha }}
3535

3636
- name: Install Python
37-
uses: actions/setup-python@v4
37+
uses: actions/setup-python@v5
3838
with:
3939
python-version: "3.9"
4040

.github/workflows/validate-package-files.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ jobs:
1616
runs-on: ubuntu-22.04
1717
steps:
1818
- name: Checkout
19-
uses: actions/checkout@v3
19+
uses: actions/checkout@v4
2020
with:
2121
ref: ${{ inputs.ref }}
2222

2323
- name: Install Python
24-
uses: actions/setup-python@v4
24+
uses: actions/setup-python@v5
2525
with:
2626
python-version: "3.9"
2727

.github/workflows/validate-query-formatting.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
runs-on: ubuntu-22.04
2020
steps:
2121
- name: Checkout
22-
uses: actions/checkout@v3
22+
uses: actions/checkout@v4
2323
with:
2424
ref: ${{ inputs.ref }}
2525

.github/workflows/validate-query-help.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
runs-on: ubuntu-22.04
1717
steps:
1818
- name: Checkout
19-
uses: actions/checkout@v3
19+
uses: actions/checkout@v4
2020
with:
2121
ref: ${{ inputs.ref }}
2222

.github/workflows/validate-query-test-case-formatting.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
fail-fast: false
2121
steps:
2222
- name: Checkout
23-
uses: actions/checkout@v3
23+
uses: actions/checkout@v4
2424
with:
2525
ref: ${{ inputs.ref }}
2626

.github/workflows/verify-standard-library-dependencies.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
matrix: ${{ steps.export-matrix.outputs.matrix }}
2323
steps:
2424
- name: Checkout repository
25-
uses: actions/checkout@v2
25+
uses: actions/checkout@v4
2626

2727
- name: Export unit test matrix
2828
id: export-matrix
@@ -44,16 +44,16 @@ jobs:
4444

4545
steps:
4646
- name: Checkout repository
47-
uses: actions/checkout@v2
47+
uses: actions/checkout@v4
4848

4949
- name: Setup Python 3
50-
uses: actions/setup-python@v4
50+
uses: actions/setup-python@v5
5151
with:
5252
python-version: "3.9"
5353

5454
- name: Cache CodeQL
5555
id: cache-codeql
56-
uses: actions/cache@v2.1.3
56+
uses: actions/cache@v4
5757
with:
5858
# A list of files, directories, and wildcard patterns to cache and restore
5959
path: ${{github.workspace}}/codeql_home
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// GENERATED FILE - DO NOT MODIFY
2+
import codingstandards.cpp.rules.functiontypesnotinprototypeformshared.FunctionTypesNotInPrototypeFormShared
3+
4+
class TestFileQuery extends FunctionTypesNotInPrototypeFormSharedSharedQuery, TestQuery { }
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// GENERATED FILE - DO NOT MODIFY
2+
import codingstandards.cpp.rules.missingstaticspecifierobjectredeclarationshared.MissingStaticSpecifierObjectRedeclarationShared
3+
4+
class TestFileQuery extends MissingStaticSpecifierObjectRedeclarationSharedSharedQuery, TestQuery {
5+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/**
2+
* @id c/misra/call-to-obsolescent-function-gets
3+
* @name RULE-1-5: Disallowed usage of obsolescent function 'gets'
4+
* @description The function 'gets' is an obsolescent language feature which was removed in C11.
5+
* @kind problem
6+
* @precision very-high
7+
* @problem.severity error
8+
* @tags external/misra/id/rule-1-5
9+
* external/misra/c/2012/amendment3
10+
* security
11+
* maintainability
12+
* external/misra/obligation/required
13+
*/
14+
15+
import cpp
16+
import codingstandards.c.misra
17+
18+
from FunctionCall fc
19+
where
20+
not isExcluded(fc, Language4Package::callToObsolescentFunctionGetsQuery()) and
21+
fc.getTarget().hasGlobalOrStdName("gets")
22+
select fc, "Call to obsolescent function 'gets'."
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/**
2+
* @id c/misra/function-types-not-in-prototype-form-obsolete
3+
* @name RULE-1-5: Function types shall be in prototype form with named parameters
4+
* @description The use of non-prototype format parameter type declarators is an obsolescent
5+
* language feature.
6+
* @kind problem
7+
* @precision medium
8+
* @problem.severity error
9+
* @tags external/misra/id/rule-1-5
10+
* correctness
11+
* external/misra/c/2012/amendment3
12+
* external/misra/obligation/required
13+
*/
14+
15+
import cpp
16+
import codingstandards.c.misra
17+
import codingstandards.cpp.rules.functiontypesnotinprototypeformshared.FunctionTypesNotInPrototypeFormShared
18+
19+
class FunctionTypesNotInPrototypeFormObsoleteQuery extends FunctionTypesNotInPrototypeFormSharedSharedQuery
20+
{
21+
FunctionTypesNotInPrototypeFormObsoleteQuery() {
22+
this = Language4Package::functionTypesNotInPrototypeFormObsoleteQuery()
23+
}
24+
}

0 commit comments

Comments
 (0)