docs: Attempt to clarify configuration file location

Closes #96, Closes #212
This commit is contained in:
Andrew Imeson 2022-03-24 05:23:39 -04:00 committed by GitHub
parent f58448cb21
commit 2f423117c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,11 +14,11 @@ To use a custom configuration file, use the ``-c`` option:
If ``-c`` is not provided, yamllint will look for a configuration file in the If ``-c`` is not provided, yamllint will look for a configuration file in the
following locations (by order of preference): following locations (by order of preference):
- ``.yamllint``, ``.yamllint.yaml`` or ``.yamllint.yml`` in the current working - a file named ``.yamllint``, ``.yamllint.yaml``, or ``.yamllint.yml`` in the
directory current working directory
- the file referenced by ``$YAMLLINT_CONFIG_FILE``, if set - a filename referenced by ``$YAMLLINT_CONFIG_FILE``, if set
- ``$XDG_CONFIG_HOME/yamllint/config`` - a file named ``$XDG_CONFIG_HOME/yamllint/config`` or
- ``~/.config/yamllint/config`` ``~/.config/yamllint/config``, if present
Finally if no config file is found, the default configuration is applied. Finally if no config file is found, the default configuration is applied.