Skip to content

Commit 2ee09cc

Browse files
committed
Merge branch 'main' into import-refined
2 parents 93c9f59 + c56c1cb commit 2ee09cc

File tree

2,604 files changed

+136544
-218224
lines changed

Some content is hidden

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

2,604 files changed

+136544
-218224
lines changed

.git-blame-ignore-revs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# .git-blame-ignore-revs
2+
# Auto-formatted Java
3+
730eae952139209fe9fdf598541d608f4c0c0c84
4+
# Auto-formatted C#
5+
5ad7ed49dd3de03ec6dcfcb6848758a6a987e11c
6+
# Auto-formatted C/C++
7+
ef97e539ec1971494d4bba5cafe82e00bc8217ac
8+
# Auto-formatted Python
9+
21d5fa836b3a7d020ba45e8b8168b145a9772131
10+
# Auto-formatted JavaScript
11+
8d97fe9ed327a9546ff2eaf515cf0f5214deddd9
12+
# Auto-formatted Ruby
13+
a5d229903d2f12d45f2c2c38822f1d0e7504ae7f
14+
# Auto-formatted Go
15+
08c658e66bf867090033ea096e244a93d46c0aa7
16+
# Auto-formatted Swift
17+
711d7057f79fb7d72fc3b35e010bd018f9009169
18+
# Auto-formatted shared ql packs
19+
3640b6d3a8ce9edf8e1d3ed106fe8526cf255bc0
20+
# Auto-formatted taint tracking files
21+
159d8e978c51959b380838c080d891b66e763b19

.github/workflows/go-tests-other-os.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: macos-latest
1414
steps:
1515
- name: Set up Go 1.20
16-
uses: actions/setup-go@v3
16+
uses: actions/setup-go@v4
1717
with:
1818
go-version: 1.20.0
1919
id: go
@@ -48,7 +48,7 @@ jobs:
4848
runs-on: windows-latest-xl
4949
steps:
5050
- name: Set up Go 1.20
51-
uses: actions/setup-go@v3
51+
uses: actions/setup-go@v4
5252
with:
5353
go-version: 1.20.0
5454
id: go

.github/workflows/go-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
runs-on: ubuntu-latest-xl
2222
steps:
2323
- name: Set up Go 1.20
24-
uses: actions/setup-go@v3
24+
uses: actions/setup-go@v4
2525
with:
2626
go-version: 1.20.0
2727
id: go

.github/workflows/ruby-build.yml

Lines changed: 32 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -55,35 +55,35 @@ jobs:
5555
id: cache-extractor
5656
with:
5757
path: |
58-
ruby/target/release/ruby-autobuilder
59-
ruby/target/release/ruby-autobuilder.exe
60-
ruby/target/release/ruby-extractor
61-
ruby/target/release/ruby-extractor.exe
62-
ruby/ql/lib/codeql/ruby/ast/internal/TreeSitter.qll
63-
key: ${{ runner.os }}-${{ steps.os_version.outputs.version }}-ruby-extractor-${{ hashFiles('ruby/rust-toolchain.toml', 'ruby/**/Cargo.lock') }}--${{ hashFiles('ruby/**/*.rs') }}
58+
ruby/extractor/target/release/autobuilder
59+
ruby/extractor/target/release/autobuilder.exe
60+
ruby/extractor/target/release/extractor
61+
ruby/extractor/target/release/extractor.exe
62+
ruby/extractor/ql/lib/codeql/ruby/ast/internal/TreeSitter.qll
63+
key: ${{ runner.os }}-${{ steps.os_version.outputs.version }}-ruby-extractor-${{ hashFiles('ruby/extractor/rust-toolchain.toml', 'ruby/extractor/Cargo.lock') }}--${{ hashFiles('ruby/extractor/**/*.rs') }}
6464
- uses: actions/cache@v3
6565
if: steps.cache-extractor.outputs.cache-hit != 'true'
6666
with:
6767
path: |
6868
~/.cargo/registry
6969
~/.cargo/git
7070
ruby/target
71-
key: ${{ runner.os }}-${{ steps.os_version.outputs.version }}-ruby-rust-cargo-${{ hashFiles('ruby/rust-toolchain.toml', 'ruby/**/Cargo.lock') }}
71+
key: ${{ runner.os }}-${{ steps.os_version.outputs.version }}-ruby-rust-cargo-${{ hashFiles('ruby/extractor/rust-toolchain.toml', 'ruby/extractor/**/Cargo.lock') }}
7272
- name: Check formatting
7373
if: steps.cache-extractor.outputs.cache-hit != 'true'
74-
run: cargo fmt --all -- --check
74+
run: cd extractor && cargo fmt --all -- --check
7575
- name: Build
7676
if: steps.cache-extractor.outputs.cache-hit != 'true'
77-
run: cargo build --verbose
77+
run: cd extractor && cargo build --verbose
7878
- name: Run tests
7979
if: steps.cache-extractor.outputs.cache-hit != 'true'
80-
run: cargo test --verbose
80+
run: cd extractor && cargo test --verbose
8181
- name: Release build
8282
if: steps.cache-extractor.outputs.cache-hit != 'true'
83-
run: cargo build --release
83+
run: cd extractor && cargo build --release
8484
- name: Generate dbscheme
8585
if: ${{ matrix.os == 'ubuntu-latest' && steps.cache-extractor.outputs.cache-hit != 'true'}}
86-
run: target/release/ruby-generator --dbscheme ql/lib/ruby.dbscheme --library ql/lib/codeql/ruby/ast/internal/TreeSitter.qll
86+
run: extractor/target/release/generator --dbscheme ql/lib/ruby.dbscheme --library ql/lib/codeql/ruby/ast/internal/TreeSitter.qll
8787
- uses: actions/upload-artifact@v3
8888
if: ${{ matrix.os == 'ubuntu-latest' }}
8989
with:
@@ -98,10 +98,10 @@ jobs:
9898
with:
9999
name: extractor-${{ matrix.os }}
100100
path: |
101-
ruby/target/release/ruby-autobuilder
102-
ruby/target/release/ruby-autobuilder.exe
103-
ruby/target/release/ruby-extractor
104-
ruby/target/release/ruby-extractor.exe
101+
ruby/extractor/target/release/autobuilder
102+
ruby/extractor/target/release/autobuilder.exe
103+
ruby/extractor/target/release/extractor
104+
ruby/extractor/target/release/extractor.exe
105105
retention-days: 1
106106
compile-queries:
107107
runs-on: ubuntu-latest-xl
@@ -116,21 +116,22 @@ jobs:
116116
key: ruby-build
117117
- name: Build Query Pack
118118
run: |
119-
rm -rf target/packs
120-
codeql pack create ../misc/suite-helpers --output target/packs
121-
codeql pack create ../shared/regex --output target/packs
122-
codeql pack create ../shared/ssa --output target/packs
123-
codeql pack create ../shared/tutorial --output target/packs
124-
codeql pack create ql/lib --output target/packs
125-
codeql pack create -j0 ql/src --output target/packs --compilation-cache "${{ steps.query-cache.outputs.cache-dir }}"
126-
PACK_FOLDER=$(readlink -f target/packs/codeql/ruby-queries/*)
119+
PACKS=${{ runner.temp }}/query-packs
120+
rm -rf $PACKS
121+
codeql pack create ../misc/suite-helpers --output "$PACKS"
122+
codeql pack create ../shared/regex --output "$PACKS"
123+
codeql pack create ../shared/ssa --output "$PACKS"
124+
codeql pack create ../shared/tutorial --output "$PACKS"
125+
codeql pack create ql/lib --output "$PACKS"
126+
codeql pack create -j0 ql/src --output "$PACKS" --compilation-cache "${{ steps.query-cache.outputs.cache-dir }}"
127+
PACK_FOLDER=$(readlink -f "$PACKS"/codeql/ruby-queries/*)
127128
codeql generate query-help --format=sarifv2.1.0 --output="${PACK_FOLDER}/rules.sarif" ql/src
128129
(cd ql/src; find queries \( -name '*.qhelp' -o -name '*.rb' -o -name '*.erb' \) -exec bash -c 'mkdir -p "'"${PACK_FOLDER}"'/$(dirname "{}")"' \; -exec cp "{}" "${PACK_FOLDER}/{}" \;)
129130
- uses: actions/upload-artifact@v3
130131
with:
131132
name: codeql-ruby-queries
132133
path: |
133-
ruby/target/packs/*
134+
${{ runner.temp }}/query-packs/*
134135
retention-days: 1
135136

136137
package:
@@ -158,12 +159,12 @@ jobs:
158159
mkdir -p ruby
159160
cp -r codeql-extractor.yml tools ql/lib/ruby.dbscheme.stats ruby/
160161
mkdir -p ruby/tools/{linux64,osx64,win64}
161-
cp linux64/ruby-autobuilder ruby/tools/linux64/autobuilder
162-
cp osx64/ruby-autobuilder ruby/tools/osx64/autobuilder
163-
cp win64/ruby-autobuilder.exe ruby/tools/win64/autobuilder.exe
164-
cp linux64/ruby-extractor ruby/tools/linux64/extractor
165-
cp osx64/ruby-extractor ruby/tools/osx64/extractor
166-
cp win64/ruby-extractor.exe ruby/tools/win64/extractor.exe
162+
cp linux64/autobuilder ruby/tools/linux64/autobuilder
163+
cp osx64/autobuilder ruby/tools/osx64/autobuilder
164+
cp win64/autobuilder.exe ruby/tools/win64/autobuilder.exe
165+
cp linux64/extractor ruby/tools/linux64/extractor
166+
cp osx64/extractor ruby/tools/osx64/extractor
167+
cp win64/extractor.exe ruby/tools/win64/extractor.exe
167168
chmod +x ruby/tools/{linux64,osx64}/{autobuilder,extractor}
168169
zip -rq codeql-ruby.zip ruby
169170
- uses: actions/upload-artifact@v3

CODEOWNERS

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
/csharp/ @github/codeql-csharp
33
/go/ @github/codeql-go
44
/java/ @github/codeql-java
5-
/javascript/ @github/codeql-dynamic
6-
/python/ @github/codeql-dynamic
7-
/ruby/ @github/codeql-dynamic
5+
/javascript/ @github/codeql-javascript
6+
/python/ @github/codeql-python
7+
/ruby/ @github/codeql-ruby
88
/swift/ @github/codeql-swift
99
/misc/codegen/ @github/codeql-swift
1010
/java/kotlin-extractor/ @github/codeql-kotlin

config/identical-files.json

Lines changed: 43 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,86 @@
11
{
22
"DataFlow Java/C++/C#/Go/Python/Ruby/Swift": [
3+
"java/ql/lib/semmle/code/java/dataflow/internal/DataFlow.qll",
4+
"cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlow.qll",
5+
"cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlow.qll",
6+
"csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlow.qll",
7+
"go/ql/lib/semmle/go/dataflow/internal/DataFlow.qll",
8+
"python/ql/lib/semmle/python/dataflow/new/internal/DataFlow.qll",
9+
"ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlow.qll",
10+
"swift/ql/lib/codeql/swift/dataflow/internal/DataFlow.qll"
11+
],
12+
"DataFlowImpl Java/C++/C#/Go/Python/Ruby/Swift": [
313
"java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl.qll",
14+
"cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl.qll",
15+
"cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl.qll",
16+
"csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl.qll",
17+
"go/ql/lib/semmle/go/dataflow/internal/DataFlowImpl.qll",
18+
"python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl.qll",
19+
"ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImpl.qll",
20+
"swift/ql/lib/codeql/swift/dataflow/internal/DataFlowImpl.qll"
21+
],
22+
"DataFlow Java/C++/C#/Go/Python/Ruby/Swift Legacy Configuration": [
23+
"java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl1.qll",
424
"java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl2.qll",
525
"java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl3.qll",
626
"java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl4.qll",
727
"java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl5.qll",
828
"java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl6.qll",
9-
"java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImplForSerializability.qll",
10-
"java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImplForOnActivityResult.qll",
11-
"cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl.qll",
29+
"cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl1.qll",
1230
"cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl2.qll",
1331
"cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl3.qll",
1432
"cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl4.qll",
1533
"cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImplLocal.qll",
16-
"cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl.qll",
34+
"cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl1.qll",
1735
"cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl2.qll",
1836
"cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl3.qll",
1937
"cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl4.qll",
20-
"cpp/ql/lib/experimental/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl.qll",
21-
"cpp/ql/lib/experimental/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl2.qll",
22-
"cpp/ql/lib/experimental/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl3.qll",
23-
"cpp/ql/lib/experimental/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl4.qll",
24-
"csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl.qll",
38+
"csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl1.qll",
2539
"csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl2.qll",
2640
"csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl3.qll",
2741
"csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl4.qll",
2842
"csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl5.qll",
2943
"csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImplForContentDataFlow.qll",
30-
"go/ql/lib/semmle/go/dataflow/internal/DataFlowImpl.qll",
44+
"go/ql/lib/semmle/go/dataflow/internal/DataFlowImpl1.qll",
3145
"go/ql/lib/semmle/go/dataflow/internal/DataFlowImpl2.qll",
3246
"go/ql/lib/semmle/go/dataflow/internal/DataFlowImplForStringsNewReplacer.qll",
33-
"python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl.qll",
47+
"python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl1.qll",
3448
"python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl2.qll",
3549
"python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl3.qll",
3650
"python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl4.qll",
3751
"python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImplForRegExp.qll",
38-
"ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImpl.qll",
52+
"ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImpl1.qll",
3953
"ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImpl2.qll",
4054
"ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImplForHttpClientLibraries.qll",
4155
"ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImplForPathname.qll",
42-
"swift/ql/lib/codeql/swift/dataflow/internal/DataFlowImpl.qll"
56+
"swift/ql/lib/codeql/swift/dataflow/internal/DataFlowImpl1.qll"
4357
],
4458
"DataFlow Java/C++/C#/Go/Python/Ruby/Swift Common": [
4559
"java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImplCommon.qll",
4660
"cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImplCommon.qll",
4761
"cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImplCommon.qll",
48-
"cpp/ql/lib/experimental/semmle/code/cpp/ir/dataflow/internal/DataFlowImplCommon.qll",
4962
"csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImplCommon.qll",
5063
"go/ql/lib/semmle/go/dataflow/internal/DataFlowImplCommon.qll",
5164
"python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImplCommon.qll",
5265
"ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImplCommon.qll",
5366
"swift/ql/lib/codeql/swift/dataflow/internal/DataFlowImplCommon.qll"
5467
],
55-
"TaintTracking::Configuration Java/C++/C#/Go/Python/Ruby/Swift": [
68+
"TaintTracking Java/C++/C#/Go/Python/Ruby/Swift": [
69+
"cpp/ql/lib/semmle/code/cpp/dataflow/internal/tainttracking1/TaintTracking.qll",
70+
"cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/tainttracking1/TaintTracking.qll",
71+
"csharp/ql/lib/semmle/code/csharp/dataflow/internal/tainttracking1/TaintTracking.qll",
72+
"go/ql/lib/semmle/go/dataflow/internal/tainttracking1/TaintTracking.qll",
73+
"java/ql/lib/semmle/code/java/dataflow/internal/tainttracking1/TaintTracking.qll",
74+
"python/ql/lib/semmle/python/dataflow/new/internal/tainttracking1/TaintTracking.qll",
75+
"ruby/ql/lib/codeql/ruby/dataflow/internal/tainttracking1/TaintTracking.qll",
76+
"swift/ql/lib/codeql/swift/dataflow/internal/tainttracking1/TaintTracking.qll"
77+
],
78+
"TaintTracking Legacy Configuration Java/C++/C#/Go/Python/Ruby/Swift": [
5679
"cpp/ql/lib/semmle/code/cpp/dataflow/internal/tainttracking1/TaintTrackingImpl.qll",
5780
"cpp/ql/lib/semmle/code/cpp/dataflow/internal/tainttracking2/TaintTrackingImpl.qll",
5881
"cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/tainttracking1/TaintTrackingImpl.qll",
5982
"cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/tainttracking2/TaintTrackingImpl.qll",
6083
"cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/tainttracking3/TaintTrackingImpl.qll",
61-
"cpp/ql/lib/experimental/semmle/code/cpp/ir/dataflow/internal/tainttracking1/TaintTrackingImpl.qll",
62-
"cpp/ql/lib/experimental/semmle/code/cpp/ir/dataflow/internal/tainttracking2/TaintTrackingImpl.qll",
63-
"cpp/ql/lib/experimental/semmle/code/cpp/ir/dataflow/internal/tainttracking3/TaintTrackingImpl.qll",
6484
"csharp/ql/lib/semmle/code/csharp/dataflow/internal/tainttracking1/TaintTrackingImpl.qll",
6585
"csharp/ql/lib/semmle/code/csharp/dataflow/internal/tainttracking2/TaintTrackingImpl.qll",
6686
"csharp/ql/lib/semmle/code/csharp/dataflow/internal/tainttracking3/TaintTrackingImpl.qll",
@@ -82,7 +102,6 @@
82102
"java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImplConsistency.qll",
83103
"cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImplConsistency.qll",
84104
"cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImplConsistency.qll",
85-
"cpp/ql/lib/experimental/semmle/code/cpp/ir/dataflow/internal/DataFlowImplConsistency.qll",
86105
"csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImplConsistency.qll",
87106
"python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImplConsistency.qll",
88107
"ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImplConsistency.qll",
@@ -260,6 +279,11 @@
260279
"cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/IRBlockImports.qll",
261280
"cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/internal/IRBlockImports.qll"
262281
],
282+
"C++ IR IRConsistencyImports": [
283+
"cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/IRConsistencyImports.qll",
284+
"cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/IRConsistencyImports.qll",
285+
"cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/internal/IRConsistencyImports.qll"
286+
],
263287
"C++ IR IRFunctionImports": [
264288
"cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/IRFunctionImports.qll",
265289
"cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/IRFunctionImports.qll",

cpp/autobuilder/Semmle.Autobuild.Cpp.Tests/BuildScripts.cs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using Xunit;
22
using Semmle.Autobuild.Shared;
3+
using Semmle.Util;
34
using System.Collections.Generic;
45
using System;
56
using System.Linq;
@@ -75,6 +76,15 @@ int IBuildActions.RunProcess(string cmd, string args, string? workingDirectory,
7576
throw new ArgumentException("Missing RunProcess " + pattern);
7677
}
7778

79+
int IBuildActions.RunProcess(string cmd, string args, string? workingDirectory, IDictionary<string, string>? env, BuildOutputHandler onOutput, BuildOutputHandler onError)
80+
{
81+
var ret = (this as IBuildActions).RunProcess(cmd, args, workingDirectory, env, out var stdout);
82+
83+
stdout.ForEach(line => onOutput(line));
84+
85+
return ret;
86+
}
87+
7888
public IList<string> DirectoryDeleteIn = new List<string>();
7989

8090
void IBuildActions.DirectoryDelete(string dir, bool recursive)
@@ -184,6 +194,15 @@ public void DownloadFile(string address, string fileName)
184194
if (!DownloadFiles.Contains((address, fileName)))
185195
throw new ArgumentException($"Missing DownloadFile, {address}, {fileName}");
186196
}
197+
198+
public IDiagnosticsWriter CreateDiagnosticsWriter(string filename) => new TestDiagnosticWriter();
199+
}
200+
201+
internal class TestDiagnosticWriter : IDiagnosticsWriter
202+
{
203+
public IList<DiagnosticMessage> Diagnostics { get; } = new List<DiagnosticMessage>();
204+
205+
public void AddEntry(DiagnosticMessage message) => this.Diagnostics.Add(message);
187206
}
188207

189208
/// <summary>
@@ -243,6 +262,7 @@ CppAutobuilder CreateAutoBuilder(bool isWindows,
243262
Actions.GetEnvironmentVariable[$"CODEQL_EXTRACTOR_{codeqlUpperLanguage}_TRAP_DIR"] = "";
244263
Actions.GetEnvironmentVariable[$"CODEQL_EXTRACTOR_{codeqlUpperLanguage}_SOURCE_ARCHIVE_DIR"] = "";
245264
Actions.GetEnvironmentVariable[$"CODEQL_EXTRACTOR_{codeqlUpperLanguage}_ROOT"] = $@"C:\codeql\{codeqlUpperLanguage.ToLowerInvariant()}";
265+
Actions.GetEnvironmentVariable[$"CODEQL_EXTRACTOR_{codeqlUpperLanguage}_DIAGNOSTIC_DIR"] = "";
246266
Actions.GetEnvironmentVariable["CODEQL_JAVA_HOME"] = @"C:\codeql\tools\java";
247267
Actions.GetEnvironmentVariable["CODEQL_PLATFORM"] = "win64";
248268
Actions.GetEnvironmentVariable["SEMMLE_DIST"] = @"C:\odasa";

cpp/autobuilder/Semmle.Autobuild.Cpp/CppAutobuilder.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using Semmle.Autobuild.Shared;
2+
using Semmle.Util;
23

34
namespace Semmle.Autobuild.Cpp
45
{
@@ -21,7 +22,7 @@ public CppAutobuildOptions(IBuildActions actions) : base(actions)
2122

2223
public class CppAutobuilder : Autobuilder<CppAutobuildOptions>
2324
{
24-
public CppAutobuilder(IBuildActions actions, CppAutobuildOptions options) : base(actions, options) { }
25+
public CppAutobuilder(IBuildActions actions, CppAutobuildOptions options) : base(actions, options, new DiagnosticClassifier()) { }
2526

2627
public override BuildScript GetBuildScript()
2728
{

cpp/ql/lib/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.5.4
2+
3+
No user-facing changes.
4+
15
## 0.5.3
26

37
No user-facing changes.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
category: breaking
3+
---
4+
* The internal `SsaConsistency` module has been moved from `SSAConstruction` to `SSAConsitency`, and the deprecated `SSAConsistency` module has been removed.

0 commit comments

Comments
 (0)