Skip to content

Commit 1276c41

Browse files
committed
codeql-go merge prep: integrate go/ into codeql
1 parent 097d518 commit 1276c41

19 files changed

+52
-116
lines changed

.codeqlmanifest.json

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
"*/ql/examples/qlpack.yml",
77
"*/ql/consistency-queries/qlpack.yml",
88
"cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/tainted/qlpack.yml",
9+
"go/ql/config/legacy-support/qlpack.yml",
10+
"go/build/codeql-extractor-go/codeql-extractor.yml",
911
"javascript/ql/experimental/adaptivethreatmodeling/lib/qlpack.yml",
1012
"javascript/ql/experimental/adaptivethreatmodeling/modelbuilding/qlpack.yml",
1113
"javascript/ql/experimental/adaptivethreatmodeling/src/qlpack.yml",

.gitattributes

+9
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
File renamed without changes.

go/.github/workflows/codeqltest.yml .github/workflows/go-tests.yml

+22-8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CodeQL tests
1+
name: "Go: Run Tests"
22
on: [pull_request]
33
jobs:
44

@@ -38,22 +38,30 @@ jobs:
3838
run: 'find .github/problem-matchers -name \*.json -exec echo "::add-matcher::{}" \;'
3939

4040
- name: Build
41-
run: env PATH=$PATH:$HOME/codeql make
41+
run: |
42+
cd go
43+
env PATH=$PATH:$HOME/codeql make
4244
4345
- name: Check that all QL and Go code is autoformatted
44-
run: env PATH=$PATH:$HOME/codeql make check-formatting
46+
run: |
47+
cd go
48+
env PATH=$PATH:$HOME/codeql make check-formatting
4549
4650
- name: Compile qhelp files to markdown
47-
run: env PATH=$PATH:$HOME/codeql QHELP_OUT_DIR=qhelp-out make qhelp-to-markdown
51+
run: |
52+
cd go
53+
env PATH=$PATH:$HOME/codeql QHELP_OUT_DIR=qhelp-out make qhelp-to-markdown
4854
4955
- name: Upload qhelp markdown
5056
uses: actions/upload-artifact@v2
5157
with:
5258
name: qhelp-markdown
53-
path: qhelp-out/**/*.md
59+
path: go/qhelp-out/**/*.md
5460

5561
- name: Test
56-
run: env PATH=$PATH:$HOME/codeql make test
62+
run: |
63+
cd go
64+
env PATH=$PATH:$HOME/codeql make test
5765
5866
test-mac:
5967
name: Test MacOS
@@ -90,10 +98,14 @@ jobs:
9098
run: 'find .github/problem-matchers -name \*.json -exec echo "::add-matcher::{}" \;'
9199

92100
- name: Build
93-
run: env PATH=$PATH:$HOME/codeql make
101+
run: |
102+
cd go
103+
env PATH=$PATH:$HOME/codeql make
94104
95105
- name: Test
96-
run: env PATH=$PATH:$HOME/codeql make test
106+
run: |
107+
cd go
108+
env PATH=$PATH:$HOME/codeql make test
97109
98110
test-win:
99111
name: Test Windows
@@ -135,9 +147,11 @@ jobs:
135147
- name: Build
136148
run: |
137149
$Env:Path += ";$HOME\codeql"
150+
cd go
138151
make
139152
140153
- name: Test
141154
run: |
142155
$Env:Path += ";$HOME\codeql"
156+
cd go
143157
make test

.github/workflows/ql-for-ql-build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ jobs:
140140
runs-on: ubuntu-latest
141141
strategy:
142142
matrix:
143-
folder: [cpp, csharp, java, javascript, python, ql, ruby, swift]
143+
folder: [cpp, csharp, java, javascript, python, ql, ruby, swift, go]
144144

145145
needs:
146146
- package

.gitignore

+13
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
# qltest projects and artifacts
1010
*/ql/test/**/*.testproj
1111
*/ql/test/**/*.actual
12+
*/ql/test/**/go.sum
1213

1314
# Visual studio temporaries, except a file used by QL4VS
1415
.vs/*
@@ -42,3 +43,15 @@ csharp/extractor/Semmle.Extraction.CSharp.Driver/Properties/launchSettings.json
4243

4344
# CLion project files
4445
/.clwb
46+
47+
# Go build artifacts
48+
go/build/*
49+
50+
# Go binaries
51+
go/tools/bin
52+
go/tools/linux64
53+
go/tools/osx64
54+
go/tools/win64
55+
go/tools/tokenizer.jar
56+
go/main
57+

.lgtm.yml

+4
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,17 @@ path_classifiers:
66
test:
77
- csharp/ql/src
88
- csharp/ql/test
9+
- go/ql/test
910
- javascript/extractor/parser-tests
1011
- javascript/extractor/tests
1112
- javascript/ql/src
1213
- javascript/ql/test
1314
- python/ql/src
1415
- python/ql/test
1516

17+
example:
18+
- go/ql/src
19+
1620
queries:
1721
- include: "*"
1822

CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/cpp/ @github/codeql-c-analysis
22
/csharp/ @github/codeql-csharp
3+
/go/ @github/codeql-go
34
/java/ @github/codeql-java
45
/javascript/ @github/codeql-javascript
56
/python/ @github/codeql-python

go/.codeqlmanifest.json

-20
This file was deleted.

go/.devcontainer/devcontainer.json

-10
This file was deleted.

go/.gitattributes

-6
This file was deleted.

go/.github/codeql/codeql-config.yml

-4
This file was deleted.

go/.github/workflows/check-change-note.yml

-33
This file was deleted.

go/.gitignore

-28
This file was deleted.

go/.lgtm.yml

-5
This file was deleted.

go/CODEOWNERS

-1
This file was deleted.

0 commit comments

Comments
 (0)