Skip to content

Commit 86bf4fb

Browse files
committed
Go: Make diagnostic names static
1 parent c74d634 commit 86bf4fb

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

go/extractor/diagnostics/diagnostics.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ func EmitNewerSystemGoRequired(requiredVersion string) {
497497
func EmitExtractionFailedForProjects(path []string) {
498498
emitDiagnostic(
499499
"go/autobuilder/extraction-failed-for-project",
500-
fmt.Sprintf("Unable to extract %d Go projects", len(path)),
500+
"Unable to extract some Go projects",
501501
fmt.Sprintf(
502502
"The following %d Go project%s could not be extracted successfully:\n\n`%s`\n",
503503
len(path),
@@ -512,9 +512,9 @@ func EmitExtractionFailedForProjects(path []string) {
512512
func EmitInvalidToolchainVersion(goModPath string, version string) {
513513
emitDiagnostic(
514514
"go/autobuilder/invalid-go-toolchain-version",
515-
fmt.Sprintf("`%s` is not a valid Go toolchain version", version),
515+
"Invalid Go toolchain version",
516516
strings.Join([]string{
517-
"As of Go 1.21, toolchain versions [must use the 1.N.P syntax](https://tip.golang.org/doc/toolchain#version).",
517+
"As of Go 1.21, toolchain versions [must use the 1.N.P syntax](https://go.dev/doc/toolchain#version).",
518518
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),
519519
},
520520
"\n\n"),

go/ql/integration-tests/all-platforms/go/diagnostics/invalid-toolchain-version/diagnostics.expected

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
"location": {
33
"file": "go.mod"
44
},
5-
"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.",
5+
"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.",
66
"severity": "warning",
77
"source": {
88
"extractorName": "go",
99
"id": "go/autobuilder/invalid-go-toolchain-version",
10-
"name": "`1.21` is not a valid Go toolchain version"
10+
"name": "Invalid Go toolchain version"
1111
},
1212
"visibility": {
1313
"cliSummaryTable": true,

go/ql/integration-tests/all-platforms/go/two-go-mods-one-failure/diagnostics.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"source": {
1919
"extractorName": "go",
2020
"id": "go/autobuilder/extraction-failed-for-project",
21-
"name": "Unable to extract 1 Go projects"
21+
"name": "Unable to extract some Go projects"
2222
},
2323
"visibility": {
2424
"cliSummaryTable": true,

0 commit comments

Comments
 (0)