We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(Inspired by golang/go#40356, so probably won't be as necessary if that proposal is accepted.)
What I did:
$ staticcheck --debug.version staticcheck (devel, v0.0.1-2020.1.0.20200615045319-925e3c1d1b98) Compiled with Go version: go1.14.6 Main module: honnef.co/go/[email protected] (sum: h1:8DVSlQMnJDu5uoPrBMZQcr2cz1aK/HdVSSIvhPzYx0c=) Dependencies: github.com/BurntSushi/[email protected] (sum: h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=) golang.org/x/[email protected] (sum: h1:KU7oHjnv3XNWfa5COkzUifxZmxp1TyI7ImMXqFxLwvQ=) golang.org/x/[email protected] (sum: h1:59syOWj4+Fl+op4LL8fX1kO7HmbdEWfxlw4tcGvH+y0=) golang.org/x/[email protected] (sum: h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=) $ nl -b a ./go/tmp.go 1 // +build ignore 2 3 package main 4 5 type myError struct{} 6 7 func (myError) Error() (msg string) { return "" } 8 func (myError) Unwrap() (msg string) { return "" } 9 10 func main() { 11 var err error = myError{} 12 _ = err 13 } $ staticcheck --checks=all -f stylish ./go/tmp.go ✖ 0 problems (0 errors, 0 warnings, 0 ignored)
What I expected: A warning about my error implementing the Unwrap interface incorrectly.
error
Unwrap
(This is stylecheck and not staticcheck, because this Unwrap could simply implement another interface for another library.)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
(Inspired by golang/go#40356, so probably won't be as necessary if that proposal is accepted.)
What I did:
Filtered shell output
What I expected: A warning about my
error
implementing theUnwrap
interface incorrectly.(This is stylecheck and not staticcheck, because this
Unwrap
could simply implement another interface for another library.)The text was updated successfully, but these errors were encountered: