inaka / elvis_core

The core of an Erlang linter
Other
61 stars 56 forks source link

Add new ruleset, `gitignore`, with rules `gitignore_required_patterns` and `gitignore_forbidden_patterns` #357

Closed paulo-ferraz-oliveira closed 1 week ago

paulo-ferraz-oliveira commented 2 weeks ago

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

paulo-ferraz-oliveira commented 2 weeks ago

Can we make two rules, as follows?

Why not options?

paulo-ferraz-oliveira commented 2 weeks ago

And maybe we can put them in their own module (elvis_gitignore or something like that)

rebar_config and elvis_config are part of "project", which is what this rule wants to be. Why should we separate into different files?

elbrujohalcon commented 2 weeks ago

Can we make two rules, as follows?

Why not options?

Mostly to have a ruleset with 2 rules, instead of one. 😜

elbrujohalcon commented 2 weeks ago

And maybe we can put them in their own module (elvis_gitignore or something like that)

rebar_config and elvis_config are part of "project", which is what this rule wants to be. Why should we separate into different files?

Fair enough. Let it be in elvis_project. :)

paulo-ferraz-oliveira commented 2 weeks ago

Brujo I think you need to update the settings for this

image
paulo-ferraz-oliveira commented 2 weeks ago

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?

paulo-ferraz-oliveira commented 2 weeks ago

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.

paulo-ferraz-oliveira commented 2 weeks ago

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.

elbrujohalcon commented 1 week ago

It's approved, @paulo-ferraz-oliveira … feel free to merge it whenever the checks are ✅

paulo-ferraz-oliveira commented 1 week ago

Good stuff. Thanks, @elbrujohalcon. Merging... (just gonna resolve the open conversations because of our rules to merge)