mirror of
https://github.com/adrienverge/yamllint.git
synced 2025-02-25 18:55:20 -06:00
Use '.yaml' extension as default, not '.yml'
As someone said [1] on the internet:
Say ".yaml" not ".yml".
This is not MS-DOS, and YML is a Yahoo XML dialect.
Similarly, we use '.json', not '.jsn'.
[1]: https://github.com/ceph/s3-tests/commit/e17c56a
This commit is contained in:
@@ -75,7 +75,7 @@ Usage
|
|||||||
.. code:: bash
|
.. code:: bash
|
||||||
|
|
||||||
# Use a pre-defined lint configuration
|
# Use a pre-defined lint configuration
|
||||||
yamllint -d relaxed file.yml
|
yamllint -d relaxed file.yaml
|
||||||
|
|
||||||
# Use a custom lint configuration
|
# Use a custom lint configuration
|
||||||
yamllint -c ~/myconfig file.yml
|
yamllint -c ~/myconfig file.yml
|
||||||
@@ -83,7 +83,7 @@ Usage
|
|||||||
.. code:: bash
|
.. code:: bash
|
||||||
|
|
||||||
# Output a parsable format (for syntax checking in editors like Vim, emacs...)
|
# Output a parsable format (for syntax checking in editors like Vim, emacs...)
|
||||||
yamllint -f parsable file.yml
|
yamllint -f parsable file.yaml
|
||||||
|
|
||||||
Configuration example
|
Configuration example
|
||||||
^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|||||||
@@ -10,14 +10,14 @@ directory, or use the ``-c`` option:
|
|||||||
|
|
||||||
.. code:: bash
|
.. code:: bash
|
||||||
|
|
||||||
yamllint -c ~/myconfig file.yml
|
yamllint -c ~/myconfig file.yaml
|
||||||
|
|
||||||
Default configuration
|
Default configuration
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
Unless told otherwise, yamllint uses its ``default`` configuration:
|
Unless told otherwise, yamllint uses its ``default`` configuration:
|
||||||
|
|
||||||
.. literalinclude:: ../yamllint/conf/default.yml
|
.. literalinclude:: ../yamllint/conf/default.yaml
|
||||||
:language: yaml
|
:language: yaml
|
||||||
|
|
||||||
Details on rules can be found on :doc:`the rules page <rules>`.
|
Details on rules can be found on :doc:`the rules page <rules>`.
|
||||||
@@ -85,7 +85,7 @@ For instance:
|
|||||||
|
|
||||||
.. code:: bash
|
.. code:: bash
|
||||||
|
|
||||||
yamllint -d "{extends: relaxed, rules: {line-length: {max: 120}}}" file.yml
|
yamllint -d "{extends: relaxed, rules: {line-length: {max: 120}}}" file.yaml
|
||||||
|
|
||||||
Errors and warnings
|
Errors and warnings
|
||||||
-------------------
|
-------------------
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ option:
|
|||||||
|
|
||||||
.. code:: bash
|
.. code:: bash
|
||||||
|
|
||||||
yamllint -c ~/myconfig file.yml
|
yamllint -c ~/myconfig file.yaml
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
|
|||||||
2
setup.py
2
setup.py
@@ -44,7 +44,7 @@ setup(
|
|||||||
|
|
||||||
packages=find_packages(),
|
packages=find_packages(),
|
||||||
entry_points={'console_scripts': ['yamllint=yamllint.cli:run']},
|
entry_points={'console_scripts': ['yamllint=yamllint.cli:run']},
|
||||||
package_data={'yamllint': ['conf/*.yml'],
|
package_data={'yamllint': ['conf/*.yaml'],
|
||||||
'tests': ['yaml-1.2-spec-examples/*']},
|
'tests': ['yaml-1.2-spec-examples/*']},
|
||||||
install_requires=['pyyaml'],
|
install_requires=['pyyaml'],
|
||||||
tests_require=['nose'],
|
tests_require=['nose'],
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ def get_extended_config_file(name):
|
|||||||
# Is it a standard conf shipped with yamllint...
|
# Is it a standard conf shipped with yamllint...
|
||||||
if '/' not in name:
|
if '/' not in name:
|
||||||
std_conf = os.path.join(os.path.dirname(os.path.realpath(__file__)),
|
std_conf = os.path.join(os.path.dirname(os.path.realpath(__file__)),
|
||||||
'conf', name + '.yml')
|
'conf', name + '.yaml')
|
||||||
|
|
||||||
if os.path.isfile(std_conf):
|
if os.path.isfile(std_conf):
|
||||||
return std_conf
|
return std_conf
|
||||||
|
|||||||
Reference in New Issue
Block a user