All Projects → adrienverge → Yamllint

adrienverge / Yamllint

Licence: gpl-3.0
A linter for YAML files.

Programming Languages

python
139335 projects - #7 most used programming language
Roff
2310 projects

Projects that are alternatives of or similar to Yamllint

KaiZen-OpenApi-Parser
High-performance Parser, Validator, and Java Object Model for OpenAPI 3.x
Stars: ✭ 119 (-93.2%)
Mutual labels:  lint, yaml, linter
Gitlint
Linting for your git commit messages
Stars: ✭ 404 (-76.91%)
Mutual labels:  linter, lint
Awesome Lint
Linter for Awesome lists
Stars: ✭ 385 (-78%)
Mutual labels:  linter, lint
Ktlint
An anti-bikeshedding Kotlin linter with built-in formatter
Stars: ✭ 4,629 (+164.51%)
Mutual labels:  linter, lint
Exakat
The Exakat Engine : smart static analysis for PHP
Stars: ✭ 346 (-80.23%)
Mutual labels:  linter, lint
Detekt
Static code analysis for Kotlin
Stars: ✭ 4,169 (+138.23%)
Mutual labels:  linter, lint
Checkmake
experimental linter/analyzer for Makefiles
Stars: ✭ 420 (-76%)
Mutual labels:  linter, lint
elint
A easy way to lint your code
Stars: ✭ 38 (-97.83%)
Mutual labels:  lint, linter
Redbot
REDbot is lint for HTTP.
Stars: ✭ 475 (-72.86%)
Mutual labels:  linter, lint
Phplint
🐛 A tool that can speed up linting of php files by running several lint processes at once.
Stars: ✭ 646 (-63.09%)
Mutual labels:  linter, lint
Stylelint
A mighty, modern linter that helps you avoid errors and enforce conventions in your styles.
Stars: ✭ 9,350 (+434.29%)
Mutual labels:  linter, lint
Svlint
SystemVerilog linter
Stars: ✭ 103 (-94.11%)
Mutual labels:  linter, lint
Reviewdog
🐶 Automated code review tool integrated with any code analysis tools regardless of programming language
Stars: ✭ 4,541 (+159.49%)
Mutual labels:  linter, lint
Linter
Linter for Dart.
Stars: ✭ 372 (-78.74%)
Mutual labels:  linter, lint
gandalf-lint
Bad Code Shall Not Pass
Stars: ✭ 29 (-98.34%)
Mutual labels:  lint, linter
Lockfile Lint
Lint an npm or yarn lockfile to analyze and detect security issues
Stars: ✭ 411 (-76.51%)
Mutual labels:  linter, lint
Atom Linter Alex
Linter plugin using alex to catch insensitive, inconsiderate writing
Stars: ✭ 87 (-95.03%)
Mutual labels:  linter, lint
Format.cmake
💅 Stylize your code! Automatic clang-format and cmake-format targets for CMake.
Stars: ✭ 94 (-94.63%)
Mutual labels:  lint, linter
selective
Statically find HTML anti patterns using CSS Selectors
Stars: ✭ 15 (-99.14%)
Mutual labels:  lint, linter
Gradle Lint Plugin
A pluggable and configurable linter tool for identifying and reporting on patterns of misuse or deprecations in Gradle scripts.
Stars: ✭ 473 (-72.97%)
Mutual labels:  linter, lint

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.

CI tests status Code coverage status Documentation status

Written in Python (compatible with Python 3 only).

Documentation

https://yamllint.readthedocs.io/

Overview

Screenshot

yamllint screenshot

Installation

Using pip, the Python package manager:

pip install --user yamllint

yamllint is also packaged for all major operating systems, see installation examples (dnf, apt-get...) in the documentation.

Usage

# Lint one or more files
yamllint my_file.yml my_other_file.yaml ...
# Lint all YAML files in a directory
yamllint .
# 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
# Output a parsable format (for syntax checking in editors like Vim, emacs...)
yamllint -f parsable file.yaml

Read more in the complete documentation!

Features

Here is a yamllint configuration file example:

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:

This line is waaaaaaaaaay too long  # yamllint disable-line

or for a whole block:

# 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:

# 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!

License

GPL version 3

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].