Skip to content

Commit 4b95ea0

Browse files
authored
Merge branch 'main' into go-rs-cors
2 parents 8277c60 + dfb3483 commit 4b95ea0

File tree

20,121 files changed

+1577373
-708625
lines changed

Some content is hidden

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

20,121 files changed

+1577373
-708625
lines changed

.bazelrc

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,35 @@
11
common --enable_platform_specific_config
2+
# because we use --override_module with `%workspace%`, the lock file is not stable
3+
common --lockfile_mode=off
4+
5+
# when building from this repository in isolation, the internal repository will not be found at ..
6+
# where `MODULE.bazel` looks for it. The following will get us past the module loading phase, so
7+
# that we can build things that do not rely on that
8+
common --override_module=semmle_code=%workspace%/misc/bazel/semmle_code_stub
29

310
build --repo_env=CC=clang --repo_env=CXX=clang++
411

5-
build:linux --cxxopt=-std=c++20
6-
build:macos --cxxopt=-std=c++20 --cpu=darwin_x86_64
7-
build:windows --cxxopt=/std:c++20 --cxxopt=/Zc:preprocessor
12+
# we use transitions that break builds of `...`, so for `test` to work with that we need the following
13+
test --build_tests_only
14+
15+
# this requires developer mode, but is required to have pack installer functioning
16+
startup --windows_enable_symlinks
17+
common --enable_runfiles
18+
19+
# with the above, we can avoid building python zips which is the default on windows as that's expensive
20+
build --nobuild_python_zip
21+
22+
common --registry=file:///%workspace%/misc/bazel/registry
23+
common --registry=https://bcr.bazel.build
24+
25+
common --@rules_dotnet//dotnet/settings:strict_deps=false
26+
27+
# Reduce this eventually to empty, once we've fixed all our usages of java, and https://github.com/bazel-contrib/rules_go/issues/4193 is fixed
28+
common --incompatible_autoload_externally="+@rules_java,+@rules_shell"
29+
30+
build --java_language_version=17
31+
build --tool_java_language_version=17
32+
build --tool_java_runtime_version=remotejdk_17
33+
build --java_runtime_version=remotejdk_17
834

935
try-import %workspace%/local.bazelrc

.bazelrc.internal

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# this file should contain bazel settings required to build things from `semmle-code`
2+
3+
common --registry=file:///%workspace%/ql/misc/bazel/registry
4+
common --registry=https://bcr.bazel.build
5+
6+
# See bazelbuild/rules_dotnet#413: strict_deps in C# also appliy to 3rd-party deps, and when we pull
7+
# in (for example) the xunit package, there's no code in this at all, it just depends transitively on
8+
# its implementation packages without providing any code itself.
9+
# We either can depend on internal implementation details, or turn of strict deps.
10+
common --@rules_dotnet//dotnet/settings:strict_deps=false

.bazelversion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.3.1
1+
8.0.0

.clang-format

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

.devcontainer/devcontainer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"image": "mcr.microsoft.com/devcontainers/base:ubuntu-24.04",
23
"extensions": [
34
"rust-lang.rust-analyzer",
45
"bungcip.better-toml",

.devcontainer/swift/root.sh

100644100755
Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,26 @@ set -xe
33
BAZELISK_VERSION=v1.12.0
44
BAZELISK_DOWNLOAD_SHA=6b0bcb2ea15bca16fffabe6fda75803440375354c085480fe361d2cbf32501db
55

6+
# install git lfs apt source
7+
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash
8+
9+
# install gh apt source
10+
(type -p wget >/dev/null || (sudo apt update && sudo apt-get install wget -y)) \
11+
&& sudo mkdir -p -m 755 /etc/apt/keyrings \
12+
&& wget -qO- https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \
13+
&& sudo chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \
14+
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
15+
616
apt-get update
717
export DEBIAN_FRONTEND=noninteractive
818
apt-get -y install --no-install-recommends \
919
zlib1g-dev \
1020
uuid-dev \
1121
python3-distutils \
1222
python3-pip \
13-
bash-completion
23+
bash-completion \
24+
git-lfs \
25+
gh
1426

1527
# Install Bazel
1628
curl -fSsL -o /usr/local/bin/bazelisk https://github.com/bazelbuild/bazelisk/releases/download/${BAZELISK_VERSION}/bazelisk-linux-amd64

.devcontainer/swift/user.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
set -xe
22

3+
git lfs install
4+
35
# add the workspace to the codeql search path
46
mkdir -p /home/vscode/.config/codeql
57
echo "--search-path /workspaces/codeql" > /home/vscode/.config/codeql/config

.gitattributes

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,24 +50,41 @@
5050
*.dll -text
5151
*.pdb -text
5252

53-
java/ql/test/stubs/**/*.java linguist-generated=true
54-
java/ql/test/experimental/stubs/**/*.java linguist-generated=true
53+
/java/ql/test/stubs/**/*.java linguist-generated=true
54+
/java/ql/test/experimental/stubs/**/*.java linguist-generated=true
55+
/java/kotlin-extractor/deps/*.jar filter=lfs diff=lfs merge=lfs -text
5556

5657
# Force git not to modify line endings for go or html files under the go/ql directory
57-
go/ql/**/*.go -text
58-
go/ql/**/*.html -text
58+
/go/ql/**/*.go -text
59+
/go/ql/**/*.html -text
5960
# Force git not to modify line endings for go dbschemes
60-
go/*.dbscheme -text
61+
/go/*.dbscheme -text
6162
# Preserve unusual line ending from codeql-go merge
62-
go/extractor/opencsv/CSVReader.java -text
63+
/go/extractor/opencsv/CSVReader.java -text
6364

6465
# For some languages, upgrade script testing references really old dbscheme
6566
# files from legacy upgrades that have CRLF line endings. Since upgrade
6667
# resolution relies on object hashes, we must suppress line ending conversion
6768
# for those testing dbscheme files.
68-
*/ql/lib/upgrades/initial/*.dbscheme -text
69+
/*/ql/lib/upgrades/initial/*.dbscheme -text
6970

70-
# Generated test files - these are synced from the standard JavaScript libraries using
71-
# `javascript/ql/experimental/adaptivethreatmodeling/test/update_endpoint_test_files.py`.
72-
javascript/ql/experimental/adaptivethreatmodeling/test/endpoint_large_scale/autogenerated/**/*.js linguist-generated=true -merge
73-
javascript/ql/experimental/adaptivethreatmodeling/test/endpoint_large_scale/autogenerated/**/*.ts linguist-generated=true -merge
71+
# Auto-generated modeling for Python
72+
/python/ql/lib/semmle/python/frameworks/data/internal/subclass-capture/*.yml linguist-generated=true
73+
74+
# auto-generated bazel lock file
75+
/ruby/extractor/cargo-bazel-lock.json linguist-generated=true
76+
/ruby/extractor/cargo-bazel-lock.json -merge
77+
78+
# auto-generated files for the C# build
79+
/csharp/paket.lock linguist-generated=true
80+
# needs eol=crlf, as `paket` touches this file and saves it as crlf
81+
/csharp/.paket/Paket.Restore.targets linguist-generated=true eol=crlf
82+
/csharp/paket.main.bzl linguist-generated=true
83+
/csharp/paket.main_extension.bzl linguist-generated=true
84+
85+
# ripunzip tool
86+
/misc/ripunzip/ripunzip-* filter=lfs diff=lfs merge=lfs -text
87+
88+
# swift prebuilt resources
89+
/swift/third_party/resources/*.zip filter=lfs diff=lfs merge=lfs -text
90+
/swift/third_party/resources/*.tar.zst filter=lfs diff=lfs merge=lfs -text

.github/codeql/codeql-config.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ paths-ignore:
99
- '/python/'
1010
- '/javascript/ql/test'
1111
- '/javascript/extractor/tests'
12+
- '/rust/ql/test'
13+
- '/rust/ql/integration-tests'

.github/labeler.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ Java:
1515
- change-notes/**/*java.*
1616

1717
JS:
18-
- any: [ 'javascript/**/*', '!javascript/ql/experimental/adaptivethreatmodeling/**/*' ]
18+
- any: [ 'javascript/**/*' ]
1919
- change-notes/**/*javascript*
2020

2121
Kotlin:
2222
- java/kotlin-extractor/**/*
23-
- java/ql/test/kotlin/**/*
23+
- java/ql/test-kotlin*/**/*
2424

2525
Python:
2626
- python/**/*
@@ -30,10 +30,18 @@ Ruby:
3030
- ruby/**/*
3131
- change-notes/**/*ruby*
3232

33+
Rust:
34+
- rust/**/*
35+
- change-notes/**/*rust*
36+
3337
Swift:
3438
- swift/**/*
3539
- change-notes/**/*swift*
3640

41+
Actions:
42+
- actions/**/*
43+
- change-notes/**/*actions*
44+
3745
documentation:
3846
- "**/*.qhelp"
3947
- "**/*.md"
@@ -46,6 +54,3 @@ documentation:
4654
# Since these are all shared files that need to be synced, just pick _one_ copy of each.
4755
"DataFlow Library":
4856
- "shared/dataflow/**/*"
49-
50-
"ATM":
51-
- javascript/ql/experimental/adaptivethreatmodeling/**/*

0 commit comments

Comments
 (0)