-
Notifications
You must be signed in to change notification settings - Fork 13
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
Ignore vendored dependencies, or those ending with certain filenames #57
Comments
Yes agreed, there was a discussion on golang/go#13560 about this to detected generated code. What are the conventions at the moment, or just make it configurable (always ignore files matching X regexp)? Edit, go-tools uses https://sourcegraph.com/github.com/dominikh/go-tools@949608b91d181682001f931700497fb4a6a9e793/-/blob/lint/lint.go#L436:16-436:27 |
I don't know if there are any great conventions right now - perhaps a combination of what |
Yeah sgtm. Relates #8 |
Until golang/go#13560 is resolved, there is no official standard. I created https://github.com/shurcooL/go/blob/978ecf0df5227d84eec040632ee76669b5a93619/analysis/generated_detection.go#L17 as a best effort solution until then. |
We consider generated code, anything that appears to be generated or is in a vendor/testdata directory. GopherCI uses github.com/gopherci/isFileGenerated which mostly uses a function provided by github.com/shurcooL/go. In using isFileGenerated, it makes it difficult for a user to provide additional files to be ignored, this would need to be implemented in similar areas by other method if we decide to support that option. This causes all issues from generated code to be ignored, there will be no option to only comment, or only set the build to failed as the issue will be ignored as soon as it's detected. An additional integration test has been provided, because although there are unit tests, it's possible the underlying tools misbehave or change their implementation details. Resolves #57.
Would be lovely to have the option to ignore folders or file prefixes (i.e.
_generated.go
), so this fortytw2/hydrocarbon#30 can be avoided in the future 😄The text was updated successfully, but these errors were encountered: