jorisroovers / gitlint

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

Config: read from `setup.cfg` too, with `tool:gitlint:` section prefix #432

Closed scop closed 1 year ago

scop commented 1 year ago

Allows consolidating config in Python projects making use of that file.

pyproject.toml would be kind of nicer these days, but there's no TOML parser dependency in gitlint at the moment, and adding one in order to support it would sound a bit much. It can always be added in addition to this later if desired.

scop commented 1 year ago

This is "kind of a draft" in the sense that it's 100% untested, and has no tests. I can have a look at addressing those if reading from setup.cfg this way gets the green light in principle.

sigmavirus24 commented 1 year ago

For the same reasons I explained in https://github.com/jorisroovers/gitlint/issues/380 I'm a strong -1 on this

jorisroovers commented 1 year ago

This has come up multiple times before, see #82 and #115 - we've decided not to do this at this time.

Thanks for understanding!

scop commented 1 year ago

That's unfortunate. Would an option to set the ini section prefix be accepted? That way people could opt to take care of this themselves.

So essentially the gitlint-core/gitlint/config.py part of the PR here, plus the command line/env var option.

sigmavirus24 commented 1 year ago

That's unfortunate

No one has died or come down with some fatal disease

Would an option to set the ini section prefix be accepted?

That would confuse so many folks. "Why should I want to use a different section? Should I use a different section? Why do they want to let me do that?"

Many users are not python developers. The justification is just for python projects and the user base is much larger than that. This serves far too small a number of people to be worth the maintenance burden