Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

option to print the configuration file path that is being used #667

Open
bjt-user opened this issue Apr 10, 2024 · 1 comment
Open

option to print the configuration file path that is being used #667

bjt-user opened this issue Apr 10, 2024 · 1 comment

Comments

@bjt-user
Copy link

bjt-user commented Apr 10, 2024

Hello,

a

yamllint --config-path

or

yamllint -p

would be helpful to know where the config file is.

Or maybe a --verbose option that outputs the config file that is in play.

I had to use

pacman -Fl yamllint

and search through the output to find out that /usr/lib/python3.11/site-packages/yamllint/conf/default.yaml is responsible for the linting rules.

PS: How do I run/build/link this project?
This did not work:

$ python3 __main__.py 
Traceback (most recent call last):
  File "/home/bf/workspace/git/yamllint/yamllint/__main__.py", line 16, in <module>
    from yamllint.cli import run
ModuleNotFoundError: No module named 'yamllint'
@adrienverge
Copy link
Owner

Hello,

I understand the need, but I'm not sure printing a file path would make sense, since yamllint can recursively aggregate multiple config files + command-line arguments to parse its configuration. Printing the whole configuration as text could be an option, but given the scarcity of this need, I doubt it's worth implementing it.

Most users probably search it on the web and find https://yamllint.readthedocs.io/en/stable/configuration.html#default-configuration

PS: How do I run/build/link this project?

I find that the easiest way to run yamllint from its source directory is:

PYTHONPATH=. python -m yamllint

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants