-
Notifications
You must be signed in to change notification settings - Fork 87
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
Try to implement more M:F/A ignore rules #488
Comments
I ❤️ this idea and I would totally implement it with module attributes, just like -module my_module.
-elvis #{ module => [{elvis_style, god_modules, disable}]
, {my_function, 2} => [{elvis_style, operator_spaces, #{rules => [{right, ","}]}}]
, …
}.
-export [my_function/2].
my_function(A, B) -> … That would be amazing! |
I really like your second suggestion but that's a completely different beast altogether. I can start looking into implementing my proposal. I suggest breaking off your 2nd approach to a different issue and we can track that seperately? 👍 |
Well… I'm not entirely sure what's your proposal, then. |
Example config of what I mean
Currently the nesting_level rule only allows ignoring a module. I'd like to be able to ignore The problem that I'm trying to solve is implementing Elvis on a large codebase where Elvis is unhappy about a handful of functions within modules and want to avoid having to mark the entire module as a Does that clarify this? |
It does clarify and yes… by all means, go ahead!! |
I vote that we slightly change
@elbrujohalcon: at the same time, it seems this Issue might have been closed by a previous PR already. I'll later check if a new Issue should be created with my "proposal" (I'm imagining this isn't a new suggestion, in any case). |
@paulo-ferraz-oliveira I like your idea. |
Also partially mentioned in #507. |
In order to avoid marking an entire module to be ignored, I would like to explore the option of being able to ignore specific functions within a module, possibly including the arity as an optional value. The only rule that currently supports this behaviour is
max_function_length_config
and it would be great to support more rules in this way.Especially on larger modules (one can argue that they shouldn't exist but reality sometimes punches us in the face), being forced to ignore the entire module because of one function that violates a specific rule makes me all sad.
Before exploring if this is feasible, I'd like to ask:
The text was updated successfully, but these errors were encountered: