linter

A tool that reads code or configuration without running it and flags likely mistakes and style problems.

In more detail

Linting is cheap and fast, and catches a different class of error from tests that actually run the code. Rules can enforce style, forbid risky patterns or check project-specific conventions.

Examples

ansible-lint is the linter for Ansible content.
shellcheck script.sh
Checkov lints Terraform against numbered security checks
Design systems add lint rules that forbid layer inversions, raw colour values in components or missing accessibility attributes.
axe-core is sometimes called an accessibility linter because it reports rule violations the same way.
python3 incident/lint_postmortem.py incident/postmortem.md
Lint is one of the standard monorepo tasks next to build and test, cached like any other task.
go vet ./...
ruff check . lints a Python project.
ESLint is the usual JavaScript linter; its hooks rules point at real React bugs such as conditional hook calls or missing dependencies.
In this course: Linters such as Ruff or Flake8 for Python catch known classes of mistake quickly and consistently, so reviewers do not have to. Tune away rules that only produce noise.

Related terms

Taught in

References

Certification courses