yamllint
yamllint copied to clipboard
Configuring yamlint from setup.cfg
Hi, is it possibile to configure all the flags from
https://yamllint.readthedocs.io/en/stable/configuration.html
with setup.cfg
?
Hi, I don't understand your question.
@adrienverge
I think this might be similar to issue I was about to raise, which is support yamllint configuration from TOML files.
For example, when using formatter black
, you can provide configuration for black as shown here:- https://github.com/psf/black/blob/main/pyproject.toml#L8
here tool black only uses configuration in section [tool.black]
Hi, sorry for not responding earlier,
@saurabheights yes, same as with toml files, many linters have option to be configured from setup.cfg, for example isort or flake8:
[isort]
line_length = 99
profile = black
[flake8]
max_line_length = 99
ignore =
F401
W504
It's nice when you don't need a separate dot file config for every tool that you're using
Hello,
If I undestand correctly, you would like yamllint to read its configuration from a file setup.cfg
in current directory, if present?
This seems very Python-specific. Although yamllint is written in Python, it is a tool used in many repos with many languages. If we read configuration from setup.cfg
, then it would be fair to also support package.json
, config.toml
, application.rb
, pyproject.toml
, etc.
Moreover, yamllint configuration is written in YAML and can be quite complex, it has a nested hierarchy of various options and keywords. I don't see how it can be easily written in setup.cfg
.