-
Notifications
You must be signed in to change notification settings - Fork 57
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
Allow {Module, Function} ignores in function_naming_convention/3 #118
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A little stylistic change, but also I don't see where we're limiting ignored functions to the scope of the module they belong to.
In other words, I would like to see a test with the following configuration not warning us for fail_function_naming_convention:camelCase
but warning us for other_module:camelCase
.
#{regex => "^([a-z][a-z0-9]*_?)*$",
ignore => [ {fail_function_naming_convention, camelCase} ]
},
- Fix indentation - Match out module when filtering functions - Add test
Don't forget to update the wiki accordingly. |
I'll do 👍 There are some more things to fix there since some rules that allow ignores aren't listed there so I'll go through the thing properly 👍 (And bump elvis once elvis_core is tagged) |
Could either of you create a new tag please? |
Could either of you create a new tag please? Thanks for the merge! |
@onno-vos-dev Release created 0.6.0. |
Thank you @jfacorro I found a lot of inconsistencies in the Wiki. l'll try and do some form of PR by creating a Wiki on my github account and comment here. Am I just mis-reading things or could it be that the Wiki is (quite severally) outdated? Line Length -> missing ignore |
We have neglected the wiki page for a long time. Maybe we should add the documentation for each rule as an edoc in each function of |
I like that idea, alternatively, we make it part of the README.md. That way at least it's version controlled and easier to block a PR if docs aren't updated with it? |
Making it part of the |
Sounds good 👍 I'll move em over on the weekend and create a PR for it 👍 |
I'm slowly trying to modify as many rules as possible to accept a
{Module, Function}
or even{Module, Function, Arity}
ignore. See: inaka/elvis#488 for a discussion that I had with @elbrujohalcon regarding this.Rather than creating a big bang PR that fixes it in many places, I'd like to start small and fix one of the easiest ones to implement this for: function_naming_convention/3
I'm apparently able to update the Wiki (which seems a bit strange...?). Once approved and merged, I'll follow up with a PR in https://github.com/inaka/elvis/blob/master/rebar.config and edit the Wiki