Skip to content

Commit f72afdc

Browse files
Merge branch 'main' into gradio-model
2 parents d6acea1 + e65a62c commit f72afdc

File tree

3,014 files changed

+87814
-297578
lines changed

Some content is hidden

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

3,014 files changed

+87814
-297578
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/go-tests-other-os.yml

Lines changed: 4 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ on:
77
- .github/workflows/go-tests-other-os.yml
88
- .github/actions/**
99
- codeql-workspace.yml
10-
env:
11-
GO_VERSION: '~1.22.0'
1210

1311
permissions:
1412
contents: read
@@ -18,72 +16,17 @@ jobs:
1816
name: Test MacOS
1917
runs-on: macos-latest
2018
steps:
21-
- name: Set up Go ${{ env.GO_VERSION }}
22-
uses: actions/setup-go@v5
23-
with:
24-
go-version: ${{ env.GO_VERSION }}
25-
cache: false
26-
id: go
27-
2819
- name: Check out code
2920
uses: actions/checkout@v4
30-
31-
- name: Set up CodeQL CLI
32-
uses: ./.github/actions/fetch-codeql
33-
34-
- name: Enable problem matchers in repository
35-
shell: bash
36-
run: 'find .github/problem-matchers -name \*.json -exec echo "::add-matcher::{}" \;'
37-
38-
- name: Build
39-
run: |
40-
cd go
41-
make
42-
43-
- name: Cache compilation cache
44-
id: query-cache
45-
uses: ./.github/actions/cache-query-compilation
46-
with:
47-
key: go-qltest
48-
- name: Test
49-
run: |
50-
cd go
51-
make test cache="${{ steps.query-cache.outputs.cache-dir }}"
21+
- name: Run tests
22+
uses: ./go/actions/test
5223

5324
test-win:
5425
if: github.repository_owner == 'github'
5526
name: Test Windows
5627
runs-on: windows-latest-xl
5728
steps:
58-
- name: Set up Go ${{ env.GO_VERSION }}
59-
uses: actions/setup-go@v5
60-
with:
61-
go-version: ${{ env.GO_VERSION }}
62-
cache: false
63-
id: go
64-
6529
- name: Check out code
6630
uses: actions/checkout@v4
67-
68-
- name: Set up CodeQL CLI
69-
uses: ./.github/actions/fetch-codeql
70-
71-
- name: Enable problem matchers in repository
72-
shell: bash
73-
run: 'find .github/problem-matchers -name \*.json -exec echo "::add-matcher::{}" \;'
74-
75-
- name: Build
76-
run: |
77-
cd go
78-
make
79-
80-
- name: Cache compilation cache
81-
id: query-cache
82-
uses: ./.github/actions/cache-query-compilation
83-
with:
84-
key: go-qltest
85-
86-
- name: Test
87-
run: |
88-
cd go
89-
make test cache="${{ steps.query-cache.outputs.cache-dir }}"
31+
- name: Run tests
32+
uses: ./go/actions/test

.github/workflows/go-tests.yml

Lines changed: 3 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ on:
1616
- .github/actions/**
1717
- codeql-workspace.yml
1818

19-
env:
20-
GO_VERSION: '~1.22.0'
21-
2219
permissions:
2320
contents: read
2421

@@ -28,51 +25,9 @@ jobs:
2825
name: Test Linux (Ubuntu)
2926
runs-on: ubuntu-latest-xl
3027
steps:
31-
- name: Set up Go ${{ env.GO_VERSION }}
32-
uses: actions/setup-go@v5
33-
with:
34-
go-version: ${{ env.GO_VERSION }}
35-
cache: false
36-
id: go
37-
3828
- name: Check out code
3929
uses: actions/checkout@v4
40-
41-
- name: Set up CodeQL CLI
42-
uses: ./.github/actions/fetch-codeql
43-
44-
- name: Enable problem matchers in repository
45-
shell: bash
46-
run: 'find .github/problem-matchers -name \*.json -exec echo "::add-matcher::{}" \;'
47-
48-
- name: Build
49-
run: |
50-
cd go
51-
make
52-
53-
- name: Check that all Go code is autoformatted
54-
run: |
55-
cd go
56-
make check-formatting
57-
58-
- name: Compile qhelp files to markdown
59-
run: |
60-
cd go
61-
env QHELP_OUT_DIR=qhelp-out make qhelp-to-markdown
62-
63-
- name: Upload qhelp markdown
64-
uses: actions/upload-artifact@v3
30+
- name: Run tests
31+
uses: ./go/actions/test
6532
with:
66-
name: qhelp-markdown
67-
path: go/qhelp-out/**/*.md
68-
69-
- name: Cache compilation cache
70-
id: query-cache
71-
uses: ./.github/actions/cache-query-compilation
72-
with:
73-
key: go-qltest
74-
75-
- name: Test
76-
run: |
77-
cd go
78-
make test cache="${{ steps.query-cache.outputs.cache-dir }}"
33+
run-code-checks: true

.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: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,23 @@ 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+
# DISABLED: can be enabled by copying this config and installing `pre-commit` with `--config` on the copy
33+
# - id: go-gen
34+
# name: Check checked in generated files in go
35+
# files: ^go/.*
36+
# language: system
37+
# entry: bazel run //go:gen
38+
# pass_filenames: false
2739

28-
- repo: local
29-
hooks:
3040
- id: codeql-format
3141
name: Fix QL file formatting
3242
files: \.qll?$

0 commit comments

Comments
 (0)