-
Notifications
You must be signed in to change notification settings - Fork 56
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
Add new ruleset, gitignore
, with rules gitignore_required_patterns
and gitignore_forbidden_patterns
#357
Conversation
3efda85
to
444bc36
Compare
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.
Can we make two rules, as follows?
required_patterns
: for stuff that must be present in the file (i.e., the current rule)forbidden_patterns
: for stuff that must not be present in the file (including, for instance,rebar.lock
)?
And maybe we can put them in their own module (elvis_gitignore
or something like that), instead of elvis_project
?
Why not options? |
|
Mostly to have a ruleset with 2 rules, instead of one. 😜 |
Fair enough. Let it be in |
If it's not much, would you check the stuff above (initial description) that needs to be updated (?) - or maybe the checks are blocked to the author? What's missing? |
It'll use files identified by `dirs`+`filter` (which should be `.gitignore`) and apply (at the moment, the only existing) rule `gitignore_patterns` with the default value found in the documentation
10bcf28
to
6e39922
Compare
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.
I think I still prefer to have 2 rules: one for required patters and one for excluded patterns. In that case, I would call the option just patterns
or (to match other rules) regexes
.
We can go with two rules, sure. One's the mirror of the other one so duplicating code and tests + adjusting shouldn't take long. |
I've updated the description: I'm gonna make it two rules, each with the same option name. And I'm tentatively saying "since" is 4.0.0. |
gitignore
, with rule gitignore_patterns
gitignore
, with rules required_patterns
and forbidden_patterns
gitignore
, with rules required_patterns
and forbidden_patterns
gitignore
, with rules gitignore_required_patterns
and gitignore_forbidden_patterns
Using OTP 27 locally :-(
It's approved, @paulo-ferraz-oliveira … feel free to merge it whenever the checks are ✅ |
Good stuff. Thanks, @elbrujohalcon. Merging... (just gonna resolve the open conversations because of our rules to merge) |
It'll use files identified by
dirs
+filter
(which should be.gitignore
) and apply(at the moment, the only existing) rule
gitignore_patterns
with the default value found in the documentation.Closes #316.
Considerations
rule namereplace with two rules:gitignore_patterns
is up for discussionrequired_patterns
andforbidden_patterns
config. optionthe option name shall beall_of
(name and content) is up for discussionregexes
gitignore
is up for discussion (though I'm rather fond of it)elvis_project
elvis_gitignore
is up for discussion (the implementation itself, too, but I'm talking more about the placement of the code)we may have to revisit the "since" once we discuss when to release stufftentatively make it 4.0.0