Skip to content

Commit 73ac82c

Browse files
committed
Release v2.3.0
1 parent 9fd472d commit 73ac82c

File tree

385 files changed

+5784
-1678
lines changed

Some content is hidden

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

385 files changed

+5784
-1678
lines changed

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

-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ jobs:
105105
mkdir -p "$query_dir"
106106
# Copy each selected ql file, plus the related files (qhelp, qhelp implementation)
107107
cp "$copy_from_root_name.ql" "lgtm-cpp-query-pack/$copy_to_root_name.ql"
108-
cp "$copy_from_root_name-implementation.qhelp" "lgtm-cpp-query-pack/$copy_to_root_name-implementation.qhelp"
109108
cp "$copy_from_root_name.qhelp" "lgtm-cpp-query-pack/$copy_to_root_name.qhelp"
110109
done
111110
}

.github/workflows/codeql_unit_tests.yml

+19-4
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,13 @@ jobs:
6565
codeql-home: ${{ github.workspace }}/codeql_home
6666
add-to-path: false
6767

68+
- name: Pre-Compile Queries
69+
id: pre-compile-queries
70+
run: |
71+
${{ github.workspace }}/codeql_home/codeql/codeql query compile --search-path cpp --threads 0 cpp
72+
${{ github.workspace }}/codeql_home/codeql/codeql query compile --search-path c --search-path cpp --threads 0 c
73+
74+
6875
- name: Run test suites
6976
id: run-test-suites
7077
env:
@@ -108,12 +115,20 @@ jobs:
108115
# XL runners have 8 cores, so split the tests into 8 "slices", and run one per thread
109116
num_slices = 8
110117
procs = []
118+
111119
for slice in range(1, num_slices+1):
112120
test_report_path = os.path.join(runner_temp, "${{ matrix.language }}", f"test_report_{runner_os}_{cli_version}_{stdlib_ref_ident}_slice_{slice}_of_{num_slices}.json")
113121
os.makedirs(os.path.dirname(test_report_path), exist_ok=True)
114122
test_report_file = open(test_report_path, 'w')
115123
files_to_close.append(test_report_file)
116-
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}', *test_roots], stdout=test_report_file, stderr=subprocess.PIPE))
124+
if "${{ matrix.language }}".casefold() == "c".casefold():
125+
# c tests require cpp -- but we don't want c things on the cpp
126+
# path in case of design errors.
127+
cpp_language_root = Path(workspace, 'cpp')
128+
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))
129+
else:
130+
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))
131+
117132
for p in procs:
118133
p.wait()
119134
if p.returncode != 0:
@@ -133,7 +148,7 @@ jobs:
133148
- name: Upload test results
134149
uses: actions/upload-artifact@v2
135150
with:
136-
name: test-results-${{ runner.os }}-${{ matrix.codeql_cli }}-${{ matrix.codeql_standard_library_ident }}
151+
name: ${{ matrix.language }}-test-results-${{ runner.os }}-${{ matrix.codeql_cli }}-${{ matrix.codeql_standard_library_ident }}
137152
path: |
138153
${{ runner.temp }}/${{ matrix.language }}/test_report_${{ runner.os }}_${{ matrix.codeql_cli }}_${{ matrix.codeql_standard_library_ident }}_slice_*.json
139154
if-no-files-found: error
@@ -148,11 +163,11 @@ jobs:
148163

149164
- name: Validate test results
150165
run: |
151-
for json_report in test-results-*/test_report_*
166+
for json_report in *-test-results-*/test_report_*
152167
do
153168
jq --raw-output '"PASS \(map(select(.pass == true)) | length)/\(length)'" $json_report\"" "$json_report"
154169
done
155-
FAILING_TESTS=$(jq --raw-output '.[] | select(.pass == false)' test-results-*/test_report_*.json)
170+
FAILING_TESTS=$(jq --raw-output '.[] | select(.pass == false)' *-test-results-*/test_report_*.json)
156171
if [[ ! -z "$FAILING_TESTS" ]]; then
157172
echo "ERROR: The following tests failed:"
158173
echo $FAILING_TESTS | jq .

.vscode/tasks.json

+23-22
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
},
1313
"problemMatcher": []
1414
},
15-
1615
{
1716
"label": "🔃 Standards Automation: Switch To Test or Implementation",
1817
"type": "shell",
@@ -23,7 +22,6 @@
2322
},
2423
"problemMatcher": []
2524
},
26-
2725
{
2826
"label": "Standards Automation: Install Deps",
2927
"type": "shell",
@@ -165,49 +163,52 @@
165163
"type": "pickString",
166164
"options": [
167165
"Allocations",
166+
"BannedFunctions",
168167
"BannedSyntax",
169168
"BannedTypes",
170-
"BannedFunctions",
169+
"Classes",
170+
"Classes",
171171
"Classes",
172172
"Comments",
173173
"Concurrency",
174+
"Conditionals",
174175
"Const",
176+
"DeadCode",
175177
"Declarations",
176178
"Exceptions1",
177179
"Exceptions2",
180+
"Expressions",
181+
"Freed",
182+
"Functions",
183+
"IO",
178184
"Includes",
185+
"Initialization",
186+
"IntegerConversion",
179187
"Invariants",
180-
"IO",
181188
"Iterators",
189+
"Lambdas",
182190
"Literals",
183191
"Loops",
184192
"Macros",
193+
"Misc",
194+
"MoveForward",
185195
"Naming",
196+
"Null",
197+
"OperatorInvariants",
198+
"Operators",
199+
"Pointers",
186200
"Scope",
187-
"Classes",
188-
"SmartPointers1",
189-
"SmartPointers2",
190201
"SideEffects1",
191202
"SideEffects2",
203+
"SmartPointers1",
204+
"SmartPointers2",
192205
"Strings",
206+
"Strings1",
207+
"Strings2",
193208
"Syntax",
194209
"Templates",
195-
"Classes",
196-
"Freed",
197-
"Initialization",
198-
"Functions",
199-
"Null",
200-
"OperatorInvariants",
201-
"VirtualFunctions",
202-
"Conditionals",
203-
"MoveForward",
204-
"Operators",
205210
"TypeRanges",
206-
"Lambdas",
207-
"Pointers",
208-
"IntegerConversion",
209-
"Expressions",
210-
"DeadCode"
211+
"VirtualFunctions"
211212
]
212213
},
213214
{

c/cert/src/qlpack.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
name: cert-c-coding-standards
2-
version: 2.1.0
2+
version: 2.3.0
33
suites: codeql-suites
44
libraryPathDependencies: common-c-coding-standards

c/cert/src/rules/EXP30-C/DependenceOnOrderOfFunctionArgumentsForSideEffects-implementation.qhelp

-8
This file was deleted.

0 commit comments

Comments
 (0)