Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit dfcc100

Browse filesBrowse files
authored
Merge branch 'main' into Contracts5
2 parents 9279224 + cb22393 commit dfcc100
Copy full SHA for dfcc100

File tree

Expand file treeCollapse file tree

254 files changed

+9453
-1279
lines changed
Filter options

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree

254 files changed

+9453
-1279
lines changed

‎.github/touch

Copy file name to clipboardExpand all lines: .github/touch
-1Lines changed: 0 additions & 1 deletion
This file was deleted.

‎.github/workflows/bump-version.yml

Copy file name to clipboardExpand all lines: .github/workflows/bump-version.yml
+1-1Lines 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

Copy file name to clipboardExpand all lines: .github/workflows/code-scanning-pack-gen.yml
+2-2Lines changed: 2 additions & 2 deletions
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:
@@ -86,7 +86,7 @@ jobs:
8686
codeql query compile --search-path c --search-path cpp --threads 0 c
8787
8888
cd ..
89-
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/deviations codeql-coding-standards/scripts/reports
89+
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/scripts/shared codeql-coding-standards/scripts/schemas
9090
9191
- name: Upload GHAS Query Pack
9292
uses: actions/upload-artifact@v2

‎.github/workflows/codeql_unit_tests.yml

Copy file name to clipboardExpand all lines: .github/workflows/codeql_unit_tests.yml
+2-2Lines 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

Copy file name to clipboardExpand all lines: .github/workflows/create-draft-release.yml
+1-1Lines 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

Copy file name to clipboardExpand all lines: .github/workflows/generate-html-docs.yml
+1-1Lines 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

Copy file name to clipboardExpand all lines: .github/workflows/standard_library_upgrade_tests.yml
+2-2Lines 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
+91Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: 🧰 Tooling unit tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- "rc/**"
8+
- next
9+
pull_request:
10+
branches:
11+
- main
12+
- "rc/**"
13+
- next
14+
15+
jobs:
16+
prepare-supported-codeql-env-matrix:
17+
name: Prepare supported CodeQL environment matrix
18+
runs-on: ubuntu-latest
19+
outputs:
20+
matrix: ${{ steps.export-supported-codeql-env-matrix.outputs.matrix }}
21+
steps:
22+
- name: Checkout repository
23+
uses: actions/checkout@v2
24+
25+
- name: Export supported CodeQL environment matrix
26+
id: export-supported-codeql-env-matrix
27+
run: |
28+
echo "::set-output name=matrix::$(
29+
jq --compact-output '.supported_environment | {include: .}' supported_codeql_configs.json
30+
)"
31+
32+
analysis-report-tests:
33+
name: Run analysis report tests
34+
needs: prepare-supported-codeql-env-matrix
35+
runs-on: ubuntu-latest
36+
strategy:
37+
fail-fast: false
38+
matrix: ${{ fromJSON(needs.prepare-supported-codeql-env-matrix.outputs.matrix) }}
39+
steps:
40+
- name: Checkout
41+
uses: actions/checkout@v2
42+
43+
- name: Install Python
44+
uses: actions/setup-python@v4
45+
with:
46+
python-version: "3.9"
47+
48+
- name: Install Python dependencies
49+
run: pip install -r scripts/reports/requirements.txt
50+
51+
- name: Cache CodeQL
52+
id: cache-codeql
53+
uses: actions/cache@v2.1.3
54+
with:
55+
path: ${{ github.workspace }}/codeql_home
56+
key: codeql-home-${{ matrix.os }}-${{ matrix.codeql_cli }}-${{ matrix.codeql_standard_library }}
57+
58+
- name: Install CodeQL
59+
if: steps.cache-codeql.outputs.cache-hit != 'true'
60+
uses: ./.github/actions/install-codeql
61+
with:
62+
codeql-cli-version: ${{ matrix.codeql_cli }}
63+
codeql-stdlib-version: ${{ matrix.codeql_standard_library }}
64+
codeql-home: ${{ github.workspace }}/codeql_home
65+
add-to-path: false
66+
67+
- name: Run PyTest
68+
env:
69+
CODEQL_HOME: ${{ github.workspace }}/codeql_home
70+
run: |
71+
PATH=$PATH:$CODEQL_HOME/codeql
72+
pytest scripts/reports/analysis_report_test.py
73+
74+
recategorization-tests:
75+
name: Run Guideline Recategorization tests
76+
runs-on: ubuntu-latest
77+
steps:
78+
- name: Checkout
79+
uses: actions/checkout@v2
80+
81+
- name: Install Python
82+
uses: actions/setup-python@v4
83+
with:
84+
python-version: "3.9"
85+
86+
- name: Install Python dependencies
87+
run: pip install -r scripts/guideline_recategorization/requirements.txt
88+
89+
- name: Run PyTest
90+
run: |
91+
pytest scripts/guideline_recategorization/recategorize_test.py

‎.github/workflows/upgrade_codeql_dependencies.yml

Copy file name to clipboardExpand all lines: .github/workflows/upgrade_codeql_dependencies.yml
+1-1Lines 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

Copy file name to clipboardExpand all lines: .github/workflows/validate-coding-standards.yml
+23-13Lines changed: 23 additions & 13 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
@@ -28,6 +28,15 @@ jobs:
2828
with:
2929
python-version: "3.9"
3030

31+
- name: Install CodeQL
32+
run: |
33+
VERSION="v$( jq -r '.supported_environment | .[0] | .codeql_cli' supported_codeql_configs.json)"
34+
gh extensions install github/gh-codeql
35+
gh codeql set-version "$VERSION"
36+
gh codeql install-stub
37+
env:
38+
GITHUB_TOKEN: ${{ github.token }}
39+
3140
- name: Install generate_package_files.py dependencies
3241
run: pip install -r scripts/requirements.txt
3342

@@ -49,52 +58,53 @@ jobs:
4958
5059
- name: Validate Package Files (CPP)
5160
run: |
52-
find rule_packages/cpp -name \*.json -exec basename {} .json \; | xargs --max-procs "$XARGS_MAX_PROCS" --max-args 1 python scripts/generate_rules/generate_package_files.py cpp
61+
find rule_packages/cpp -name \*.json -exec basename {} .json \; | xargs python scripts/generate_rules/generate_package_files.py cpp
5362
git diff
5463
git diff --compact-summary
5564
git diff --quiet
5665
5766
- name: Validate Package Files (C)
5867
run: |
59-
find rule_packages/c -name \*.json -exec basename {} .json \; | xargs --max-procs "$XARGS_MAX_PROCS" --max-args 1 python scripts/generate_rules/generate_package_files.py c
68+
find rule_packages/c -name \*.json -exec basename {} .json \; | xargs python scripts/generate_rules/generate_package_files.py c
6069
git diff
6170
git diff --compact-summary
6271
git diff --quiet
6372
6473
validate-codeql-format:
6574
name: "Validate CodeQL Format"
66-
runs-on: ubuntu-latest
75+
runs-on: ubuntu-22.04
6776
steps:
6877
- name: Checkout
6978
uses: actions/checkout@v2
7079

71-
- name: Fetch CodeQL
80+
- name: Install CodeQL
7281
run: |
73-
TAG="v$( jq -r '.supported_environment | .[0] | .codeql_cli' supported_codeql_configs.json)"
74-
gh release download $TAG --repo https://github.com/github/codeql-cli-binaries --pattern codeql-linux64.zip
75-
unzip -q codeql-linux64.zip
82+
VERSION="v$( jq -r '.supported_environment | .[0] | .codeql_cli' supported_codeql_configs.json)"
83+
gh extensions install github/gh-codeql
84+
gh codeql set-version "$VERSION"
85+
gh codeql install-stub
7686
env:
7787
GITHUB_TOKEN: ${{ github.token }}
7888

7989
- name: Validate CodeQL Format (CPP)
8090
run: |
81-
find cpp -name \*.ql -or -name \*.qll -print0 | xargs -0 --max-procs "$XARGS_MAX_PROCS" codeql/codeql query format --in-place
91+
find cpp -name \*.ql -or -name \*.qll -print0 | xargs -0 --max-procs "$XARGS_MAX_PROCS" codeql query format --in-place
8292
8393
git diff
8494
git diff --compact-summary
8595
git diff --quiet
8696
8797
- name: Validate CodeQL Format (C)
8898
run: |
89-
find c -name \*.ql -or -name \*.qll -print0 | xargs -0 --max-procs "$XARGS_MAX_PROCS" codeql/codeql query format --in-place
99+
find c -name \*.ql -or -name \*.qll -print0 | xargs -0 --max-procs "$XARGS_MAX_PROCS" codeql query format --in-place
90100
91101
git diff
92102
git diff --compact-summary
93103
git diff --quiet
94104
95105
validate-query-help-files:
96106
name: Validate Query Help Files
97-
runs-on: ubuntu-latest
107+
runs-on: ubuntu-22.04
98108
steps:
99109
- name: Checkout
100110
uses: actions/checkout@v2
@@ -129,7 +139,7 @@ jobs:
129139
130140
validate-cpp-test-files:
131141
name: Validate C++ Test Files
132-
runs-on: ubuntu-latest
142+
runs-on: ubuntu-22.04
133143
steps:
134144
- name: Checkout
135145
uses: actions/checkout@v2
@@ -152,7 +162,7 @@ jobs:
152162
153163
validate-c-test-files:
154164
name: Validate C Test Files
155-
runs-on: ubuntu-latest
165+
runs-on: ubuntu-22.04
156166
steps:
157167
- name: Checkout
158168
uses: actions/checkout@v2
+28Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: ⚙️ Validate Rules CSV
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- "rc/**"
8+
- next
9+
pull_request:
10+
branches:
11+
- main
12+
- "rc/**"
13+
- next
14+
15+
16+
jobs:
17+
validate-rules-csv:
18+
name: Validate Rules CSV
19+
runs-on: ubuntu-22.04
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v2
23+
24+
- name: Check Rules
25+
shell: pwsh
26+
run: scripts/util/Get-DuplicateRules.ps1 -Language 'all' -CIMode
27+
28+

‎.vscode/tasks.json

Copy file name to clipboardExpand all lines: .vscode/tasks.json
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@
185185
"type": "pickString",
186186
"options": [
187187
"Allocations",
188+
"Banned",
188189
"BannedFunctions",
189190
"BannedLibraries",
190191
"BannedSyntax",
@@ -221,6 +222,7 @@
221222
"Iterators",
222223
"Lambdas",
223224
"Language1",
225+
"Language2",
224226
"Literals",
225227
"Loops",
226228
"Macros",
@@ -252,6 +254,7 @@
252254
"Preprocessor3",
253255
"Preprocessor4",
254256
"Preprocessor5",
257+
"Preprocessor6",
255258
"IntegerConversion",
256259
"Expressions",
257260
"DeadCode",

‎c/cert/src/qlpack.yml

Copy file name to clipboard
+1-1Lines 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.12.0-dev
33
suites: codeql-suites
44
libraryPathDependencies: common-c-coding-standards

‎c/cert/src/rules/EXP30-C/DependenceOnOrderOfFunctionArgumentsForSideEffects.ql

Copy file name to clipboardExpand all lines: c/cert/src/rules/EXP30-C/DependenceOnOrderOfFunctionArgumentsForSideEffects.ql
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import codingstandards.c.cert
1616
import codingstandards.cpp.SideEffect
1717
import semmle.code.cpp.dataflow.DataFlow
1818
import semmle.code.cpp.dataflow.TaintTracking
19-
import semmle.code.cpp.valuenumbering.GlobalValueNumberingImpl
19+
import semmle.code.cpp.valuenumbering.GlobalValueNumbering
2020

2121
/** Holds if the function's return value is derived from the `AliasParamter` p. */
2222
predicate returnValueDependsOnAliasParameter(AliasParameter p) {

‎c/cert/test/qlpack.yml

Copy file name to clipboard
+1-1Lines 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.12.0-dev
33
libraryPathDependencies: cert-c-coding-standards
44
extractor: cpp

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.