Amend comments per review

This commit is contained in:
Chris Smowton
2024-09-23 15:20:18 +01:00
committed by GitHub
parent e528a08794
commit 209f9ec93d
3 changed files with 5 additions and 2 deletions

View File

@@ -21,9 +21,9 @@ file_types:
legacy_qltest_extraction: true
options:
extract_tests:
title: Whether to include Go test files and functions in the CodeQL database.
title: Whether to include Go test files in the CodeQL database.
description: >
A value indicating whether Go test files and functions should be included in the CodeQL database.
A value indicating whether Go test files should be included in the CodeQL database.
The default is 'false'.
type: string
pattern: "^(false|true)$"

View File

@@ -21,6 +21,8 @@ func usage() {
fmt.Fprintf(os.Stderr, "--help Print this help.\n")
}
// extractTests is set (a) if we were manually commanded to extract tests via the relevant
// environment variable / extractor option, or (b) we're mimicking a `go test` command.
func parseFlags(args []string, mimic bool, extractTests bool) ([]string, []string, bool) {
i := 0
buildFlags := []string{}

View File

@@ -232,6 +232,7 @@ func GetPkgsInfo(patterns []string, includingDeps bool, extractTests bool, flags
}
if extractTests {
// Without the `-test` flag, test packages would be omitted from the `go list` output.
flags = append(flags, "-test")
}