yamllint


Nameyamllint JSON
Version 1.35.1 PyPI version JSON
download
home_page
SummaryA linter for YAML files.
upload_time2024-02-16 10:50:18
maintainer
docs_urlNone
authorAdrien Vergé
requires_python>=3.8
licenseGPL-3.0-or-later
keywords yaml lint linter syntax checker
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            yamllint
========

A linter for YAML files.

yamllint does not only check for syntax validity, but for weirdnesses like key
repetition and cosmetic problems such as lines length, trailing spaces,
indentation, etc.

.. image::
   https://github.com/adrienverge/yamllint/actions/workflows/ci.yaml/badge.svg?branch=master
   :target: https://github.com/adrienverge/yamllint/actions/workflows/ci.yaml?query=branch%3Amaster
   :alt: CI tests status
.. image::
   https://coveralls.io/repos/github/adrienverge/yamllint/badge.svg?branch=master
   :target: https://coveralls.io/github/adrienverge/yamllint?branch=master
   :alt: Code coverage status
.. image:: https://readthedocs.org/projects/yamllint/badge/?version=latest
   :target: https://yamllint.readthedocs.io/en/latest/?badge=latest
   :alt: Documentation status

Written in Python (compatible with Python 3 only).

Documentation
-------------

https://yamllint.readthedocs.io/

Overview
--------

Screenshot
^^^^^^^^^^

.. image:: docs/screenshot.png
   :alt: yamllint screenshot

Installation
^^^^^^^^^^^^

Using pip, the Python package manager:

.. code:: bash

 pip install --user yamllint

yamllint is also packaged for all major operating systems, see installation
examples (``dnf``, ``apt-get``...) `in the documentation
<https://yamllint.readthedocs.io/en/stable/quickstart.html>`_.

Usage
^^^^^

.. code:: bash

 # Lint one or more files
 yamllint my_file.yml my_other_file.yaml ...

.. code:: bash

 # Lint all YAML files in a directory
 yamllint .

.. code:: bash

 # Use a pre-defined lint configuration
 yamllint -d relaxed file.yaml

 # Use a custom lint configuration
 yamllint -c /path/to/myconfig file-to-lint.yaml

.. code:: bash

 # Output a parsable format (for syntax checking in editors like Vim, emacs...)
 yamllint -f parsable file.yaml

`Read more in the complete documentation! <https://yamllint.readthedocs.io/>`__

Features
^^^^^^^^

Here is a yamllint configuration file example:

.. code:: yaml

 extends: default

 rules:
   # 80 chars should be enough, but don't fail if a line is longer
   line-length:
     max: 80
     level: warning

   # don't bother me with this rule
   indentation: disable

Within a YAML file, special comments can be used to disable checks for a single
line:

.. code:: yaml

 This line is waaaaaaaaaay too long  # yamllint disable-line

or for a whole block:

.. code:: yaml

 # yamllint disable rule:colons
 - Lorem       : ipsum
   dolor       : sit amet,
   consectetur : adipiscing elit
 # yamllint enable

Specific files can be ignored (totally or for some rules only) using a
``.gitignore``-style pattern:

.. code:: yaml

 # For all rules
 ignore: |
   *.dont-lint-me.yaml
   /bin/
   !/bin/*.lint-me-anyway.yaml

 rules:
   key-duplicates:
     ignore: |
       generated
       *.template.yaml
   trailing-spaces:
     ignore: |
       *.ignore-trailing-spaces.yaml
       /ascii-art/*

`Read more in the complete documentation! <https://yamllint.readthedocs.io/>`__

License
-------

`GPL version 3 <LICENSE>`_

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "yamllint",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "yaml,lint,linter,syntax,checker",
    "author": "Adrien Verg\u00e9",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/da/06/d8cee5c3dfd550cc0a466ead8b321138198485d1034130ac1393cc49d63e/yamllint-1.35.1.tar.gz",
    "platform": null,
    "description": "yamllint\n========\n\nA linter for YAML files.\n\nyamllint does not only check for syntax validity, but for weirdnesses like key\nrepetition and cosmetic problems such as lines length, trailing spaces,\nindentation, etc.\n\n.. image::\n   https://github.com/adrienverge/yamllint/actions/workflows/ci.yaml/badge.svg?branch=master\n   :target: https://github.com/adrienverge/yamllint/actions/workflows/ci.yaml?query=branch%3Amaster\n   :alt: CI tests status\n.. image::\n   https://coveralls.io/repos/github/adrienverge/yamllint/badge.svg?branch=master\n   :target: https://coveralls.io/github/adrienverge/yamllint?branch=master\n   :alt: Code coverage status\n.. image:: https://readthedocs.org/projects/yamllint/badge/?version=latest\n   :target: https://yamllint.readthedocs.io/en/latest/?badge=latest\n   :alt: Documentation status\n\nWritten in Python (compatible with Python 3 only).\n\nDocumentation\n-------------\n\nhttps://yamllint.readthedocs.io/\n\nOverview\n--------\n\nScreenshot\n^^^^^^^^^^\n\n.. image:: docs/screenshot.png\n   :alt: yamllint screenshot\n\nInstallation\n^^^^^^^^^^^^\n\nUsing pip, the Python package manager:\n\n.. code:: bash\n\n pip install --user yamllint\n\nyamllint is also packaged for all major operating systems, see installation\nexamples (``dnf``, ``apt-get``...) `in the documentation\n<https://yamllint.readthedocs.io/en/stable/quickstart.html>`_.\n\nUsage\n^^^^^\n\n.. code:: bash\n\n # Lint one or more files\n yamllint my_file.yml my_other_file.yaml ...\n\n.. code:: bash\n\n # Lint all YAML files in a directory\n yamllint .\n\n.. code:: bash\n\n # Use a pre-defined lint configuration\n yamllint -d relaxed file.yaml\n\n # Use a custom lint configuration\n yamllint -c /path/to/myconfig file-to-lint.yaml\n\n.. code:: bash\n\n # Output a parsable format (for syntax checking in editors like Vim, emacs...)\n yamllint -f parsable file.yaml\n\n`Read more in the complete documentation! <https://yamllint.readthedocs.io/>`__\n\nFeatures\n^^^^^^^^\n\nHere is a yamllint configuration file example:\n\n.. code:: yaml\n\n extends: default\n\n rules:\n   # 80 chars should be enough, but don't fail if a line is longer\n   line-length:\n     max: 80\n     level: warning\n\n   # don't bother me with this rule\n   indentation: disable\n\nWithin a YAML file, special comments can be used to disable checks for a single\nline:\n\n.. code:: yaml\n\n This line is waaaaaaaaaay too long  # yamllint disable-line\n\nor for a whole block:\n\n.. code:: yaml\n\n # yamllint disable rule:colons\n - Lorem       : ipsum\n   dolor       : sit amet,\n   consectetur : adipiscing elit\n # yamllint enable\n\nSpecific files can be ignored (totally or for some rules only) using a\n``.gitignore``-style pattern:\n\n.. code:: yaml\n\n # For all rules\n ignore: |\n   *.dont-lint-me.yaml\n   /bin/\n   !/bin/*.lint-me-anyway.yaml\n\n rules:\n   key-duplicates:\n     ignore: |\n       generated\n       *.template.yaml\n   trailing-spaces:\n     ignore: |\n       *.ignore-trailing-spaces.yaml\n       /ascii-art/*\n\n`Read more in the complete documentation! <https://yamllint.readthedocs.io/>`__\n\nLicense\n-------\n\n`GPL version 3 <LICENSE>`_\n",
    "bugtrack_url": null,
    "license": "GPL-3.0-or-later",
    "summary": "A linter for YAML files.",
    "version": "1.35.1",
    "project_urls": {
        "documentation": "https://yamllint.readthedocs.io",
        "homepage": "https://github.com/adrienverge/yamllint",
        "repository": "https://github.com/adrienverge/yamllint"
    },
    "split_keywords": [
        "yaml",
        "lint",
        "linter",
        "syntax",
        "checker"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "09282abf1ec14df2d584b9e7ce3b0be458838741e6aaff7a540374ba9af83916",
                "md5": "a3f5c2c6902e01be0afe8f86f0c9121b",
                "sha256": "2e16e504bb129ff515b37823b472750b36b6de07963bd74b307341ef5ad8bdc3"
            },
            "downloads": -1,
            "filename": "yamllint-1.35.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a3f5c2c6902e01be0afe8f86f0c9121b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 66738,
            "upload_time": "2024-02-16T10:50:16",
            "upload_time_iso_8601": "2024-02-16T10:50:16.060705Z",
            "url": "https://files.pythonhosted.org/packages/09/28/2abf1ec14df2d584b9e7ce3b0be458838741e6aaff7a540374ba9af83916/yamllint-1.35.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "da06d8cee5c3dfd550cc0a466ead8b321138198485d1034130ac1393cc49d63e",
                "md5": "17d33f3ac5b2808fb299d27291977364",
                "sha256": "7a003809f88324fd2c877734f2d575ee7881dd9043360657cc8049c809eba6cd"
            },
            "downloads": -1,
            "filename": "yamllint-1.35.1.tar.gz",
            "has_sig": false,
            "md5_digest": "17d33f3ac5b2808fb299d27291977364",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 134583,
            "upload_time": "2024-02-16T10:50:18",
            "upload_time_iso_8601": "2024-02-16T10:50:18.405145Z",
            "url": "https://files.pythonhosted.org/packages/da/06/d8cee5c3dfd550cc0a466ead8b321138198485d1034130ac1393cc49d63e/yamllint-1.35.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-16 10:50:18",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "adrienverge",
    "github_project": "yamllint",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "yamllint"
}
        
Elapsed time: 0.20621s