Skip to content

Commit 0885b1a

Browse files
committed
merged conflicts
2 parents 1161be0 + 8dc56be commit 0885b1a

File tree

254 files changed

+6657
-345
lines changed

Some content is hidden

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

254 files changed

+6657
-345
lines changed

.codeqlmanifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{ "provide": [ "codeql_modules/*/.codeqlmanifest.json", "cpp/.codeqlmanifest.json", "c/.codeqlmanifest.json"] }
1+
{ "provide": [ "cpp/*/src/qlpack.yml", "cpp/*/test/qlpack.yml", "c/*/src/qlpack.yml", "c/*/test/qlpack.yml", "scripts/generate_modules/queries/qlpack.yml" ] }
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Install CodeQL library pack dependencies
2+
description: |
3+
Downloads any necessary CodeQL library packs needed by packs in the repo.
4+
inputs:
5+
cli_path:
6+
description: |
7+
The path to the CodeQL CLI directory.
8+
required: false
9+
10+
mode:
11+
description: |
12+
The `--mode` option to `codeql pack install`.
13+
required: true
14+
default: verify
15+
16+
runs:
17+
using: composite
18+
steps:
19+
- name: Install CodeQL library packs
20+
shell: bash
21+
env:
22+
CODEQL_CLI: ${{ inputs.cli_path }}
23+
run: |
24+
PATH=$PATH:$CODEQL_CLI
25+
python scripts/install-packs.py --mode ${{ inputs.mode }}

.github/workflows/bump-version.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,5 @@ jobs:
2727
title: "Release Engineering: Version bump to ${{ github.event.inputs.new_version }}."
2828
body: "This PR updates codeql-coding-standards to version ${{ github.event.inputs.new_version }}."
2929
commit-message: "Version bump to ${{ github.event.inputs.new_version }}."
30-
team-reviewers: github/codeql-coding-standards
3130
delete-branch: true
3231
branch: "automation/version-bump-${{ github.event.inputs.new_version }}"

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Code Scanning Query Pack Generation
22

33
on:
4+
merge_group:
45
pull_request:
56
branches:
67
- main
@@ -59,6 +60,11 @@ jobs:
5960
codeql-home: ${{ github.workspace }}/codeql_home
6061
add-to-path: false
6162

63+
- name: Install CodeQL packs
64+
uses: ./.github/actions/install-codeql-packs
65+
with:
66+
cli_path: ${{ github.workspace }}/codeql_home/codeql
67+
6268
- name: Checkout external help files
6369
continue-on-error: true
6470
id: checkout-external-help-files
@@ -82,8 +88,8 @@ jobs:
8288
run: |
8389
PATH=$PATH:$CODEQL_HOME/codeql
8490
85-
codeql query compile --search-path cpp --threads 0 cpp
86-
codeql query compile --search-path c --search-path cpp --threads 0 c
91+
codeql query compile --threads 0 cpp
92+
codeql query compile --threads 0 c
8793
8894
cd ..
8995
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

.github/workflows/codeql_unit_tests.yml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: CodeQL Unit Testing
22

33
on:
4+
merge_group:
45
push:
56
branches:
67
- main
@@ -47,6 +48,9 @@ jobs:
4748
uses: actions/setup-python@v4
4849
with:
4950
python-version: "3.9"
51+
52+
- name: Install Python dependencies
53+
run: pip install -r scripts/requirements.txt
5054

5155
- name: Cache CodeQL
5256
id: cache-codeql
@@ -66,11 +70,15 @@ jobs:
6670
codeql-home: ${{ github.workspace }}/codeql_home
6771
add-to-path: false
6872

73+
- name: Install CodeQL packs
74+
uses: ./.github/actions/install-codeql-packs
75+
with:
76+
cli_path: ${{ github.workspace }}/codeql_home/codeql
77+
6978
- name: Pre-Compile Queries
7079
id: pre-compile-queries
7180
run: |
72-
${{ github.workspace }}/codeql_home/codeql/codeql query compile --search-path cpp --threads 0 cpp
73-
${{ github.workspace }}/codeql_home/codeql/codeql query compile --search-path c --search-path cpp --threads 0 c
81+
${{ github.workspace }}/codeql_home/codeql/codeql query compile --threads 0 ${{ matrix.language }}
7482
7583
7684
- name: Run test suites
@@ -122,18 +130,11 @@ jobs:
122130
os.makedirs(os.path.dirname(test_report_path), exist_ok=True)
123131
test_report_file = open(test_report_path, 'w')
124132
files_to_close.append(test_report_file)
125-
if "${{ matrix.language }}".casefold() == "c".casefold():
126-
# c tests require cpp -- but we don't want c things on the cpp
127-
# path in case of design errors.
128-
cpp_language_root = Path(workspace, 'cpp')
129-
procs.append(subprocess.Popen([codeql_bin, "test", "run", "--failing-exitcode=122", f"--slice={slice}/{num_slices}", "--ram=2048", "--format=json", f'--search-path={cpp_language_root}', f'--search-path={language_root}', *test_roots], stdout=test_report_file, stderr=subprocess.PIPE))
130-
else:
131-
procs.append(subprocess.Popen([codeql_bin, "test", "run", "--failing-exitcode=122", f"--slice={slice}/{num_slices}", "--ram=2048", "--format=json", f'--search-path={language_root}', f'--search-path={language_root}', *test_roots], stdout=test_report_file, stderr=subprocess.PIPE))
133+
procs.append(subprocess.Popen([codeql_bin, "test", "run", "--failing-exitcode=122", f"--slice={slice}/{num_slices}", "--ram=2048", "--format=json", *test_roots], stdout=test_report_file, stderr=subprocess.PIPE))
132134
133135
for p in procs:
134-
p.wait()
136+
_, err = p.communicate()
135137
if p.returncode != 0:
136-
_, err = p.communicate()
137138
if p.returncode == 122:
138139
# Failed because a test case failed, so just print the regular output.
139140
# This will allow us to proceed to validate-test-results, which will fail if

.github/workflows/create-draft-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
inputs:
66
release_version_tag:
77
description: |
8-
The tag for the new draft release, e.g. v0.5.1.
8+
The tag for the new draft release, e.g. 0.5.1 - do not include the `v`.
99
required: true
1010
codeql_analysis_threads:
1111
description: |

.github/workflows/dispatch-matrix-check.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
name: 🤖 Run Matrix Check
22

33
on:
4-
pull_request:
4+
pull_request_target:
5+
types: [synchronize,opened]
56
branches:
67
- "**"
78
workflow_dispatch:
@@ -11,7 +12,13 @@ jobs:
1112
runs-on: ubuntu-latest
1213
steps:
1314

15+
- name: Test Variables
16+
shell: pwsh
17+
run: |
18+
Write-Host "Running as: ${{github.actor}}"
19+
1420
- name: Dispatch Matrix Testing Job
21+
if: ${{ contains(fromJSON('["jsinglet", "mbaluda", "lcartey", "rvermeulen", "ravikprasad", "jeongsoolee09", "hohn", "knewbury01", "kraiouchkine"]'), github.actor) }}
1522
uses: peter-evans/repository-dispatch@v2
1623
with:
1724
token: ${{ secrets.RELEASE_ENGINEERING_TOKEN }}
@@ -21,6 +28,7 @@ jobs:
2128

2229

2330
- uses: actions/github-script@v6
31+
if: ${{ contains(fromJSON('["jsinglet", "mbaluda", "lcartey", "rvermeulen", "ravikprasad", "jeongsoolee09", "hohn", "knewbury01", "kraiouchkine"]'), github.actor) }}
2432
with:
2533
script: |
2634
github.rest.issues.createComment({

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

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,27 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515

16+
- name: Test Variables
17+
shell: pwsh
18+
run: |
19+
Write-Host "Running as: ${{github.actor}}"
20+
21+
$actor = "${{github.actor}}"
22+
23+
$acl = @("jsinglet","mbaluda", "lcartey", "rvermeulen", "ravikprasad", "jeongsoolee09", "hohn", "knewbury01", "kraiouchkine")
24+
25+
if(-not ($actor -in $acl)){
26+
throw "Refusing to run workflow for user not in acl."
27+
}
28+
1629
- name: Dispatch Performance Testing Job
1730
if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, '/test-performance') }}
1831
uses: peter-evans/repository-dispatch@v2
1932
with:
2033
token: ${{ secrets.RELEASE_ENGINEERING_TOKEN }}
2134
repository: github/codeql-coding-standards-release-engineering
2235
event-type: performance-test
23-
client-payload: '{"pr": "${{ github.event.number }}"}'
36+
client-payload: '{"pr": "${{ github.event.issue.number }}"}'
2437

2538

2639
- uses: actions/github-script@v6

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: ⚙️ Extra Rule Validation
22

33
on:
4+
merge_group:
45
push:
56
branches:
67
- main

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Generate HTML documentation
22

33
on:
4+
merge_group:
45
push:
56
branches:
67
- main

0 commit comments

Comments
 (0)