mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Amend comments per review
This commit is contained in:
@@ -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)$"
|
||||
|
||||
@@ -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{}
|
||||
|
||||
@@ -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")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user