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

adds "exclude" knob in configuration #505

Merged
merged 1 commit into from Mar 20, 2021

Conversation

chavacava
Copy link
Collaborator

Closes #244 by adding an exclude field in the configuration. This field accepts an array of paths to exclude from the analysis. Path syntax is the same of that of the -exclude command line flag; for example the configuration

ignoreGeneratedHeader = false
severity = "warning"
confidence = 0.8
errorCode = 0
warningCode = 0
exclude = [
  "rule/...",
  "testdata/..."
]

will exclude the same files as if we execute revive with the following command line

revive -exclude rule/... -exclude testdata/... 

Excluding paths through command line flags overrides the configuration.

@chavacava chavacava requested a review from mgechev March 20, 2021 19:32
@mgechev mgechev merged commit 93b26c7 into mgechev:master Mar 20, 2021
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.

Ability to specify exclude or include file / directories in config
2 participants