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

Ignore mockery-generated files: // Code generated by mockery v1.0.0 #72

Closed
jirfag opened this issue Jun 6, 2018 · 4 comments
Closed
Labels
enhancement New feature or improvement

Comments

@jirfag
Copy link
Member

jirfag commented Jun 6, 2018

No description provided.

@alecthomas
Copy link
Contributor

There is a (sort of?) proposal for standardising on an auto-generated comment format here:
golang/go#13560

It's a bit hard to tell what the outcome is, but it might be worth following that.

@jirfag
Copy link
Member Author

jirfag commented Jun 7, 2018

thank you, but some tools don't follow this convention.
Generated code detection was already softened in #48, now maybe just need to find the line // Code generated.*

@jirfag jirfag added the enhancement New feature or improvement label Jun 7, 2018
@WillAbides
Copy link

I ran into this and found that updating mockery appends "DO NOT EDIT" to the "Code generated..." comment. This causes it to be in line with golang/go#13560 and thus be treated as generated code by golangci-lint. It looks like that was added in vektra/mockery#188.

It might still be worth adding this exception because there are still a lot of files out there that were generated by older mockery binaries.

@jirfag
Copy link
Member Author

jirfag commented Jun 9, 2018

Another pattern from easyjson:

// AUTOGENERATED FILE: easyjson .*

@jirfag jirfag closed this as completed in adb6be7 Jun 11, 2018
jirfag added a commit that referenced this issue Jun 11, 2018
…-files

Fix #72: match more autogenerated files patterns.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement
Projects
None yet
Development

No branches or pull requests

3 participants