jorisroovers / gitlint

Linting for your git commit messages
http://jorisroovers.github.io/gitlint
MIT License
806 stars 99 forks source link

Ability to define more than one extra path #395

Open carlescufi opened 1 year ago

carlescufi commented 1 year ago

As described in the title, the use case is being able to enable certain user-defined rules conditionally by adding to the extra-path that is already prepopulated in an existing .gitlint file.

jorisroovers commented 1 year ago

I can see how it would be useful to allow for multiple paths to be searched by specifying multiple --extra-path options. However "appending" to what's already specified in .gitlint conflicts with how gitlint works today wrt config precedence: CLI parameters override anything specified in .gitlint (by design).

I've seen this solved in other tools by adding a new "extend" parameter. For example, black has an --extend-exclude option which serves a similar purpose. We could do something similar by introducing an --extend-extra-path option.

carlescufi commented 1 year ago

Sound like a good proposal, thanks!