Awesome Linters

A community-driven list of awesome linters.

Code linters are programs that performs static analysis on your code. They check
your code for common mistakes and bad coding style/practices thus helping you
catch errors before compilation/interpretation and forcing you and your team to
keep a consistent code style within a project.

Most of the linters in this list have plugins available for popular text editors
and IDEs and are pretty easy to setup and automate (via a pre-commit hook or a
CI service for example).

This project is not closed to actual static analyzers. With this repository we
intend to have an information resource for all things related to static analysis
of code. By this, we mean that articles, talks or any other resource related to
this topic will be welcome as well as links related to actual linters.

cppcheck - Cppcheck is a static analysis
tool for C/C++ code. It provides unique code analysis to detect bugs and
focuses on detecting undefined behaviour and dangerous coding constructs. The
goal is to detect only real errors in the code (i.e. have very few false
positives).

postcss-bem-linter - Plugin
for PostCSS to lint CSS according to BEM-style. Written in JavaScript.

stylelint - CSS linter that is unopinionated, supports
plugins and has a wide range of rules built-in. Written in JavaScript, it
parses by default CSS-like syntaxes such as SCSS, Sass, Less and SugarSS.

Dart

linter - Linter for Dart mostly focused
on style lints. It’s configurable but comes with configured rules out of the
box. Written in Dart.

Dockerfile

dockerfile_lint - Rule
based linter for Dockerfiles. The linter rules can be used to check file
syntax as well as arbitrary semantic and best practice attributes determined
by the rule file writer. The linter can also be used to check LABEL rules
against docker images.

Dockerfilelint
Dockerfilelint is a node module that analyzes a Dockerfile and looks for
common traps, mistakes and helps enforce best practices

Dockerlint Linting tool for
Dockerfiles based on recommendations from Dockerfile Reference and Best
practices for writing Dockerfiles as of Docker 1.6.

hadolint - Linter for Dockerfiles. The
linter is parsing the Dockerfile into an AST and performs rules on top of the
AST. It is standing on the shoulders of ShellCheck to lint the Bash code
inside RUN instructions.

Elixir

credo - Static code analysis tool for the
Elixir language with a focus on code consistency and teaching.

Elm

elm-review - Analyzes whole Elm
projects, with a focus on shareable and custom rules written in Elm that add
guarantees the Elm compiler doesn’t give you.

English

alex - Linter to help catch insensitive
writing in English. Written in JavaScript.

proselint - Linter for English that
provides guidelines to make better writing. It has plugins for several editors
and is configurable.

yala - YALA combines many linters to improve
the quality of your code.

reStructuredText

doc8 - Doc8 is an opinionated style checker for
rst (with basic support for plain text) styles of documentation. Notice, it
does not support additional sphinx extensions. Project is also available on
OpenStack or
GitHub

SaltStack

Sass

scss-lint - Tool to help keep your SCSS
files clean and readable by running it against a collection of configurable
linter rules.

stylelint - CSS linter that is unopinionated, supports
plugins and has a wide range of rules built-in. Written in JavaScript, it
parses by default CSS-like syntaxes such as SCSS, Sass, Less and SugarSS.