Skip to content

Commit 4356155

Browse files
committed
Merge branch 'main' into swift-decls-in-cfg
2 parents 7c25063 + 968ede3 commit 4356155

File tree

1,967 files changed

+112292
-58110
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,967 files changed

+112292
-58110
lines changed

.codeqlmanifest.json

Lines changed: 0 additions & 30 deletions
This file was deleted.

.devcontainer/swift/Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.236.0/containers/cpp/.devcontainer/base.Dockerfile
2+
3+
# [Choice] Debian / Ubuntu version (use Debian 11, Ubuntu 18.04/22.04 on local arm64/Apple Silicon): debian-11, debian-10, ubuntu-22.04, ubuntu-20.04, ubuntu-18.04
4+
FROM mcr.microsoft.com/vscode/devcontainers/cpp:0-ubuntu-22.04
5+
6+
USER root
7+
ADD root.sh /tmp/root.sh
8+
ADD update-codeql.sh /usr/local/bin/update-codeql
9+
RUN bash /tmp/root.sh && rm /tmp/root.sh

.devcontainer/swift/devcontainer.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"extensions": [
3+
"github.vscode-codeql",
4+
"hbenl.vscode-test-explorer",
5+
"ms-vscode.test-adapter-converter",
6+
"slevesque.vscode-zipexplorer",
7+
"ms-vscode.cpptools"
8+
],
9+
"settings": {
10+
"files.watcherExclude": {
11+
"**/target/**": true
12+
},
13+
"codeQL.runningQueries.memory": 2048
14+
},
15+
"build": {
16+
"dockerfile": "Dockerfile",
17+
},
18+
"runArgs": [
19+
"--cap-add=SYS_PTRACE",
20+
"--security-opt",
21+
"seccomp=unconfined"
22+
],
23+
"remoteUser": "vscode",
24+
"onCreateCommand": ".devcontainer/swift/user.sh"
25+
}

.devcontainer/swift/root.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
set -xe
2+
3+
BAZELISK_VERSION=v1.12.0
4+
BAZELISK_DOWNLOAD_SHA=6b0bcb2ea15bca16fffabe6fda75803440375354c085480fe361d2cbf32501db
5+
6+
apt-get update
7+
export DEBIAN_FRONTEND=noninteractive
8+
apt-get -y install --no-install-recommends \
9+
zlib1g-dev \
10+
uuid-dev \
11+
python3-distutils \
12+
python3-pip \
13+
bash-completion
14+
15+
# Install Bazel
16+
curl -fSsL -o /usr/local/bin/bazelisk https://github.com/bazelbuild/bazelisk/releases/download/${BAZELISK_VERSION}/bazelisk-linux-amd64
17+
echo "${BAZELISK_DOWNLOAD_SHA} */usr/local/bin/bazelisk" | sha256sum --check -
18+
chmod 0755 /usr/local/bin/bazelisk
19+
ln -s bazelisk /usr/local/bin/bazel
20+
21+
# install latest codeql
22+
update-codeql

.devcontainer/swift/update-codeql.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash -e
2+
3+
URL=https://github.com/github/codeql-cli-binaries/releases
4+
LATEST_VERSION=$(curl -L -s -H 'Accept: application/json' $URL/latest | sed -e 's/.*"tag_name":"\([^"]*\)".*/\1/')
5+
CURRENT_VERSION=v$(codeql version 2>/dev/null | sed -ne 's/.*release \([0-9.]*\)\./\1/p')
6+
if [[ $CURRENT_VERSION != $LATEST_VERSION ]]; then
7+
if [[ $UID != 0 ]]; then
8+
echo "update required, please run this script with sudo:"
9+
echo " sudo $0"
10+
exit 1
11+
fi
12+
ZIP=$(mktemp codeql.XXXX.zip)
13+
curl -fSqL -o $ZIP $URL/download/$LATEST_VERSION/codeql-linux64.zip
14+
unzip -q $ZIP -d /opt
15+
rm $ZIP
16+
ln -sf /opt/codeql/codeql /usr/local/bin/codeql
17+
echo installed version $LATEST_VERSION
18+
else
19+
echo current version $CURRENT_VERSION is up-to-date
20+
fi

.devcontainer/swift/user.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
set -xe
2+
3+
# add the workspace to the codeql search path
4+
mkdir -p /home/vscode/.config/codeql
5+
echo "--search-path /workspaces/codeql" > /home/vscode/.config/codeql/config
6+
7+
# create a swift extractor pack with the current state
8+
cd /workspaces/codeql
9+
bazel run swift/create-extractor-pack
10+
11+
#install and set up pre-commit
12+
python3 -m pip install pre-commit --no-warn-script-location
13+
$HOME/.local/bin/pre-commit install

.github/labeler.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,31 @@
66
- csharp/**/*
77
- change-notes/**/*csharp*
88

9+
Go:
10+
- go/**/*
11+
- change-notes/**/*go.*
12+
913
Java:
10-
- java/**/*
14+
- any: [ 'java/**/*', '!java/kotlin-extractor/**/*', '!java/kotlin-explorer/**/*', '!java/ql/test/kotlin/**/*' ]
1115
- change-notes/**/*java.*
1216

1317
JS:
1418
- any: [ 'javascript/**/*', '!javascript/ql/experimental/adaptivethreatmodeling/**/*' ]
1519
- change-notes/**/*javascript*
1620

21+
Kotlin:
22+
- java/kotlin-extractor/**/*
23+
- java/kotlin-explorer/**/*
24+
- java/ql/test/kotlin/**/*
25+
1726
Python:
1827
- python/**/*
1928
- change-notes/**/*python*
2029

2130
Ruby:
2231
- ruby/**/*
2332
- change-notes/**/*ruby*
24-
33+
2534
Swift:
2635
- swift/**/*
2736
- change-notes/**/*swift*
@@ -31,5 +40,5 @@ documentation:
3140
- "**/*.md"
3241
- docs/**/*
3342

34-
"QL-for-QL":
43+
"QL-for-QL":
3544
- ql/**/*

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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@v3
44+
uses: actions/setup-python@v4
4545
with:
4646
python-version: 3.8
4747
- name: Download CodeQL CLI

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Clone self (github/codeql)
2323
uses: actions/checkout@v3
2424
- name: Set up Python 3.8
25-
uses: actions/setup-python@v3
25+
uses: actions/setup-python@v4
2626
with:
2727
python-version: 3.8
2828

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
path: codeqlModels
2020
fetch-depth: 0
2121
- name: Set up Python 3.8
22-
uses: actions/setup-python@v3
22+
uses: actions/setup-python@v4
2323
with:
2424
python-version: 3.8
2525
- name: Download CodeQL CLI

0 commit comments

Comments
 (0)