Skip to content

Commit 3989717

Browse files
committed
Merge branch 'main' into cpp-path
2 parents 336c7de + 8b91914 commit 3989717

File tree

2,638 files changed

+59001
-284233
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,638 files changed

+59001
-284233
lines changed

.bazelrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,11 @@ build:linux --cxxopt=-std=c++20
1414
build:macos --cxxopt=-std=c++20 --cpu=darwin_x86_64
1515
build:windows --cxxopt=/std:c++20 --cxxopt=/Zc:preprocessor
1616

17+
# this requires developer mode, but is required to have pack installer functioning
18+
startup --windows_enable_symlinks
19+
common --enable_runfiles
20+
21+
common --registry=file:///%workspace%/misc/bazel/registry
22+
common --registry=https://bcr.bazel.build
23+
1724
try-import %workspace%/local.bazelrc

.bazelrc.internal

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
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

.gitattributes

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,6 @@ go/extractor/opencsv/CSVReader.java -text
6767
# for those testing dbscheme files.
6868
*/ql/lib/upgrades/initial/*.dbscheme -text
6969

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
74-
7570
# Auto-generated modeling for Python
7671
python/ql/lib/semmle/python/frameworks/data/internal/subclass-capture/*.yml linguist-generated=true
7772

.github/labeler.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ 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:
@@ -46,6 +46,3 @@ documentation:
4646
# Since these are all shared files that need to be synced, just pick _one_ copy of each.
4747
"DataFlow Library":
4848
- "shared/dataflow/**/*"
49-
50-
"ATM":
51-
- javascript/ql/experimental/adaptivethreatmodeling/**/*

.github/workflows/buildifier.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Check bazel formatting
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- "**.bazel"
7+
- "**.bzl"
8+
branches:
9+
- main
10+
- "rc/*"
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
check:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
- name: Check bazel formatting
22+
uses: pre-commit/action@646c83fcd040023954eafda54b4db0192ce70507
23+
with:
24+
extra_args: >
25+
buildifier --all-files 2>&1 ||
26+
(
27+
echo -e "In order to format all bazel files, please run:\n bazel run //misc/bazel:buildifier"; exit 1
28+
)

.github/workflows/swift.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
- "swift/**"
77
- "misc/bazel/**"
88
- "misc/codegen/**"
9+
- "shared/**"
910
- "*.bazel*"
1011
- .github/workflows/swift.yml
1112
- .github/actions/**
@@ -22,10 +23,12 @@ on:
2223
- "swift/**"
2324
- "misc/bazel/**"
2425
- "misc/codegen/**"
26+
- "shared/**"
2527
- "*.bazel*"
2628
- .github/workflows/swift.yml
2729
- .github/actions/**
2830
- codeql-workspace.yml
31+
- .pre-commit-config.yaml
2932
- "!**/*.md"
3033
- "!**/*.qhelp"
3134
branches:

.lfsconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[lfs]
2+
# codeql is publicly forked by many users, and we don't want any LFS file polluting their working
3+
# copies. We therefore exclude everything by default.
4+
# For files required by bazel builds, use rules in `misc/bazel/lfs.bzl` to download them on demand.
5+
fetchinclude = /nothing

.pre-commit-config.yaml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,22 @@ repos:
2020
- id: autopep8
2121
files: ^misc/codegen/.*\.py
2222

23-
- repo: https://github.com/warchant/pre-commit-buildifier
24-
rev: 0.0.2
23+
- repo: local
2524
hooks:
2625
- id: buildifier
26+
name: Format bazel files
27+
files: \.(bazel|bzl)
28+
language: system
29+
entry: bazel run //misc/bazel:buildifier
30+
pass_filenames: false
31+
32+
- id: go-gen
33+
name: Check checked in generated files in go
34+
files: ^go/.*
35+
language: system
36+
entry: bazel run //go:gen
37+
pass_filenames: false
2738

28-
- repo: local
29-
hooks:
3039
- id: codeql-format
3140
name: Fix QL file formatting
3241
files: \.qll?$

CODEOWNERS

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212
/java/ql/test-kotlin1/ @github/codeql-kotlin
1313
/java/ql/test-kotlin2/ @github/codeql-kotlin
1414

15-
# ML-powered queries
16-
/javascript/ql/experimental/adaptivethreatmodeling/ @github/codeql-ml-powered-queries-reviewers
17-
1815
# CodeQL tools and associated docs
1916
/docs/codeql/codeql-cli/ @github/codeql-cli-reviewers
2017
/docs/codeql/codeql-for-visual-studio-code/ @github/codeql-vscode-reviewers
@@ -37,9 +34,7 @@ MODULE.bazel @github/codeql-ci-reviewers
3734

3835
# Workflows
3936
/.github/workflows/ @github/codeql-ci-reviewers
40-
/.github/workflows/atm-* @github/codeql-ml-powered-queries-reviewers
4137
/.github/workflows/go-* @github/codeql-go
42-
/.github/workflows/js-ml-tests.yml @github/codeql-ml-powered-queries-reviewers
4338
/.github/workflows/ql-for-ql-* @github/codeql-ql-for-ql-reviewers
4439
/.github/workflows/ruby-* @github/codeql-ruby
4540
/.github/workflows/swift.yml @github/codeql-swift

MODULE.bazel

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,18 @@ local_path_override(
1313

1414
# see https://registry.bazel.build/ for a list of available packages
1515

16-
bazel_dep(name = "platforms", version = "0.0.8")
17-
bazel_dep(name = "rules_pkg", version = "0.9.1")
16+
bazel_dep(name = "platforms", version = "0.0.9")
17+
bazel_dep(name = "rules_go", version = "0.47.0")
18+
bazel_dep(name = "rules_pkg", version = "0.10.1")
1819
bazel_dep(name = "rules_nodejs", version = "6.0.3")
1920
bazel_dep(name = "rules_python", version = "0.31.0")
2021
bazel_dep(name = "bazel_skylib", version = "1.5.0")
2122
bazel_dep(name = "abseil-cpp", version = "20240116.0", repo_name = "absl")
2223
bazel_dep(name = "nlohmann_json", version = "3.11.3", repo_name = "json")
2324
bazel_dep(name = "fmt", version = "10.0.0")
25+
bazel_dep(name = "gazelle", version = "0.36.0")
26+
27+
bazel_dep(name = "buildifier_prebuilt", version = "6.4.0", dev_dependency = True)
2428

2529
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
2630
pip.parse(
@@ -31,6 +35,8 @@ pip.parse(
3135
use_repo(pip, "codegen_deps")
3236

3337
swift_deps = use_extension("//swift/third_party:load.bzl", "swift_deps")
38+
39+
# following list can be kept in sync with `bazel mod tidy`
3440
use_repo(
3541
swift_deps,
3642
"binlog",
@@ -48,6 +54,9 @@ node.toolchain(
4854
)
4955
use_repo(node, "nodejs", "nodejs_toolchains")
5056

57+
go_sdk = use_extension("@rules_go//go:extensions.bzl", "go_sdk")
58+
go_sdk.download(version = "1.22.2")
59+
5160
register_toolchains(
5261
"@nodejs_toolchains//:all",
5362
)

0 commit comments

Comments
 (0)