From 41733fc7a5bca24bc69484afa8e5165832cca02a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20Verg=C3=A9?= Date: Mon, 7 Mar 2016 11:15:04 +0100 Subject: [PATCH] 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 --- README.rst | 4 ++-- docs/configuration.rst | 6 +++--- docs/quickstart.rst | 2 +- setup.py | 2 +- yamllint/conf/{default.yml => default.yaml} | 0 yamllint/conf/{relaxed.yml => relaxed.yaml} | 0 yamllint/config.py | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) rename yamllint/conf/{default.yml => default.yaml} (100%) rename yamllint/conf/{relaxed.yml => relaxed.yaml} (100%) diff --git a/README.rst b/README.rst index 1129a9a6..ee147ec3 100644 --- a/README.rst +++ b/README.rst @@ -75,7 +75,7 @@ Usage .. code:: bash # Use a pre-defined lint configuration - yamllint -d relaxed file.yml + yamllint -d relaxed file.yaml # Use a custom lint configuration yamllint -c ~/myconfig file.yml @@ -83,7 +83,7 @@ Usage .. code:: bash # Output a parsable format (for syntax checking in editors like Vim, emacs...) - yamllint -f parsable file.yml + yamllint -f parsable file.yaml Configuration example ^^^^^^^^^^^^^^^^^^^^^ diff --git a/docs/configuration.rst b/docs/configuration.rst index b9b0f743..0ba7729b 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -10,14 +10,14 @@ directory, or use the ``-c`` option: .. code:: bash - yamllint -c ~/myconfig file.yml + yamllint -c ~/myconfig file.yaml Default configuration --------------------- Unless told otherwise, yamllint uses its ``default`` configuration: -.. literalinclude:: ../yamllint/conf/default.yml +.. literalinclude:: ../yamllint/conf/default.yaml :language: yaml Details on rules can be found on :doc:`the rules page `. @@ -85,7 +85,7 @@ For instance: .. 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 ------------------- diff --git a/docs/quickstart.rst b/docs/quickstart.rst index 92127a2f..48508351 100644 --- a/docs/quickstart.rst +++ b/docs/quickstart.rst @@ -81,7 +81,7 @@ option: .. code:: bash - yamllint -c ~/myconfig file.yml + yamllint -c ~/myconfig file.yaml .. note:: diff --git a/setup.py b/setup.py index 74ad8995..0954e357 100644 --- a/setup.py +++ b/setup.py @@ -44,7 +44,7 @@ packages=find_packages(), entry_points={'console_scripts': ['yamllint=yamllint.cli:run']}, - package_data={'yamllint': ['conf/*.yml'], + package_data={'yamllint': ['conf/*.yaml'], 'tests': ['yaml-1.2-spec-examples/*']}, install_requires=['pyyaml'], tests_require=['nose'], diff --git a/yamllint/conf/default.yml b/yamllint/conf/default.yaml similarity index 100% rename from yamllint/conf/default.yml rename to yamllint/conf/default.yaml diff --git a/yamllint/conf/relaxed.yml b/yamllint/conf/relaxed.yaml similarity index 100% rename from yamllint/conf/relaxed.yml rename to yamllint/conf/relaxed.yaml diff --git a/yamllint/config.py b/yamllint/config.py index 279198f9..d0d18535 100644 --- a/yamllint/config.py +++ b/yamllint/config.py @@ -129,7 +129,7 @@ def get_extended_config_file(name): # Is it a standard conf shipped with yamllint... if '/' not in name: std_conf = os.path.join(os.path.dirname(os.path.realpath(__file__)), - 'conf', name + '.yml') + 'conf', name + '.yaml') if os.path.isfile(std_conf): return std_conf