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

Document use of generic ignore option #540

Closed
paulo-ferraz-oliveira opened this issue Oct 2, 2020 · 1 comment
Closed

Document use of generic ignore option #540

paulo-ferraz-oliveira opened this issue Oct 2, 2020 · 1 comment
Labels
documentation Documentation

Comments

@paulo-ferraz-oliveira
Copy link
Collaborator

paulo-ferraz-oliveira commented Oct 2, 2020

Related to issues #507 and #488.
Related to PR inaka/elvis_core#137.

Can be used to update the Rules wiki. Once the related PR is accepted.

Note: remove references to ignore_functions from the Wiki + move no_tabs, line_length and no_trailing_whitespace to elvis_text_style.

Tentative documentation follows.

The "ignore" option

Module-level rules implement a generic ignore mechanism that allows skipping analysis in elements of your choice.
It suffices to add the ignore list to your rules, as per the example below.

-elvis([{elvis_style, invalid_dynamic_call, #{ ignore => [elvis_core]}}]).
-elvis([{elvis_style, no_debug_call, #{ ignore => [elvis_result, elvis_utils]}}]).

You can add the exceptions using the following syntax:

  • whole module: ignore => [mod]
  • same name functions: ignore => [{mod, fun}] (available for elvis_style-based rules only)
  • module, function and arity: ignore => [{mod, fun, arity}] (available for elvis_style-based rules only)
@paulo-ferraz-oliveira
Copy link
Collaborator Author

Updating Rules wiki with this content, since it's been merged to master already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Documentation
Projects
None yet
Development

No branches or pull requests

1 participant