mirror of
https://github.com/github/codeql.git
synced 2026-02-11 20:51:06 +01:00
Emit the new diagnostic
This commit is contained in:
1
go/extractor/registries/BUILD.bazel
generated
1
go/extractor/registries/BUILD.bazel
generated
@@ -7,6 +7,7 @@ go_library(
|
||||
srcs = ["registryproxy.go"],
|
||||
importpath = "github.com/github/codeql-go/extractor/registries",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = ["//go/extractor/diagnostics"],
|
||||
)
|
||||
|
||||
go_test(
|
||||
|
||||
@@ -8,6 +8,8 @@ import (
|
||||
"os"
|
||||
"os/exec"
|
||||
"strings"
|
||||
|
||||
"github.com/github/codeql-go/extractor/diagnostics"
|
||||
)
|
||||
|
||||
const PROXY_HOST = "CODEQL_PROXY_HOST"
|
||||
@@ -132,6 +134,18 @@ func getEnvVars() []string {
|
||||
}
|
||||
}
|
||||
|
||||
// Emit a diagnostic to make it easy for users to see that private registry
|
||||
// configurations were picked up by the Go analysis.
|
||||
if len(activeConfigs) > 0 {
|
||||
prettyConfigs := []string{}
|
||||
for i := range activeConfigs {
|
||||
prettyConfigs = append(prettyConfigs, activeConfigs[i].Pretty())
|
||||
}
|
||||
|
||||
diagnostics.EmitPrivateRegistryUsed(diagnostics.DefaultWriter, prettyConfigs)
|
||||
}
|
||||
|
||||
// Assemble environment variables for Go.
|
||||
goprivate := []string{}
|
||||
|
||||
if len(goproxy_servers) > 0 {
|
||||
|
||||
Reference in New Issue
Block a user