go/go/analysis
smasher164 c1934b75d0 go/analysis: improve error message for string(int) warning
To an experienced Go user, the previous error message doesn't describe
the error--it merely states a fact. The new error message asks if the
user meant fmt.Sprint(x). If they used the conversion correctly, the
suggested fix to replace string(int) with string(rune(int)) is
understandable and valid. On the other hand, if they used it to print
a digit representation, asking that in the error message further
emphasizes the mistake.

Updates golang/go#39151.

Change-Id: Iab9cdcaf53e9ca134285246fad0546d6f24c3983
Reviewed-on: https://go-review.googlesource.com/c/tools/+/235797
Run-TryBot: Akhil Indurti <aindurti@gmail.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Jay Conrod <jayconrod@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2020-06-16 13:34:36 +00:00
..
analysistest go/analysis/analysistest: support testing mutually exclusive suggested fixes 2020-04-27 21:46:58 +00:00
doc all: fix more typos 2019-09-11 15:13:14 +00:00
internal go/analysis/internal/checker: don't filter facts of parameters 2020-06-09 16:44:05 +00:00
multichecker Revert "go/packages: temporarily disable some tests running on go tip with -race" 2019-10-28 14:32:39 +00:00
passes go/analysis: improve error message for string(int) warning 2020-06-16 13:34:36 +00:00
singlechecker go/analysis/singlechecker: append a newline after "Flags:" 2020-03-12 17:39:32 +00:00
unitchecker go/analysis/unitchecker: add erroras analysis to align with go vet 2019-11-11 15:48:04 +00:00
analysis.go internal/lsp: add support for type error analyzers 2020-03-27 17:27:16 +00:00
diagnostic.go go/analysis, internal/lsp: add support for related information 2019-10-21 19:00:55 +00:00
doc.go go/analysis: suggest to users how to associate diagnostics with severities 2020-06-05 17:09:33 +00:00
validate.go go/analysis: remove requirement for unique Analyzer names 2019-10-16 18:38:41 +00:00