sedrubal
30dfa78923
Use argparse mutually_exclusive_group for --config-file and --config-data
...
This does the same as your solution 😉
8 years ago
Jonathan Sokolowski
03e0f5aa6b
Add strict mode argument to CLI
8 years ago
Adrien Vergé
a2c68fdf9b
feat(cli): Colour output only on TTY
...
When piping yamllint output to a file, "coloured" characters aren't
interpreted and pollute text formatting with glyphs like:
�[4m./global.yaml�[0m
�[2m1439:52�[0m �[31merror�[0m no new line character...
With this commit, stdout is checked: if it's a TTY then output is
coloured, otherwise output is simple text.
Closes : #14
9 years ago
Adrien Vergé
92ff315fb4
Tests: Set proper LC_ALL when decoding UTF-8 is needed
...
Make sure the default localization conditions on the "test system"
support UTF-8 encoding.
9 years ago
Adrien Vergé
c8ba8f7e99
linter: Fix UnicodeError when parsing comments
...
And add tests when reading non-ASCII strings and comments (both from
Python strings and from files).
Fixes : #10
9 years ago
Adrien Vergé
eabd349902
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
9 years ago
Adrien Vergé
59d5bffbec
Tests: cli: Detect and handle the `-d ''` case
9 years ago
Adrien Vergé
53da21934d
Tests: Add many `cli.run` test cases
9 years ago
Adrien Vergé
88ebcbbb93
Tests: Test cli.find_files_recursively
9 years ago