question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Read configuration from setup.cfg and tox.ini?

See original GitHub issue

gitlint can read configuration options from .gitlint. Is it possible add feature for reading options from setup.cfg and tox.ini?

For example flake8 can read configuration options from .flake8, setup.cfg, or tox.ini files. It is very convenient

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:4
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
sigmavirus24commented, Nov 23, 2022

Personally, gitlint isn’t a project specific to python. To the best of my knowledge people use it who aren’t using it on python projects. Switching to TOML might be nice but it’s not as common as a format as would be nice if we’re supporting a new format. Further supporting pyproject.toml only helps python projects, not anyone else. It then introduces a filename as an option that makes no sense to anyone outside the python community. I’m not fond of that, personally. Gitlint is written in python but it’s not just for python people

1reaction
jorisrooverscommented, Nov 22, 2022

I have changed my mind on this and mostly agree with @webknjaz’s and @sigmavirus24 assessment at this point.

Supporting extra formats is a lot of maintenance overhead that I’m not willing to take on right now and it indeed can cause some complexity on the user side as well.

Having said that, with the pervasiveness of pyproject.toml these days, I have had some second thoughts about #115 and whether longer term we should consider supporting it. I know for gitlint itself I’m considering moving to pyproject.toml entirely (or as much as possible). To be clear: I mean only supporting pyproject.toml in addition to .gitlint(.ini). No support for tox.ini or setup.cfg as per the reasons stated.

I think the preference of having everything sit in pyproject.toml or keep them all in separate config files is exactly that: preference. I can see that the occasional python developer or small project maintainer might be more inclined towards the single file for everything approach to declutter the project root - it’s definitely something that speaks to me. For multi-project maintainers with more standardized and automated setups, I can relate to @webknjaz’s arguments. I’ve worn both hats and again, think it’s mostly about preference and context.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Is there a reason to have both tox.ini and setup.cfg in a python ...
I don't see any similarities. setup.cfg / setup.py are for building distributions, tox.ini is for running tests in on-the- ...
Read more >
Configuration - tox
Note that setup.cfg requires the content to be under the tox:tox ... Setting it to config means that the value is read from...
Read more >
Allow setup.cfg as an alternative configuration file #297 - GitHub
I understand that seing a "tox.ini" and "pytest.ini" signals useful information. On the other hand i'd like to see python move to a...
Read more >
Understanding the purpose of tox.ini ⋆ Mark McDonnell
Tox is a tool that creates virtual environments, and installs the configured dependencies for those environments, for the purpose of testing a ...
Read more >
Configuring Flake8 — flake8 6.0.0 documentation
In our case, we keep our Flake8 configuration in tox.ini . ... your config in .flake8 , setup.cfg , or tox.ini we expect...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found