Skip to content

Commit

Permalink
Merge branch 'main' into fix-constexpr-array-size-a0-1-1
Browse files Browse the repository at this point in the history
  • Loading branch information
lcartey authored Oct 9, 2024
2 parents cbeb018 + 2e8a503 commit 7dfb343
Show file tree
Hide file tree
Showing 337 changed files with 2,249 additions and 794 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/codeql_unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ jobs:
file.close()
- name: Upload test results
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.language }}-test-results-${{ runner.os }}-${{ matrix.codeql_cli }}-${{ matrix.codeql_standard_library_ident }}
path: |
Expand All @@ -171,7 +171,7 @@ jobs:
script: |
core.setFailed('Test run job failed')
- name: Collect test results
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4

- name: Validate test results
run: |
Expand Down
50 changes: 0 additions & 50 deletions .github/workflows/dispatch-matrix-check.yml

This file was deleted.

19 changes: 12 additions & 7 deletions .github/workflows/dispatch-matrix-test-on-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,19 @@ jobs:
owner: ${{ github.repository_owner }}
repositories: "codeql-coding-standards-release-engineering"

- name: Dispatch Matrix Testing Job
- name: Invoke matrix testing job
if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, '/test-matrix') && steps.check-write-permission.outputs.has-permission }}
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ steps.generate-token.outputs.token }}
repository: github/codeql-coding-standards-release-engineering
event-type: matrix-test
client-payload: '{"pr": "${{ github.event.issue.number }}"}'
env:
ISSUE_NR: ${{ github.event.issue.number }}
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
run: |
jq -n \
--arg issue_nr "$ISSUE_NR" \
'{"issue-nr": $issue_nr}' \
| \
gh workflow run pr-compiler-validation.yml \
--json \
-R github/codeql-coding-standards-release-engineering
- uses: actions/github-script@v6
if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, '/test-matrix') && steps.check-write-permission.outputs.has-permission }}
Expand Down
19 changes: 12 additions & 7 deletions .github/workflows/dispatch-release-performance-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,19 @@ jobs:
owner: ${{ github.repository_owner }}
repositories: "codeql-coding-standards-release-engineering"

- name: Dispatch Performance Testing Job
- name: Invoke performance test
if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, '/test-performance') && steps.check-write-permission.outputs.has-permission }}
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ steps.generate-token.outputs.token }}
repository: github/codeql-coding-standards-release-engineering
event-type: performance-test
client-payload: '{"pr": "${{ github.event.issue.number }}"}'
env:
ISSUE_NR: ${{ github.event.issue.number }}
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
run: |
jq -n \
--arg issue_nr "$ISSUE_NR" \
'{"issue-nr": $issue_nr}' \
| \
gh workflow run pr-performance-testing.yml \
--json \
-R github/codeql-coding-standards-release-engineering
- uses: actions/github-script@v6
if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, '/test-performance') && steps.check-write-permission.outputs.has-permission }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/standard_library_upgrade_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ jobs:
}, test_summary_file)
- name: Upload test results
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: test-results-${{runner.os}}-${{matrix.codeql_cli}}-${{matrix.codeql_standard_library_ident}}
path: |
Expand All @@ -162,7 +162,7 @@ jobs:
python-version: "3.9"

- name: Collect test results
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4

- name: Validate test results
shell: python
Expand Down
42 changes: 26 additions & 16 deletions .github/workflows/upgrade_codeql_dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,20 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Fetch CodeQL
env:
GITHUB_TOKEN: ${{ github.token }}
RUNNER_TEMP: ${{ runner.temp }}
run: |
cd $RUNNER_TEMP
gh release download "v${CODEQL_CLI_VERSION}" --repo https://github.com/github/codeql-cli-binaries --pattern codeql-linux64.zip
unzip -q codeql-linux64.zip
echo "$RUNNER_TEMP/codeql/" >> $GITHUB_PATH
- name: Install Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.9"

Expand All @@ -35,27 +45,27 @@ jobs:
run: |
python3 scripts/upgrade-codeql-dependencies/upgrade-codeql-dependencies.py --cli-version "$CODEQL_CLI_VERSION"
- name: Fetch CodeQL
env:
GITHUB_TOKEN: ${{ github.token }}
RUNNER_TEMP: ${{ runner.temp }}
run: |
cd $RUNNER_TEMP
gh release download "v${CODEQL_CLI_VERSION}" --repo https://github.com/github/codeql-cli-binaries --pattern codeql-linux64.zip
unzip -q codeql-linux64.zip
- name: Update CodeQL formatting based on new CLI version
env:
RUNNER_TEMP: ${{ runner.temp }}
run: |
find cpp \( -name '*.ql' -or -name '*.qll' \) -print0 | xargs -0 --max-procs "$XARGS_MAX_PROCS" $RUNNER_TEMP/codeql/codeql query format --in-place
find c \( -name '*.ql' -or -name '*.qll' \) -print0 | xargs -0 --max-procs "$XARGS_MAX_PROCS" $RUNNER_TEMP/codeql/codeql query format --in-place
find cpp \( -name '*.ql' -or -name '*.qll' \) -print0 | xargs -0 --max-procs "$XARGS_MAX_PROCS" codeql query format --in-place
find c \( -name '*.ql' -or -name '*.qll' \) -print0 | xargs -0 --max-procs "$XARGS_MAX_PROCS" codeql query format --in-place
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5
with:
title: "Upgrading `github/codeql` dependency to ${{ github.event.inputs.codeql_cli_version }}"
body: "This PR upgrades the CodeQL CLI version to ${{ github.event.inputs.codeql_cli_version }}."
title: "Upgrade `github/codeql` dependency to ${{ github.event.inputs.codeql_cli_version }}"
body: |
This PR upgrades the CodeQL CLI version to ${{ github.event.inputs.codeql_cli_version }}.
## CodeQL dependency upgrade checklist:
- [ ] Confirm the code has been correctly reformatted according to the new CodeQL CLI.
- [ ] Identify any CodeQL compiler warnings and errors, and update queries as required.
- [ ] Validate that the `github/codeql` test cases succeed.
- [ ] Address any CodeQL test failures in the `github/codeql-coding-standards` repository.
- [ ] Validate performance vs pre-upgrade, using /test-performance
commit-message: "Upgrading `github/codeql` dependency to ${{ github.event.inputs.codeql_cli_version }}"
delete-branch: true
branch: "codeql/upgrade-to-${{ github.event.inputs.codeql_cli_version }}"
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ The following coding standards are supported:

## :construction: Standards under development :construction:

- [MISRA C++ 2023](https://misra.org.uk/product/misra-cpp2023/) - under development _scheduled for release 2024 Q4_.
The following standards are under active development:

- [MISRA C++ 2023](https://misra.org.uk/product/misra-cpp2023/) - under development - _scheduled for release 2025 Q1_
- [MISRA C 2023](https://misra.org.uk/product/misra-c2023/) - under development - _scheduled for release 2025 Q1_
- This includes the development of [MISRA C 2012 Amendment 3](https://misra.org.uk/app/uploads/2021/06/MISRA-C-2012-AMD3.pdf) and [MISRA C 2012 Amendment 4](https://misra.org.uk/app/uploads/2021/06/MISRA-C-2012-AMD4.pdf), which are incorporated into MISRA C 2023.

## How do I use the CodeQL Coding Standards Queries?

Expand Down
12 changes: 8 additions & 4 deletions c/cert/src/codeql-pack.lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@
lockVersion: 1.0.0
dependencies:
codeql/cpp-all:
version: 0.9.3
version: 0.12.2
codeql/dataflow:
version: 0.1.5
codeql/rangeanalysis:
version: 0.0.4
codeql/ssa:
version: 0.1.5
version: 0.2.5
codeql/tutorial:
version: 0.1.5
version: 0.2.5
codeql/typetracking:
version: 0.2.5
codeql/util:
version: 0.1.5
version: 0.2.5
compiled: false
2 changes: 1 addition & 1 deletion c/cert/src/qlpack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ suites: codeql-suites
license: MIT
dependencies:
codeql/common-c-coding-standards: '*'
codeql/cpp-all: 0.9.3
codeql/cpp-all: 0.12.2
12 changes: 8 additions & 4 deletions c/cert/test/codeql-pack.lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@
lockVersion: 1.0.0
dependencies:
codeql/cpp-all:
version: 0.9.3
version: 0.12.2
codeql/dataflow:
version: 0.1.5
codeql/rangeanalysis:
version: 0.0.4
codeql/ssa:
version: 0.1.5
version: 0.2.5
codeql/tutorial:
version: 0.1.5
version: 0.2.5
codeql/typetracking:
version: 0.2.5
codeql/util:
version: 0.1.5
version: 0.2.5
compiled: false
12 changes: 8 additions & 4 deletions c/common/src/codeql-pack.lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@
lockVersion: 1.0.0
dependencies:
codeql/cpp-all:
version: 0.9.3
version: 0.12.2
codeql/dataflow:
version: 0.1.5
codeql/rangeanalysis:
version: 0.0.4
codeql/ssa:
version: 0.1.5
version: 0.2.5
codeql/tutorial:
version: 0.1.5
version: 0.2.5
codeql/typetracking:
version: 0.2.5
codeql/util:
version: 0.1.5
version: 0.2.5
compiled: false
Loading

0 comments on commit 7dfb343

Please sign in to comment.