Skip to content

Commit 5f77552

Browse files
committed
Merge branch 'main' into rdmarsh2/fix-ir-globals
2 parents 6d267be + 20d9aaf commit 5f77552

File tree

3,151 files changed

+279091
-7671
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,151 files changed

+279091
-7671
lines changed

.codeqlmanifest.json

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

.gitattributes

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
*.py text
4040
*.lua text
4141
*.expected text
42+
*.go text
4243

4344
# Explicitly set a bunch of known extensions to binary, because Git < 2.10 will treat
4445
# `* text=auto eol=lf` as `* text eol=lf`
@@ -52,6 +53,14 @@
5253
java/ql/test/stubs/**/*.java linguist-generated=true
5354
java/ql/test/experimental/stubs/**/*.java linguist-generated=true
5455

56+
# 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
59+
# Force git not to modify line endings for go dbschemes
60+
go/*.dbscheme -text
61+
# Preserve unusual line ending from codeql-go merge
62+
go/extractor/opencsv/CSVReader.java -text
63+
5564
# For some languages, upgrade script testing references really old dbscheme
5665
# files from legacy upgrades that have CRLF line endings. Since upgrade
5766
# resolution relies on object hashes, we must suppress line ending conversion

.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/**/*
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"problemMatcher": [
3+
{
4+
"owner": "codeql-query-format",
5+
"pattern": [
6+
{
7+
"regexp": "^((.*) would change by autoformatting\\.)$",
8+
"file": 2,
9+
"message": 1
10+
}
11+
]
12+
}
13+
]
14+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"problemMatcher": [
3+
{
4+
"owner": "codeql-syntax-check",
5+
"pattern": [
6+
{
7+
"regexp": "^((ERROR|WARNING): .* \\((.*):(\\d+),(\\d+)-\\d+\\))$",
8+
"message": 1,
9+
"file": 3,
10+
"line": 4,
11+
"col": 5,
12+
"severity": 2
13+
}
14+
]
15+
}
16+
]
17+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"problemMatcher": [
3+
{
4+
"owner": "codeql-test-run",
5+
"pattern": [
6+
{
7+
"regexp": "(\\[.*\\] FAILED\\((RESULT|COMPILATION)\\) (.*))$",
8+
"file": 3,
9+
"message": 1
10+
}
11+
]
12+
}
13+
]
14+
}

.github/problem-matchers/make.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"problemMatcher": [
3+
{
4+
"owner": "make",
5+
"pattern": [
6+
{
7+
"regexp": "^(make: \\*\\*\\* .*)$",
8+
"message": 1
9+
}
10+
]
11+
}
12+
]
13+
}

.github/workflows/go-tests.yml

Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
name: "Go: Run Tests"
2+
on:
3+
pull_request:
4+
paths:
5+
- "go/**"
6+
- .github/workflows/go-tests.yml
7+
- codeql-workspace.yml
8+
jobs:
9+
10+
test-linux:
11+
name: Test Linux (Ubuntu)
12+
runs-on: ubuntu-latest
13+
steps:
14+
15+
- name: Set up Go 1.18.1
16+
uses: actions/setup-go@v3
17+
with:
18+
go-version: 1.18.1
19+
id: go
20+
21+
- name: Set up CodeQL CLI
22+
run: |
23+
echo "Removing old CodeQL Directory..."
24+
rm -rf $HOME/codeql
25+
echo "Done"
26+
cd $HOME
27+
echo "Downloading CodeQL CLI..."
28+
LATEST=$(gh release list --repo https://github.com/github/codeql-cli-binaries | cut -f 1 | sort --version-sort | grep -v beta | tail -1)
29+
gh release download --repo https://github.com/github/codeql-cli-binaries --pattern codeql-linux64.zip "$LATEST"
30+
echo "Done"
31+
echo "Unpacking CodeQL CLI..."
32+
unzip -q codeql-linux64.zip
33+
rm -f codeql-linux64.zip
34+
echo "Done"
35+
env:
36+
GITHUB_TOKEN: ${{ github.token }}
37+
38+
- name: Check out code
39+
uses: actions/checkout@v2
40+
41+
- name: Enable problem matchers in repository
42+
shell: bash
43+
run: 'find .github/problem-matchers -name \*.json -exec echo "::add-matcher::{}" \;'
44+
45+
- name: Build
46+
run: |
47+
cd go
48+
env PATH=$PATH:$HOME/codeql make
49+
50+
- name: Check that all QL and Go code is autoformatted
51+
run: |
52+
cd go
53+
env PATH=$PATH:$HOME/codeql make check-formatting
54+
55+
- name: Compile qhelp files to markdown
56+
run: |
57+
cd go
58+
env PATH=$PATH:$HOME/codeql QHELP_OUT_DIR=qhelp-out make qhelp-to-markdown
59+
60+
- name: Upload qhelp markdown
61+
uses: actions/upload-artifact@v2
62+
with:
63+
name: qhelp-markdown
64+
path: go/qhelp-out/**/*.md
65+
66+
- name: Test
67+
run: |
68+
cd go
69+
env PATH=$PATH:$HOME/codeql make test
70+
71+
test-mac:
72+
name: Test MacOS
73+
runs-on: macOS-latest
74+
steps:
75+
- name: Set up Go 1.18.1
76+
uses: actions/setup-go@v3
77+
with:
78+
go-version: 1.18.1
79+
id: go
80+
81+
- name: Set up CodeQL CLI
82+
run: |
83+
echo "Removing old CodeQL Directory..."
84+
rm -rf $HOME/codeql
85+
echo "Done"
86+
cd $HOME
87+
echo "Downloading CodeQL CLI..."
88+
LATEST=$(gh release list --repo https://github.com/github/codeql-cli-binaries | cut -f 1 | sort --version-sort | grep -v beta | tail -1)
89+
gh release download --repo https://github.com/github/codeql-cli-binaries --pattern codeql-osx64.zip "$LATEST"
90+
echo "Done"
91+
echo "Unpacking CodeQL CLI..."
92+
unzip -q codeql-osx64.zip
93+
rm -f codeql-osx64.zip
94+
echo "Done"
95+
env:
96+
GITHUB_TOKEN: ${{ github.token }}
97+
98+
- name: Check out code
99+
uses: actions/checkout@v2
100+
101+
- name: Enable problem matchers in repository
102+
shell: bash
103+
run: 'find .github/problem-matchers -name \*.json -exec echo "::add-matcher::{}" \;'
104+
105+
- name: Build
106+
run: |
107+
cd go
108+
env PATH=$PATH:$HOME/codeql make
109+
110+
- name: Test
111+
run: |
112+
cd go
113+
env PATH=$PATH:$HOME/codeql make test
114+
115+
test-win:
116+
name: Test Windows
117+
runs-on: windows-2019
118+
steps:
119+
- name: Set up Go 1.18.1
120+
uses: actions/setup-go@v3
121+
with:
122+
go-version: 1.18.1
123+
id: go
124+
125+
- name: Set up CodeQL CLI
126+
run: |
127+
echo "Removing old CodeQL Directory..."
128+
rm -rf $HOME/codeql
129+
echo "Done"
130+
cd "$HOME"
131+
echo "Downloading CodeQL CLI..."
132+
LATEST=$(gh release list --repo https://github.com/github/codeql-cli-binaries | cut -f 1 | sort --version-sort | grep -v beta | tail -1)
133+
gh release download --repo https://github.com/github/codeql-cli-binaries --pattern codeql-win64.zip "$LATEST"
134+
echo "Done"
135+
echo "Unpacking CodeQL CLI..."
136+
unzip -q -o codeql-win64.zip
137+
unzip -q -o codeql-win64.zip codeql/codeql.exe
138+
rm -f codeql-win64.zip
139+
echo "Done"
140+
env:
141+
GITHUB_TOKEN: ${{ github.token }}
142+
shell:
143+
bash
144+
145+
- name: Check out code
146+
uses: actions/checkout@v2
147+
148+
- name: Enable problem matchers in repository
149+
shell: bash
150+
run: 'find .github/problem-matchers -name \*.json -exec echo "::add-matcher::{}" \;'
151+
152+
- name: Build
153+
run: |
154+
$Env:Path += ";$HOME\codeql"
155+
cd go
156+
make
157+
158+
- name: Test
159+
run: |
160+
$Env:Path += ";$HOME\codeql"
161+
cd go
162+
make test

.github/workflows/js-ml-tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,16 @@ on:
55
paths:
66
- "javascript/ql/experimental/adaptivethreatmodeling/**"
77
- .github/workflows/js-ml-tests.yml
8+
- codeql-workspace.yml
89
branches:
910
- main
1011
- "rc/*"
1112
pull_request:
1213
paths:
1314
- "javascript/ql/experimental/adaptivethreatmodeling/**"
1415
- .github/workflows/js-ml-tests.yml
16+
- codeql-workspace.yml
17+
workflow_dispatch:
1518

1619
defaults:
1720
run:

.github/workflows/labeler.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44

55
jobs:
66
triage:
7+
permissions:
8+
contents: read
9+
pull-requests: write
710
runs-on: ubuntu-latest
811
steps:
912
- uses: actions/labeler@v4

0 commit comments

Comments
 (0)