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 support to exclude packages/paths #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

danhunsaker
Copy link

  • Only works for checks that support exclusions (errcheck)
  • Other checks silently ignore the setting, since they don't support it

There might be some fancy magic we could do with, say, find -type f -iname '*.go' ... instead of ./..., but even that only works for checks that support lists of files rather than just a single package name/path. Or, well, we'd have to do some major refactoring on the checks that don't support file lists. And probably all the checks, at that, since command lines have a length limit, so large projects would break the logic with a full listing of all non-excluded files.

Anyway, this is the best I can do at the moment without addressing the problems above. Addresses #11.

Enjoy!

- Only works for checks that support exclusions (`errcheck`)
- Other checks silently ignore the setting, since they don't support it

There might be some fancy magic we could do with, say,
`find -type f -iname '*.go' ...` instead of `./...`, but even that only
works for checks that support lists of files rather than just a single
package name/path. Or, well, we'd have to do some major refactoring on
the checks that don't support file lists. And probably all the checks,
at that, since command lines have a length limit, so large projects would
break the logic with a full listing of all non-excluded files.

Anyway, this is the best I can do at the moment without addressing the
problems above. Addresses grandcolline#11.

Enjoy!
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.

None yet

1 participant