-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
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
govet: add more analyzers #759
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,18 +13,26 @@ import ( | |
"golang.org/x/tools/go/analysis/passes/atomic" | ||
"golang.org/x/tools/go/analysis/passes/atomicalign" | ||
"golang.org/x/tools/go/analysis/passes/bools" | ||
"golang.org/x/tools/go/analysis/passes/buildssa" | ||
"golang.org/x/tools/go/analysis/passes/buildtag" | ||
"golang.org/x/tools/go/analysis/passes/cgocall" | ||
"golang.org/x/tools/go/analysis/passes/composite" | ||
"golang.org/x/tools/go/analysis/passes/copylock" | ||
"golang.org/x/tools/go/analysis/passes/ctrlflow" | ||
"golang.org/x/tools/go/analysis/passes/deepequalerrors" | ||
"golang.org/x/tools/go/analysis/passes/errorsas" | ||
"golang.org/x/tools/go/analysis/passes/findcall" | ||
"golang.org/x/tools/go/analysis/passes/httpresponse" | ||
"golang.org/x/tools/go/analysis/passes/inspect" | ||
"golang.org/x/tools/go/analysis/passes/loopclosure" | ||
"golang.org/x/tools/go/analysis/passes/lostcancel" | ||
"golang.org/x/tools/go/analysis/passes/nilfunc" | ||
"golang.org/x/tools/go/analysis/passes/nilness" | ||
"golang.org/x/tools/go/analysis/passes/pkgfact" | ||
"golang.org/x/tools/go/analysis/passes/printf" | ||
"golang.org/x/tools/go/analysis/passes/shadow" | ||
"golang.org/x/tools/go/analysis/passes/shift" | ||
"golang.org/x/tools/go/analysis/passes/sortslice" | ||
"golang.org/x/tools/go/analysis/passes/stdmethods" | ||
"golang.org/x/tools/go/analysis/passes/structtag" | ||
"golang.org/x/tools/go/analysis/passes/tests" | ||
|
@@ -41,18 +49,26 @@ func getAllAnalyzers() []*analysis.Analyzer { | |
atomic.Analyzer, | ||
atomicalign.Analyzer, | ||
bools.Analyzer, | ||
buildssa.Analyzer, | ||
buildtag.Analyzer, | ||
cgocall.Analyzer, | ||
composite.Analyzer, | ||
copylock.Analyzer, | ||
ctrlflow.Analyzer, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the same |
||
deepequalerrors.Analyzer, | ||
errorsas.Analyzer, | ||
findcall.Analyzer, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess this reports no issues too |
||
httpresponse.Analyzer, | ||
inspect.Analyzer, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess it's internal too |
||
loopclosure.Analyzer, | ||
lostcancel.Analyzer, | ||
nilfunc.Analyzer, | ||
nilness.Analyzer, | ||
pkgfact.Analyzer, | ||
printf.Analyzer, | ||
shadow.Analyzer, | ||
shift.Analyzer, | ||
sortslice.Analyzer, | ||
stdmethods.Analyzer, | ||
structtag.Analyzer, | ||
tests.Analyzer, | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but this analyzer in internal and exists just for building SSA: it reports no issues
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we automatically filter internal analyzers by some condition?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know how to do it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like the following should work:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've created the #763 to address this issue.
I still want to import every analyzer and explicitly filter external ones, seems like it is most maintainable approach.