]> Cypherpunks repositories - gostls13.git/commitdiff
cmd: update golang.org/x/tools
authorJay Conrod <jayconrod@google.com>
Tue, 16 Jun 2020 14:03:48 +0000 (10:03 -0400)
committerJay Conrod <jayconrod@google.com>
Tue, 16 Jun 2020 15:47:27 +0000 (15:47 +0000)
This pulls in CL 235797.

Fixes #39151

Change-Id: I367cff2e9b432a778213501c42fb510c1514643f
Reviewed-on: https://go-review.googlesource.com/c/go/+/238157
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Akhil Indurti <aindurti@gmail.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
src/cmd/go.mod
src/cmd/go.sum
src/cmd/vendor/golang.org/x/tools/go/analysis/doc.go
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/stringintconv/string.go
src/cmd/vendor/modules.txt

index c25ae383f798b46237462d03bf538ee1ff885ee0..48cfa67e0b63280bb5f3511e617746006765e5bd 100644 (file)
@@ -9,5 +9,5 @@ require (
        golang.org/x/crypto v0.0.0-20200429183012-4b2356b1ed79
        golang.org/x/mod v0.3.0
        golang.org/x/sys v0.0.0-20200501145240-bc7a7d42d5c3 // indirect
-       golang.org/x/tools v0.0.0-20200601175630-2caf76543d99
+       golang.org/x/tools v0.0.0-20200616133436-c1934b75d054
 )
index 067315ad54f1c15d251708ce02a91b206006ed40..9f4ec07577e28ea3d06476f909a2ad0e7a5dda5d 100644 (file)
@@ -28,8 +28,8 @@ golang.org/x/sys v0.0.0-20200501145240-bc7a7d42d5c3 h1:5B6i6EAiSYyejWfvc5Rc9BbI3
 golang.org/x/sys v0.0.0-20200501145240-bc7a7d42d5c3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
 golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20200601175630-2caf76543d99 h1:deddXmhOJb/bvD/4M/j2AUMrhHeh6GkqykJSCWyTNVk=
-golang.org/x/tools v0.0.0-20200601175630-2caf76543d99/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
+golang.org/x/tools v0.0.0-20200616133436-c1934b75d054 h1:HHeAlu5H9b71C+Fx0K+1dGgVFN1DM1/wz4aoGOA5qS8=
+golang.org/x/tools v0.0.0-20200616133436-c1934b75d054/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
 golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
 golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
 golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
index ea56b724e8b4d0d3627ff0fcdbde70700f217135..fb17a0e4154c16d31c8fd77fb958e0cc3944185e 100644 (file)
@@ -170,6 +170,15 @@ Diagnostic is defined as:
 The optional Category field is a short identifier that classifies the
 kind of message when an analysis produces several kinds of diagnostic.
 
+Many analyses want to associate diagnostics with a severity level.
+Because Diagnostic does not have a severity level field, an Analyzer's
+diagnostics effectively all have the same severity level. To separate which
+diagnostics are high severity and which are low severity, expose multiple
+Analyzers instead. Analyzers should also be separated when their
+diagnostics belong in different groups, or could be tagged differently
+before being shown to the end user. Analyzers should document their severity
+level to help downstream tools surface diagnostics properly.
+
 Most Analyzers inspect typed Go syntax trees, but a few, such as asmdecl
 and buildtag, inspect the raw text of Go source files or even non-Go
 files such as assembly. To report a diagnostic against a line of a
index ac2cd84ad375c72e7d51b3878d8fed5dacec83bc..7a005901e843b3e1b99f9dff8c8dc93dcc47d0d8 100644 (file)
@@ -101,7 +101,7 @@ func run(pass *analysis.Pass) (interface{}, error) {
                }
                diag := analysis.Diagnostic{
                        Pos:     n.Pos(),
-                       Message: fmt.Sprintf("conversion from %s to %s yields a string of one rune", source, target),
+                       Message: fmt.Sprintf("conversion from %s to %s yields a string of one rune, not a string of digits (did you mean fmt.Sprint(x)?)", source, target),
                        SuggestedFixes: []analysis.SuggestedFix{
                                {
                                        Message: "Did you mean to convert a rune to a string?",
index 334aef046278b7b2611922a61d64bb7dabf3d5c6..3f5ea193b76bb367629b709439d5adbd945ca8e0 100644 (file)
@@ -45,7 +45,7 @@ golang.org/x/mod/zip
 golang.org/x/sys/internal/unsafeheader
 golang.org/x/sys/unix
 golang.org/x/sys/windows
-# golang.org/x/tools v0.0.0-20200601175630-2caf76543d99
+# golang.org/x/tools v0.0.0-20200616133436-c1934b75d054
 ## explicit
 golang.org/x/tools/go/analysis
 golang.org/x/tools/go/analysis/internal/analysisflags