Skip to content

Commit 209f9ec

Browse files
authored
Amend comments per review
1 parent e528a08 commit 209f9ec

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

go/codeql-extractor.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ file_types:
2121
legacy_qltest_extraction: true
2222
options:
2323
extract_tests:
24-
title: Whether to include Go test files and functions in the CodeQL database.
24+
title: Whether to include Go test files in the CodeQL database.
2525
description: >
26-
A value indicating whether Go test files and functions should be included in the CodeQL database.
26+
A value indicating whether Go test files should be included in the CodeQL database.
2727
The default is 'false'.
2828
type: string
2929
pattern: "^(false|true)$"

go/extractor/cli/go-extractor/go-extractor.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ func usage() {
2121
fmt.Fprintf(os.Stderr, "--help Print this help.\n")
2222
}
2323

24+
// extractTests is set (a) if we were manually commanded to extract tests via the relevant
25+
// environment variable / extractor option, or (b) we're mimicking a `go test` command.
2426
func parseFlags(args []string, mimic bool, extractTests bool) ([]string, []string, bool) {
2527
i := 0
2628
buildFlags := []string{}

go/extractor/toolchain/toolchain.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ func GetPkgsInfo(patterns []string, includingDeps bool, extractTests bool, flags
232232
}
233233

234234
if extractTests {
235+
// Without the `-test` flag, test packages would be omitted from the `go list` output.
235236
flags = append(flags, "-test")
236237
}
237238

0 commit comments

Comments
 (0)