mirror of
https://github.com/github/codeql.git
synced 2026-04-23 07:45:17 +02:00
Go: Make diagnostic names static
This commit is contained in:
@@ -497,7 +497,7 @@ func EmitNewerSystemGoRequired(requiredVersion string) {
|
||||
func EmitExtractionFailedForProjects(path []string) {
|
||||
emitDiagnostic(
|
||||
"go/autobuilder/extraction-failed-for-project",
|
||||
fmt.Sprintf("Unable to extract %d Go projects", len(path)),
|
||||
"Unable to extract some Go projects",
|
||||
fmt.Sprintf(
|
||||
"The following %d Go project%s could not be extracted successfully:\n\n`%s`\n",
|
||||
len(path),
|
||||
@@ -512,9 +512,9 @@ func EmitExtractionFailedForProjects(path []string) {
|
||||
func EmitInvalidToolchainVersion(goModPath string, version string) {
|
||||
emitDiagnostic(
|
||||
"go/autobuilder/invalid-go-toolchain-version",
|
||||
fmt.Sprintf("`%s` is not a valid Go toolchain version", version),
|
||||
"Invalid Go toolchain version",
|
||||
strings.Join([]string{
|
||||
"As of Go 1.21, toolchain versions [must use the 1.N.P syntax](https://tip.golang.org/doc/toolchain#version).",
|
||||
"As of Go 1.21, toolchain versions [must use the 1.N.P syntax](https://go.dev/doc/toolchain#version).",
|
||||
fmt.Sprintf("`%s` in `%s` does not match this syntax and there is no additional `toolchain` directive, which may cause some `go` commands to fail.", version, goModPath),
|
||||
},
|
||||
"\n\n"),
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
"location": {
|
||||
"file": "go.mod"
|
||||
},
|
||||
"markdownMessage": "As of Go 1.21, toolchain versions [must use the 1.N.P syntax](https://tip.golang.org/doc/toolchain#version).\n\n`1.21` in `go.mod` does not match this syntax and there is no additional `toolchain` directive, which may cause some `go` commands to fail.",
|
||||
"markdownMessage": "As of Go 1.21, toolchain versions [must use the 1.N.P syntax](https://go.dev/doc/toolchain#version).\n\n`1.21` in `go.mod` does not match this syntax and there is no additional `toolchain` directive, which may cause some `go` commands to fail.",
|
||||
"severity": "warning",
|
||||
"source": {
|
||||
"extractorName": "go",
|
||||
"id": "go/autobuilder/invalid-go-toolchain-version",
|
||||
"name": "`1.21` is not a valid Go toolchain version"
|
||||
"name": "Invalid Go toolchain version"
|
||||
},
|
||||
"visibility": {
|
||||
"cliSummaryTable": true,
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
"source": {
|
||||
"extractorName": "go",
|
||||
"id": "go/autobuilder/extraction-failed-for-project",
|
||||
"name": "Unable to extract 1 Go projects"
|
||||
"name": "Unable to extract some Go projects"
|
||||
},
|
||||
"visibility": {
|
||||
"cliSummaryTable": true,
|
||||
|
||||
Reference in New Issue
Block a user