dogsled | Go static analysis tool to find assignments | Code Analyzer library
kandi X-RAY | dogsled Summary
kandi X-RAY | dogsled Summary
dogsled is a Go static analysis tool to find assignments/declarations with too many blank identifiers (e.g. x, _, _, _, := f()). Its name was inspired from this reddit post.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- matchPackages returns a list of packages that match the given pattern .
- parseInput returns a list of ast . Files .
- matchPackagesInFS returns a list of import paths for the given pattern .
- Visit iterates over a function call .
- importPathsNoDotExpansion returns import paths without trailing dot expansion .
- processIdentifiers iterates over the files in the file set .
- Main entry point for DogSledding .
- importPaths returns import paths .
- readLine reads the line from r and returns the last line .
- hasPathPrefix reports whether s begins with prefix .
dogsled Key Features
dogsled Examples and Code Snippets
Community Discussions
Trending Discussions on dogsled
QUESTION
With golangci-lint
I know I can use skip-dirs
or skip-files
settings but these just stop reporting at the end and I think the tool still does the "work", quoting docs :
... which files to skip: they will be analyzed, but issues from them won't be reported. ...
Is there way, say with a variant of //nolint
to prevent some files getting analysed by golangci-lint
in the first place so we don't waste build-time resources - memory/cpu - on them them ?
I also tried lines at the top like // Code generated by XXX. DO NOT EDIT.
and these like //nolint
stop reporting but I think golangci-lint
is still doing the analysis - i.e. tool runs slow with high memory when big "ignored" files are present. From https://github.com/golangci/golangci-lint#nolint I can do
ANSWER
Answered 2020-Jan-22 at 19:36Using a new build tag to exclude files for golangci-lint
actually reduces its memory consumption (by preventing parsing of the files)
Example below is based on : https://android.googlesource.com/platform/external/syzkaller/+/01d1494471798d6b91af9813d1d6c3e13a55536c
Go files which will now be "efficiently" skipped
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install dogsled
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page