gitlint icon indicating copy to clipboard operation
gitlint copied to clipboard

Ability to define more than one extra path

Open carlescufi opened this issue 2 years ago • 2 comments

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.

carlescufi avatar Dec 20 '22 15:12 carlescufi

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.

jorisroovers avatar Dec 21 '22 10:12 jorisroovers

Sound like a good proposal, thanks!

carlescufi avatar Dec 21 '22 15:12 carlescufi