Skip to content

Commit d1dd23c

Browse files
Merge branch 'main' into michaelrfairhurst/implement-lanugage4-package-rule-1-5
2 parents 9dc3c2a + 85036d5 commit d1dd23c

File tree

145 files changed

+2102
-783
lines changed

Some content is hidden

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

145 files changed

+2102
-783
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: 26 additions & 6 deletions
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 }}
@@ -98,15 +97,36 @@ jobs:
9897
CODEQL_HOME: ${{ github.workspace }}/codeql_home
9998
run: |
10099
PATH=$PATH:$CODEQL_HOME/codeql
101-
102-
codeql query compile --precompile --threads 0 cpp
103-
codeql query compile --precompile --threads 0 c
100+
# Precompile all queries, and use a compilation cache larger than default
101+
# to ensure we cache all the queries for later steps
102+
codeql query compile --precompile --threads 0 --compilation-cache-size=1024 cpp c
104103
105104
cd ..
106105
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
107106
108107
- name: Upload GHAS Query Pack
109-
uses: actions/upload-artifact@v3
108+
uses: actions/upload-artifact@v4
110109
with:
111110
name: code-scanning-cpp-query-pack.zip
112111
path: code-scanning-cpp-query-pack.zip
112+
113+
- name: Create qlpack bundles
114+
env:
115+
CODEQL_HOME: ${{ github.workspace }}/codeql_home
116+
run: |
117+
PATH=$PATH:$CODEQL_HOME/codeql
118+
119+
codeql pack bundle --output=common-cpp-coding-standards.tgz cpp/common/src
120+
codeql pack bundle --output=common-c-coding-standards.tgz c/common/src
121+
codeql pack bundle --output=misra-c-coding-standards.tgz c/misra/src
122+
codeql pack bundle --output=cert-c-coding-standards.tgz c/cert/src
123+
codeql pack bundle --output=cert-cpp-coding-standards.tgz cpp/cert/src
124+
codeql pack bundle --output=autosar-cpp-coding-standards.tgz cpp/autosar/src
125+
codeql pack bundle --output=misra-cpp-coding-standards.tgz cpp/misra/src
126+
codeql pack bundle --output=report-coding-standards.tgz cpp/report/src
127+
128+
- name: Upload qlpack bundles
129+
uses: actions/upload-artifact@v4
130+
with:
131+
name: coding-standards-codeql-packs
132+
path: '*-coding-standards.tgz'

.github/workflows/codeql_unit_tests.yml

Lines changed: 2 additions & 2 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

.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

apply-configuration/action.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Applies Coding Standard configuration files in the repository
2+
description: |
3+
Installs Python and indexes the CodeQL Coding Standard configuration files in the repository
4+
5+
runs:
6+
using: composite
7+
steps:
8+
- name: Install Python
9+
id: cs-install-python
10+
uses: actions/setup-python@v5
11+
with:
12+
python-version: 3.9
13+
update-environment: false
14+
- name: Install dependencies and process files
15+
shell: bash
16+
run: |
17+
install_dir=$(dirname $(dirname "${{ steps.cs-install-python.outputs.python-path }}"))
18+
if [[ -z "$LD_LIBRARY_PATH" ]]; then
19+
export LD_LIBRARY_PATH="$install_dir/lib"
20+
else
21+
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$install_dir/lib"
22+
fi
23+
${{ steps.cs-install-python.outputs.python-path }} -m pip install -r ${GITHUB_ACTION_PATH}/../scripts/configuration/requirements.txt
24+
${{ steps.cs-install-python.outputs.python-path }} ${GITHUB_ACTION_PATH}/../scripts/configuration/process_coding_standards_config.py

c/cert/src/codeql-pack.lock.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
lockVersion: 1.0.0
33
dependencies:
44
codeql/cpp-all:
5-
version: 0.12.2
5+
version: 0.12.9
66
codeql/dataflow:
7-
version: 0.1.5
7+
version: 0.2.3
88
codeql/rangeanalysis:
9-
version: 0.0.4
9+
version: 0.0.11
1010
codeql/ssa:
11-
version: 0.2.5
11+
version: 0.2.12
1212
codeql/tutorial:
13-
version: 0.2.5
13+
version: 0.2.12
1414
codeql/typetracking:
15-
version: 0.2.5
15+
version: 0.2.12
1616
codeql/util:
17-
version: 0.2.5
17+
version: 0.2.12
1818
compiled: false

0 commit comments

Comments
 (0)