Skip to content

structcheck should probably have -t set #52

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

Closed
cflewis opened this issue Jun 1, 2018 · 1 comment
Closed

structcheck should probably have -t set #52

cflewis opened this issue Jun 1, 2018 · 1 comment
Labels
false positive An error is reported when one does not exist

Comments

@cflewis
Copy link

cflewis commented Jun 1, 2018

By default, structcheck does not load test files, so structs with fields that are only used for testing will fail. I'm not sure that's a great default as it leads to more false positives. As you can't modify arguments for specific linters using golangci-lint (that I can see at least) it seems like it might be a good idea to run structcheck with t so it brings in the test files too.

@golangci golangci added the false positive An error is reported when one does not exist label Jun 2, 2018
golangci pushed a commit that referenced this issue Jun 2, 2018
golangci pushed a commit that referenced this issue Jun 2, 2018
@jirfag
Copy link
Contributor

jirfag commented Jun 2, 2018

Hello, thank you for the issue! I've enabled tests linting (--tests option) by default in #59

jirfag added a commit that referenced this issue Jun 2, 2018
@jirfag jirfag closed this as completed Jun 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
false positive An error is reported when one does not exist
Projects
None yet
Development

No branches or pull requests

2 participants