Skip to content

Commit daa68d3

Browse files
Merge remote-tracking branch 'origin/main' into michaelrfairhurst/implement-deadcode-2-unused-object-definitions
2 parents 125650c + 9f106d7 commit daa68d3

File tree

437 files changed

+5657
-1406
lines changed

Some content is hidden

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

437 files changed

+5657
-1406
lines changed

.github/dependabot.yml

+8
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

+32-10
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ on:
88
- main
99
- next
1010
- "rc/**"
11-
1211
push:
1312
branches:
1413
- main
@@ -47,7 +46,7 @@ jobs:
4746

4847
- name: Cache CodeQL
4948
id: cache-codeql
50-
uses: actions/cache@v2.1.3
49+
uses: actions/cache@v4
5150
with:
5251
path: ${{ github.workspace }}/codeql_home
5352
key: codeql-home-${{ matrix.os }}-${{ matrix.codeql_cli }}-${{ matrix.codeql_standard_library }}
@@ -69,15 +68,17 @@ jobs:
6968
- name: Determine ref for external help files
7069
id: determine-ref
7170
run: |
72-
if [[ $GITHUB_EVENT_NAME == "pull_request" || $GITHUB_EVENT_NAME == "merge_group" ]]; then
73-
echo "EXTERNAL_HELP_REF=$GITHUB_HEAD_REF" >> "$GITHUB_ENV"
71+
if [[ $GITHUB_EVENT_NAME == "pull_request" ]]; then
72+
EXTERNAL_HELP_REF="${{ github.event.pull_request.base.ref }}"
73+
elif [[ $GITHUB_EVENT_NAME == "merge_group" ]]; then
74+
EXTERNAL_HELP_REF="${{ github.event.merge_group.base_ref }}"
7475
else
75-
echo "EXTERNAL_HELP_REF=$GITHUB_REF" >> "$GITHUB_ENV"
76+
EXTERNAL_HELP_REF="$GITHUB_REF"
7677
fi
78+
echo "EXTERNAL_HELP_REF=$EXTERNAL_HELP_REF" >> "$GITHUB_ENV"
7779
echo "Using ref $EXTERNAL_HELP_REF for external help files."
7880
7981
- name: Checkout external help files
80-
continue-on-error: true
8182
id: checkout-external-help-files
8283
uses: actions/checkout@v4
8384
with:
@@ -98,15 +99,36 @@ jobs:
9899
CODEQL_HOME: ${{ github.workspace }}/codeql_home
99100
run: |
100101
PATH=$PATH:$CODEQL_HOME/codeql
101-
102-
codeql query compile --precompile --threads 0 cpp
103-
codeql query compile --precompile --threads 0 c
102+
# Precompile all queries, and use a compilation cache larger than default
103+
# to ensure we cache all the queries for later steps
104+
codeql query compile --precompile --threads 0 --compilation-cache-size=1024 cpp c
104105
105106
cd ..
106107
zip -r codeql-coding-standards/code-scanning-cpp-query-pack.zip codeql-coding-standards/c/ codeql-coding-standards/cpp/ codeql-coding-standards/.codeqlmanifest.json codeql-coding-standards/supported_codeql_configs.json codeql-coding-standards/scripts/configuration codeql-coding-standards/scripts/reports codeql-coding-standards/scripts/shared codeql-coding-standards/scripts/guideline_recategorization codeql-coding-standards/schemas
107108
108109
- name: Upload GHAS Query Pack
109-
uses: actions/upload-artifact@v3
110+
uses: actions/upload-artifact@v4
110111
with:
111112
name: code-scanning-cpp-query-pack.zip
112113
path: code-scanning-cpp-query-pack.zip
114+
115+
- name: Create qlpack bundles
116+
env:
117+
CODEQL_HOME: ${{ github.workspace }}/codeql_home
118+
run: |
119+
PATH=$PATH:$CODEQL_HOME/codeql
120+
121+
codeql pack bundle --output=common-cpp-coding-standards.tgz cpp/common/src
122+
codeql pack bundle --output=common-c-coding-standards.tgz c/common/src
123+
codeql pack bundle --output=misra-c-coding-standards.tgz c/misra/src
124+
codeql pack bundle --output=cert-c-coding-standards.tgz c/cert/src
125+
codeql pack bundle --output=cert-cpp-coding-standards.tgz cpp/cert/src
126+
codeql pack bundle --output=autosar-cpp-coding-standards.tgz cpp/autosar/src
127+
codeql pack bundle --output=misra-cpp-coding-standards.tgz cpp/misra/src
128+
codeql pack bundle --output=report-coding-standards.tgz cpp/report/src
129+
130+
- name: Upload qlpack bundles
131+
uses: actions/upload-artifact@v4
132+
with:
133+
name: coding-standards-codeql-packs
134+
path: '*-coding-standards.tgz'

.github/workflows/codeql_unit_tests.yml

+3-3
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

+1-1
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

+1-1
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

+4-4
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

+1-1
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

+3-3
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

+2-2
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

+5-5
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

+8-8
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

+1-1
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

+2-2
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

+1-1
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

+1-1
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

+1-1
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

+4-4
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

amendments.csv

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ c,MISRA-C-2012,Amendment4,RULE-11-3,Yes,Expand,No,Easy
1515
c,MISRA-C-2012,Amendment4,RULE-11-8,Yes,Expand,No,Easy
1616
c,MISRA-C-2012,Amendment4,RULE-13-2,Yes,Expand,No,Very Hard
1717
c,MISRA-C-2012,Amendment4,RULE-18-6,Yes,Expand,No,Medium
18-
c,MISRA-C-2012,Amendment4,RULE-18-8,Yes,Split,No,Easy
18+
c,MISRA-C-2012,Amendment4,RULE-18-8,Yes,Split,Yes,Easy
1919
c,MISRA-C-2012,Corrigendum2,RULE-2-2,Yes,Clarification,No,Import
2020
c,MISRA-C-2012,Corrigendum2,RULE-2-7,Yes,Clarification,No,Import
2121
c,MISRA-C-2012,Corrigendum2,RULE-3-1,Yes,Refine,No,Easy

0 commit comments

Comments
 (0)