Commit Graph

419 Commits

Author SHA1 Message Date
Owen Mansel-Chan
2a41e6ae66 Emit diagnostic to pass third inegration tests 2023-03-07 16:38:49 +00:00
Owen Mansel-Chan
c0cc1c3fd5 Emit diagnostic to pass second integration test 2023-03-07 16:38:48 +00:00
Owen Mansel-Chan
3f805d3456 Remove unused param from function 2023-03-07 16:38:48 +00:00
Owen Mansel-Chan
cbb2fb9968 Emit diagnostic to pass first integration test 2023-03-07 16:38:47 +00:00
Chris Smowton
7921de243a Fix DepErrors test
This was likely harmlessly causing `go get` reruns, since most (all?) real dependency errors cause `go list` to exit with a nonzero return code in any case.
2023-01-26 11:37:41 +00:00
Michael B. Gale
1ef1d63c11 Add test for parseGoVersion 2023-01-06 11:20:51 +00:00
Michael B. Gale
9af9b32722 Find the last line of output from go version 2023-01-06 11:20:39 +00:00
Owen Mansel-Chan
14e6f9fee2 Remove @errorexpr from the dbscheme (use @badexpr) 2022-12-14 10:46:19 +00:00
Gustav Munkby
b4382855fa Fallback to package dir for discovering go.mod
This reverts to the old behavior of reusing the package directory when looking for go.mod. It seems unlikely that this is the right thing to do since we failed to find the module directory, but this behavior should be consistent with what we had before.
2022-12-01 15:43:51 +01:00
Chris Smowton
b471926030 Autoformat 2022-11-29 17:17:39 +00:00
Gustav
256d8547c1 Fix copy-paste error 2022-11-21 12:29:16 +01:00
Gustav Munkby
a293239bd5 Accelerating go-extractor by using 'go list -deps'
Resurrect https://github.com/github/codeql-go/pull/554, but behind an environment variable as to avoid the broken builds noted in https://github.com/github/codeql/issues/9304, but still allowing some people to opt in to the much faster approach.
2022-11-15 10:30:56 +01:00
Gustav Munkby
279ba60eb1 Refactor package path extraction
In preparation for pulling all package information at once.
2022-11-15 10:10:39 +01:00
Gustav
3514694cdf Fix direct access to trap.Writer from trap.Labeler 2022-11-11 18:39:25 +01:00
Gustav
fea4b816af Fix double close
Co-authored-by: Chris Smowton <smowton@github.com>
2022-11-11 17:12:13 +01:00
Gustav
f659ee3e0b Go: Optimize trap.Writer by buffering gzip writes
The TRAP writer already buffers writes before emitting to file, but running gzip compression is also fairly costly (especially if you only do it a couple of bytes at a time). Thus, this injects another buffer that collects the emitted tuples in string form, and only triggers gzip compression once the buffer is full. In my local testing, this buffering was actually more beneficial than the one between gzip and file (likely because the gzip writer already emits data in chunks), but that one is still beneficial.
2022-11-11 13:07:30 +01:00
Chris Smowton
259b942fac Indent blocks that gofmt would mistake for markdown
As of go 1.19 it will try to format markdown nicely, but in both these cases the formatting isn't supposed to be interpreted this way, so indent it to make it a preformatted block.
2022-08-19 19:06:21 +01:00
Chris Smowton
16a2107f89 Go autobuilder: don't attempt a go mod tidy when there's a vendor directory present
This is likely to spuriously remove dependencies leading to a later build failure due to missing requirements.
2022-06-16 10:12:39 +01:00
Chuan-kai Lin
aa514fff32 codeql-go merge prep: move into go/ directory 2022-05-20 10:07:19 -07:00