Skip to content

Commit c218162

Browse files
committed
Merge branch 'main' into pypam
2 parents ab1252d + 56ed68b commit c218162

File tree

1,846 files changed

+47201
-32996
lines changed

Some content is hidden

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

1,846 files changed

+47201
-32996
lines changed

.bazelrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
build --repo_env=CC=clang --repo_env=CXX=clang++ --copt="-std=c++17"
2+
3+
try-import %workspace%/local.bazelrc

.bazelversion

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
5.0.0

.github/actions/fetch-codeql/action.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,22 @@ description: Fetches the latest version of CodeQL
33
runs:
44
using: composite
55
steps:
6+
- name: Select platform - Linux
7+
if: runner.os == 'Linux'
8+
shell: bash
9+
run: echo "GA_CODEQL_CLI_PLATFORM=linux64" >> $GITHUB_ENV
10+
11+
- name: Select platform - MacOS
12+
if: runner.os == 'MacOS'
13+
shell: bash
14+
run: echo "GA_CODEQL_CLI_PLATFORM=osx64" >> $GITHUB_ENV
15+
616
- name: Fetch CodeQL
717
shell: bash
818
run: |
919
LATEST=$(gh release list --repo https://github.com/github/codeql-cli-binaries | cut -f 1 | grep -v beta | sort --version-sort | tail -1)
10-
gh release download --repo https://github.com/github/codeql-cli-binaries --pattern codeql-linux64.zip "$LATEST"
11-
unzip -q -d "${RUNNER_TEMP}" codeql-linux64.zip
20+
gh release download --repo https://github.com/github/codeql-cli-binaries --pattern codeql-$GA_CODEQL_CLI_PLATFORM.zip "$LATEST"
21+
unzip -q -d "${RUNNER_TEMP}" codeql-$GA_CODEQL_CLI_PLATFORM.zip
1222
echo "${RUNNER_TEMP}/codeql" >> "${GITHUB_PATH}"
1323
env:
1424
GITHUB_TOKEN: ${{ github.token }}

.github/dependabot.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,11 @@ updates:
1616
directory: "ruby/autobuilder"
1717
schedule:
1818
interval: "daily"
19+
20+
- package-ecosystem: "github-actions"
21+
directory: "/"
22+
schedule:
23+
interval: "daily"
24+
ignore:
25+
- dependency-name: '*'
26+
update-types: ['version-update:semver-patch', 'version-update:semver-minor']

.github/labeler.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,15 @@ Python:
2121
Ruby:
2222
- ruby/**/*
2323
- change-notes/**/*ruby*
24+
25+
Swift:
26+
- swift/**/*
27+
- change-notes/**/*swift*
2428

2529
documentation:
2630
- "**/*.qhelp"
2731
- "**/*.md"
2832
- docs/**/*
2933

3034
"QL-for-QL":
31-
- ql/**/*
35+
- ql/**/*

.github/workflows/check-qldoc.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,25 @@ jobs:
2222
env:
2323
GITHUB_TOKEN: ${{ github.token }}
2424

25-
- uses: actions/checkout@v2
25+
- uses: actions/checkout@v3
2626
with:
2727
fetch-depth: 2
2828

2929
- name: Check QLdoc coverage
3030
shell: bash
3131
run: |
3232
EXIT_CODE=0
33-
changed_lib_packs="$(git diff --name-only --diff-filter=ACMRT HEAD^ HEAD | { grep -o '^[a-z]*/ql/lib' || true; } | sort -u)"
33+
# TODO: remove the swift exception from the regex when we fix generated QLdoc
34+
changed_lib_packs="$(git diff --name-only --diff-filter=ACMRT HEAD^ HEAD | { grep -Po '^(?!swift)[a-z]*/ql/lib' || true; } | sort -u)"
3435
for pack_dir in ${changed_lib_packs}; do
3536
lang="${pack_dir%/ql/lib}"
3637
gh codeql generate library-doc-coverage --output="${RUNNER_TEMP}/${lang}-current.txt" --dir="${pack_dir}"
3738
done
3839
git checkout HEAD^
3940
for pack_dir in ${changed_lib_packs}; do
41+
# When we add a new language, pack_dir would not exist in HEAD^.
42+
# In this case the right thing to do is to skip the check.
43+
[[ ! -d "${pack_dir}" ]] && continue
4044
lang="${pack_dir%/ql/lib}"
4145
gh codeql generate library-doc-coverage --output="${RUNNER_TEMP}/${lang}-baseline.txt" --dir="${pack_dir}"
4246
awk -F, '{gsub(/"/,""); if ($4==0 && $6=="public") print "\""$3"\"" }' "${RUNNER_TEMP}/${lang}-current.txt" | sort -u > "${RUNNER_TEMP}/current-undocumented.txt"

.github/workflows/close-stale.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313

1414
steps:
15-
- uses: actions/stale@v3
15+
- uses: actions/stale@v5
1616
with:
1717
repo-token: ${{ secrets.GITHUB_TOKEN }}
1818
stale-issue-message: 'This issue is stale because it has been open 14 days with no activity. Comment or remove the `Stale` label in order to avoid having this issue closed in 7 days.'

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ jobs:
2828

2929
steps:
3030
- name: Setup dotnet
31-
uses: actions/setup-dotnet@v1
31+
uses: actions/setup-dotnet@v2
3232
with:
3333
dotnet-version: 6.0.101
3434

3535
- name: Checkout repository
36-
uses: actions/checkout@v2
36+
uses: actions/checkout@v3
3737

3838
# Initializes the CodeQL tools for scanning.
3939
- name: Initialize CodeQL
@@ -49,7 +49,7 @@ jobs:
4949
# uses: github/codeql-action/autobuild@main
5050

5151
# ℹ️ Command-line programs to run using the OS shell.
52-
# 📚 https://git.io/JvXDl
52+
# 📚 https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
5353

5454
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
5555
# and modify them (or add more) to build your code if your project

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

Lines changed: 35 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ on:
1414
- ".github/workflows/csv-coverage-metrics.yml"
1515

1616
jobs:
17-
publish:
17+
publish-java:
1818
runs-on: ubuntu-latest
1919
steps:
2020
- name: Checkout repository
21-
uses: actions/checkout@v2
21+
uses: actions/checkout@v3
2222
- name: Setup CodeQL
2323
uses: ./.github/actions/fetch-codeql
2424
- name: Create empty database
@@ -31,13 +31,40 @@ jobs:
3131
- name: Capture coverage information
3232
run: |
3333
DATABASE="${{ runner.temp }}/java-database"
34-
codeql database analyze --format=sarif-latest --output=metrics.sarif -- "$DATABASE" ./java/ql/src/Metrics/Summaries/FrameworkCoverage.ql
35-
- uses: actions/upload-artifact@v2
34+
codeql database analyze --format=sarif-latest --output=metrics-java.sarif -- "$DATABASE" ./java/ql/src/Metrics/Summaries/FrameworkCoverage.ql
35+
- uses: actions/upload-artifact@v3
3636
with:
37-
name: metrics.sarif
38-
path: metrics.sarif
37+
name: metrics-java.sarif
38+
path: metrics-java.sarif
3939
retention-days: 20
4040
- name: Upload SARIF file
41-
uses: github/codeql-action/upload-sarif@v1
41+
uses: github/codeql-action/upload-sarif@main
4242
with:
43-
sarif_file: metrics.sarif
43+
sarif_file: metrics-java.sarif
44+
45+
publish-csharp:
46+
runs-on: ubuntu-latest
47+
steps:
48+
- name: Checkout repository
49+
uses: actions/checkout@v3
50+
- name: Setup CodeQL
51+
uses: ./.github/actions/fetch-codeql
52+
- name: Create empty database
53+
run: |
54+
DATABASE="${{ runner.temp }}/csharp-database"
55+
PROJECT="${{ runner.temp }}/csharp-project"
56+
dotnet new classlib --language=C# --output="$PROJECT"
57+
codeql database create "$DATABASE" --language=csharp --source-root="$PROJECT" --command 'dotnet build /t:rebuild csharp-project.csproj /p:UseSharedCompilation=false'
58+
- name: Capture coverage information
59+
run: |
60+
DATABASE="${{ runner.temp }}/csharp-database"
61+
codeql database analyze --format=sarif-latest --output=metrics-csharp.sarif -- "$DATABASE" ./csharp/ql/src/Metrics/Summaries/FrameworkCoverage.ql
62+
- uses: actions/upload-artifact@v3
63+
with:
64+
name: metrics-csharp.sarif
65+
path: metrics-csharp.sarif
66+
retention-days: 20
67+
- name: Upload SARIF file
68+
uses: github/codeql-action/upload-sarif@main
69+
with:
70+
sarif_file: metrics-csharp.sarif

.github/workflows/csv-coverage-pr-artifacts.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ jobs:
2828
GITHUB_CONTEXT: ${{ toJSON(github.event) }}
2929
run: echo "$GITHUB_CONTEXT"
3030
- name: Clone self (github/codeql) - MERGE
31-
uses: actions/checkout@v2
31+
uses: actions/checkout@v3
3232
with:
3333
path: merge
3434
- name: Clone self (github/codeql) - BASE
35-
uses: actions/checkout@v2
35+
uses: actions/checkout@v3
3636
with:
3737
fetch-depth: 2
3838
path: base
@@ -41,7 +41,7 @@ jobs:
4141
git log -1 --format='%H'
4242
working-directory: base
4343
- name: Set up Python 3.8
44-
uses: actions/setup-python@v2
44+
uses: actions/setup-python@v3
4545
with:
4646
python-version: 3.8
4747
- name: Download CodeQL CLI
@@ -69,21 +69,21 @@ jobs:
6969
run: |
7070
python base/misc/scripts/library-coverage/compare-folders.py out_base out_merge comparison.md
7171
- name: Upload CSV package list
72-
uses: actions/upload-artifact@v2
72+
uses: actions/upload-artifact@v3
7373
with:
7474
name: csv-framework-coverage-merge
7575
path: |
7676
out_merge/framework-coverage-*.csv
7777
out_merge/framework-coverage-*.rst
7878
- name: Upload CSV package list
79-
uses: actions/upload-artifact@v2
79+
uses: actions/upload-artifact@v3
8080
with:
8181
name: csv-framework-coverage-base
8282
path: |
8383
out_base/framework-coverage-*.csv
8484
out_base/framework-coverage-*.rst
8585
- name: Upload comparison results
86-
uses: actions/upload-artifact@v2
86+
uses: actions/upload-artifact@v3
8787
with:
8888
name: comparison
8989
path: |
@@ -93,7 +93,7 @@ jobs:
9393
mkdir -p pr
9494
echo ${{ github.event.pull_request.number }} > pr/NR
9595
- name: Upload PR number
96-
uses: actions/upload-artifact@v2
96+
uses: actions/upload-artifact@v3
9797
with:
9898
name: pr
9999
path: pr/

0 commit comments

Comments
 (0)