Config: Allow a user-global configuration file

Instead of just looking for `.yamllint` in the current working
directory, also look for `~/.config/yamllint/config` (using
`$XDG_CONFIG_HOME` or `$HOME`, see [1] and [2] for information).

[1]: https://specifications.freedesktop.org/basedir-spec/basedir-spec-0.6.html
[2]: https://wiki.archlinux.org/index.php/XDG_Base_Directory_support

Closes: #6
This commit is contained in:
Adrien Vergé
2016-04-21 22:24:24 +02:00
parent 1f1757ced4
commit eabd349902
4 changed files with 66 additions and 4 deletions

View File

@@ -82,7 +82,7 @@ Usage
yamllint -d relaxed file.yaml
# Use a custom lint configuration
yamllint -c ~/myconfig file.yml
yamllint -c /path/to/myconfig file-to-lint.yaml
.. code:: bash