Skip to content

Commit 58e4861

Browse files
committed
Merge branch 'main' into rc/3.7
2 parents 01a043d + b49487c commit 58e4861

File tree

2,309 files changed

+133477
-42938
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,309 files changed

+133477
-42938
lines changed

.bazelrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
build --repo_env=CC=clang --repo_env=CXX=clang++ --copt="-std=c++17"
1+
build --repo_env=CC=clang --repo_env=CXX=clang++ --cxxopt="-std=c++17"
22

33
try-import %workspace%/local.bazelrc

.github/workflows/check-qldoc.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ jobs:
2727
run: |
2828
EXIT_CODE=0
2929
# TODO: remove the swift exception from the regex when we fix generated QLdoc
30-
changed_lib_packs="$(git diff --name-only --diff-filter=ACMRT HEAD^ HEAD | { grep -Po '^(?!swift)[a-z]*/ql/lib' || true; } | sort -u)"
30+
# TODO: remove the shared exception from the regex when coverage of qlpacks without dbschemes is supported
31+
changed_lib_packs="$(git diff --name-only --diff-filter=ACMRT HEAD^ HEAD | { grep -Po '^(?!(swift|shared))[a-z]*/ql/lib' || true; } | sort -u)"
3132
for pack_dir in ${changed_lib_packs}; do
3233
lang="${pack_dir%/ql/lib}"
3334
codeql generate library-doc-coverage --output="${RUNNER_TEMP}/${lang}-current.txt" --dir="${pack_dir}"

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
# uses a compiled language
5757

5858
- run: |
59-
dotnet build csharp /p:UseSharedCompilation=false
59+
dotnet build csharp
6060
6161
- name: Perform CodeQL Analysis
6262
uses: github/codeql-action/analyze@main

.github/workflows/csv-coverage-metrics.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
DATABASE="${{ runner.temp }}/csharp-database"
5656
PROJECT="${{ runner.temp }}/csharp-project"
5757
dotnet new classlib --language=C# --output="$PROJECT"
58-
codeql database create "$DATABASE" --language=csharp --source-root="$PROJECT" --command 'dotnet build /t:rebuild csharp-project.csproj /p:UseSharedCompilation=false'
58+
codeql database create "$DATABASE" --language=csharp --source-root="$PROJECT" --command 'dotnet build /t:rebuild csharp-project.csproj'
5959
- name: Capture coverage information
6060
run: |
6161
DATABASE="${{ runner.temp }}/csharp-database"

.github/workflows/ql-for-ql-build.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ on:
55
branches: [main]
66
pull_request:
77
branches: [main]
8+
paths:
9+
- "ql/**"
10+
- "**.qll"
11+
- "**.ql"
12+
- "**.dbscheme"
13+
- "**/qlpack.yml"
14+
- ".github/workflows/ql-for-ql-build.yml"
815

916
env:
1017
CARGO_TERM_COLOR: always
@@ -54,7 +61,7 @@ jobs:
5461
cp -r ${{ runner.temp }}/queries ${{ runner.temp }}/pack
5562
env:
5663
CODEQL: ${{ steps.find-codeql.outputs.codeql-path }}
57-
64+
5865
### Build the extractor ###
5966
- name: Cache entire extractor
6067
if: steps.cache-pack.outputs.cache-hit != 'true'
@@ -108,22 +115,22 @@ jobs:
108115
### Run the analysis ###
109116
- name: Hack codeql-action options
110117
run: |
111-
JSON=$(jq -nc --arg pack "${PACK}" '.database."run-queries"=["--search-path", $pack] | .resolve.queries=["--search-path", $pack] | .resolve.extractor=["--search-path", $pack] | .database.init=["--search-path", $pack]')
118+
JSON=$(jq -nc --arg pack "${PACK}" '.database."run-queries"=["--search-path", $pack] | .resolve.queries=["--search-path", $pack] | .resolve.extractor=["--search-path", $pack] | .resolve.languages=["--search-path", $pack] | .database.init=["--search-path", $pack]')
112119
echo "CODEQL_ACTION_EXTRA_OPTIONS=${JSON}" >> ${GITHUB_ENV}
113120
env:
114121
PACK: ${{ runner.temp }}/pack
115122

116123
- name: Create CodeQL config file
117124
run: |
118125
echo "paths-ignore:" >> ${CONF}
119-
echo " - ql/ql/test" >> ${CONF}
120-
echo " - \"*/ql/lib/upgrades/\"" >> ${CONF}
126+
echo " - ql/ql/test" >> ${CONF}
127+
echo " - \"*/ql/lib/upgrades/\"" >> ${CONF}
121128
echo "disable-default-queries: true" >> ${CONF}
122129
echo "queries:" >> ${CONF}
123130
echo " - uses: ./ql/ql/src/codeql-suites/ql-code-scanning.qls" >> ${CONF}
124131
echo "Config file: "
125132
cat ${CONF}
126-
env:
133+
env:
127134
CONF: ./ql-for-ql-config.yml
128135
- name: Initialize CodeQL
129136
uses: github/codeql-action/init@71a8b35ff4c80fcfcd05bc1cd932fe3c08f943ca
@@ -139,13 +146,13 @@ jobs:
139146

140147
- name: Perform CodeQL Analysis
141148
uses: github/codeql-action/analyze@71a8b35ff4c80fcfcd05bc1cd932fe3c08f943ca
142-
with:
149+
with:
143150
category: "ql-for-ql"
144151
- name: Copy sarif file to CWD
145152
run: cp ../results/ql.sarif ./ql-for-ql.sarif
146153
- name: Fixup the $scema in sarif # Until https://github.com/microsoft/sarif-vscode-extension/pull/436/ is part in a stable release
147154
run: |
148-
sed -i 's/\$schema.*/\$schema": "https:\/\/raw.githubusercontent.com\/oasis-tcs\/sarif-spec\/master\/Schemata\/sarif-schema-2.1.0",/' ql-for-ql.sarif
155+
sed -i 's/\$schema.*/\$schema": "https:\/\/raw.githubusercontent.com\/oasis-tcs\/sarif-spec\/master\/Schemata\/sarif-schema-2.1.0",/' ql-for-ql.sarif
149156
- name: Sarif as artifact
150157
uses: actions/upload-artifact@v3
151158
with:

.github/workflows/ruby-build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ jobs:
9595
uses: ./.github/actions/fetch-codeql
9696
- name: Build Query Pack
9797
run: |
98+
codeql pack create ../shared/ssa --output target/packs
9899
codeql pack create ql/lib --output target/packs
99100
codeql pack install ql/src
100101
codeql pack create ql/src --output target/packs

.github/workflows/swift-codegen.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
pull_request:
55
paths:
66
- "swift/**"
7+
- "misc/bazel/**"
8+
- "*.bazel*"
79
- .github/workflows/swift-codegen.yml
810
- .github/actions/fetch-codeql/action.yml
911
branches:

.github/workflows/swift-integration-tests.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
pull_request:
55
paths:
66
- "swift/**"
7+
- "misc/bazel/**"
8+
- "*.bazel*"
79
- .github/workflows/swift-integration-tests.yml
810
- .github/actions/fetch-codeql/action.yml
911
- codeql-workspace.yml
@@ -30,6 +32,14 @@ jobs:
3032
- name: Build Swift extractor
3133
run: |
3234
bazel run //swift:create-extractor-pack
35+
- name: Get Swift version
36+
id: get_swift_version
37+
run: |
38+
VERSION=$(bazel run //swift/extractor -- --version | sed -ne 's/.*version \(\S*\).*/\1/p')
39+
echo "::set-output name=version::$VERSION"
40+
- uses: swift-actions/setup-swift@v1
41+
with:
42+
swift-version: "${{steps.get_swift_version.outputs.version}}"
3343
- name: Run integration tests
3444
run: |
3545
python integration-tests/runner.py

.github/workflows/swift-qltest.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
pull_request:
55
paths:
66
- "swift/**"
7+
- "misc/bazel/**"
8+
- "*.bazel*"
79
- .github/workflows/swift-qltest.yml
810
- .github/actions/fetch-codeql/action.yml
911
- codeql-workspace.yml

CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030

3131
# Bazel (excluding BUILD.bazel files)
3232
WORKSPACE.bazel @github/codeql-ci-reviewers
33+
.bazelversion @github/codeql-ci-reviewers
34+
.bazelrc @github/codeql-ci-reviewers
3335
**/*.bzl @github/codeql-ci-reviewers
3436

3537
# Documentation etc

0 commit comments

Comments
 (0)