Skip to content
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

Add -ignore-generated flag to ignore generated files #352

Closed
wants to merge 1 commit into from

Conversation

loderunner
Copy link

Similarly to golint, this adds a flag to ignore auto-generated files. Fillowing the official specification of generated files, the Linter purposefully ignores any file with a "generated code" comment.


One of the modifications implies that a FileIgnore with an empty Checks always returns true upon this file. This might be overstretching though I don't see where I could break.

@dominikh
Copy link
Owner

I'll have to decline that contribution. We already have a mechanism for ignoring checks in generated files: each check is responsible for deciding whether it should apply to generated files or not. Stylistic issues and code simplifications do not apply to generated code; bugs, however, should be flagged in generated code. Just because it is generated doesn't mean it is free of bugs, or that bugs are acceptable.

If any check incorrectly flags something in generated code that it shouldn't, then that's a bug that should be fixed in the check.

@dominikh dominikh closed this Nov 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants