explaingit

jeffwidman/yamllint

Analysis updated 2026-07-12 · repo last pushed 2024-05-02

Audience · developerComplexity · 2/5DormantLicenseSetup · easy

TLDR

A command-line tool that checks YAML configuration files for formatting issues like bad spacing, inconsistent indentation, and duplicate keys, helping keep files clean and error-free.

Mindmap

mindmap
  root((repo))
    What it does
      Checks YAML formatting
      Finds spacing errors
      Flags duplicate keys
    How you use it
      Run from command line
      Custom config files
      Inline comment controls
    Tech stack
      Python
      Vim and Emacs output
    Use cases
      CI pipelines
      Kubernetes configs
      Static site generators
    Audience
      Developers
      DevOps folks
      Config maintainers
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Automatically check YAML files for formatting issues before merging code changes.

USE CASE 2

Keep indentation and spacing consistent across Kubernetes or CI pipeline configuration files.

USE CASE 3

Write custom rules to enforce specific YAML style guidelines for your team.

What is it built with?

Python

How does it compare?

jeffwidman/yamllint0xhassaan/nn-from-scratch0xzgbot/hermes-comfyui-skills
Stars00
LanguagePython
Last pushed2024-05-02
MaintenanceDormant
Setup difficultyeasymoderateeasy
Complexity2/54/51/5
Audiencedeveloperdeveloperdesigner

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Install via pip and run from the command line with no additional infrastructure required.

Free to use and modify, but if you distribute your changes, you must share your source code under the same license.

In plain English

YAML is a popular file format for configuration, the kind of file that tells an app or service how to behave. But YAML is picky about spacing, indentation, and structure. A single extra space or misaligned line can break things in confusing ways. yamllint catches those problems before they cause headaches. It goes beyond just checking whether your YAML is valid. It also flags things like duplicate keys, lines that are too long, trailing spaces, and inconsistent indentation, the kind of issues that won't necessarily break your file but make it harder to read and maintain over time. You run it from the command line, pointing it at a file or a whole directory. It then reports back any issues it finds. You can use the default rule set, pick a more relaxed preset, or write your own configuration file that specifies exactly which rules matter to you and which ones you'd rather ignore. You can also add special comments directly inside your YAML files to turn off specific checks for individual lines or sections, and you can tell it to skip certain files entirely using patterns similar to a .gitignore file. This is useful for anyone working with YAML regularly, developers, DevOps folks, or anyone maintaining configuration files for tools like CI pipelines, Kubernetes, or static site generators. If your project has dozens of YAML files with multiple people editing them, running this tool (often as part of an automated check before code gets merged) keeps everything clean and consistent. It's written in Python and can output results in a format that code editors like Vim or Emacs can read, so you can get feedback as you type. The project is licensed under GPL version 3, and full documentation is available on Read the Docs.

Copy-paste prompts

Prompt 1
I have a directory of YAML config files. Show me how to run yamllint against the entire folder and understand the error output it gives me.
Prompt 2
Help me write a yamllint configuration file that uses a relaxed preset but also enforces that no line exceeds 120 characters.
Prompt 3
I want to add yamllint as an automated check in my CI pipeline so that badly formatted YAML files block the merge. How do I set that up?
Prompt 4
Show me how to use inline comments in my YAML files to disable specific yamllint rules for individual lines or sections.

Frequently asked questions

What is yamllint?

A command-line tool that checks YAML configuration files for formatting issues like bad spacing, inconsistent indentation, and duplicate keys, helping keep files clean and error-free.

Is yamllint actively maintained?

Dormant — no commits in 2+ years (last push 2024-05-02).

What license does yamllint use?

Free to use and modify, but if you distribute your changes, you must share your source code under the same license.

How hard is yamllint to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is yamllint for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.