Skip to content

Fix autogen exclude for comments under package #831

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

Merged
merged 1 commit into from
Oct 22, 2019

Conversation

hypnoglow
Copy link
Contributor

The commit df4f676 broke the exclusion of autogenerated files that have appropriate comments below the package statement.

Some tools put DO NOT EDIT comment not in the beginning of the file but below the package statement, for example minimock: https://github.com/gojuno/minimock/blob/master/tests/formatter_mock.go

For such autogenerated files detection stopped working since the commit mentioned above.

This commit fixes the issue by allow scanning below the package statement.

@CLAassistant
Copy link

CLAassistant commented Oct 21, 2019

CLA assistant check
All committers have signed the CLA.

@jirfag jirfag merged commit ecccb24 into golangci:master Oct 22, 2019
@jirfag
Copy link
Contributor

jirfag commented Oct 22, 2019

thank you for this fix!

@ldez ldez added this to the v1.22 milestone Mar 6, 2024
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.

4 participants