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

can I exclude files from the check? #356

Closed
hachreak opened this issue Mar 11, 2016 · 4 comments
Closed

can I exclude files from the check? #356

hachreak opened this issue Mar 11, 2016 · 4 comments

Comments

@hachreak
Copy link

I started to use this rebar3 plugin to run lint check on my project mongoql.
I'm using yecc and leex and they generate some .erl files on which I have no control.
I have many warnings on them.
Exists the possibility to exclude them from the check?

@harenson
Copy link
Member

Yes, you can exclude any module(s) by setting the ignore parameter in the rule you want to skip, e.g:

{elvis_style, no_debug_call, #{ignore => [elvis, elvis_utils]}}

In the previous tuple we are telling elvis to ignore elvis and elvis_utils modules when running no_debug_call check.

@harenson
Copy link
Member

In the last comment I show you how to ignore one or many files for a given check. If what you want is just to ignore a group of checks for one or more files, you can also do that by setting the ignore group level option for the group you want to skip, e.g:

#{dirs => ["src"],
  filter => "*.erl",
  ruleset => erl_files,
  ignore => [module1, module4]
 }

In the last example, none of the checks for erl_files would be applied to module1.erl and module4.erl files.

Also, we have created an issue for adding documentation about that group level option.

@hachreak
Copy link
Author

Thank you very much for the help!
This is a very nice tool! I already added it to all my projects... XD
Do you know if there is some integration of elvis with vim-erlang tools? (If no, if there are plans to integrate)

@elbrujohalcon
Copy link
Member

@hachreak there is no integration with vim that I know of and no plans for it around here… but you're very much welcome to add it yourself :)

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

No branches or pull requests

3 participants