cli: Add --list-files command line option

This option lists the files to lint by yamllint, taking into account `ignore`
and `yaml-files` configuration options.
This commit is contained in:
Peter Leitzen
2023-01-10 18:48:38 +01:00
committed by GitHub
parent 2a904f8fc1
commit fa0bb03f9a
3 changed files with 55 additions and 0 deletions

View File

@@ -136,6 +136,13 @@ directories, set ``yaml-files`` configuration option. The default is:
The same rules as for ignoring paths apply (``.gitignore``-style path pattern,
see below).
If you need to know the exact list of files that yamllint would process,
without really linting them, you can use ``--list-files``:
.. code:: bash
yamllint --list-files .
Ignoring paths
--------------
@@ -220,6 +227,13 @@ or:
.. note:: However, this is mutually exclusive with the ``ignore`` key.
If you need to know the exact list of files that yamllint would process,
without really linting them, you can use ``--list-files``:
.. code:: bash
yamllint --list-files .
Setting the locale
------------------