You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently there are niceities that go vet and revive do not have that staticcheck provides, primarily finding and reporting on Deprecated features.
Describe the solution you'd like
Given a function/feature has been deprecated
When CI is run
Thenstaticcheck fails on deprecated usages of that feature
Example:
// First30Last30 returns the source string that has been trimmed to 30 characters at the beginning and end.funcFirst30Last30(sstring) string {
iflen(s) >60 {
returns[0:27] +"..."+s[len(s)-26:]
}
returns
}
// First30last30 returns the source string that has been trimmed to 30 characters at the beginning and end.//// Deprecated: Use First30Last30 instead.funcFirst30last30(sstring) string {
returnFirst30Last30(s)
}
First30last30 should be named First30Last30. In VSCode with the Go extension, staticcheck properly reports the deprecated usage.
❯ staticcheck
main.go:12:12: helpers.First30last30 is deprecated: Use First30Last30 instead. (SA1019)
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
https://staticcheck.dev/
Currently there are niceities that
go vet
andrevive
do not have thatstaticcheck
provides, primarily finding and reporting onDeprecated
features.Describe the solution you'd like
staticcheck
fails on deprecated usages of that featureExample:
First30last30
should be namedFirst30Last30
. In VSCode with the Go extension,staticcheck
properly reports the deprecated usage.The text was updated successfully, but these errors were encountered: