iDevelop Solutions
quality

Linters and Formatters: Let the Machine Argue About Style

Code review time is precious. Spend it on logic, and let automated tools handle formatting and common mistakes.

Where the name comes from

The original lint was a Unix utility that analysed C source code. Its name now covers any tool that checks code for likely errors and style problems.

Linter versus formatter

  • A formatter rewrites code into a consistent layout: spacing, line breaks, quotes.
  • A linter warns about suspicious code: unused variables, unreachable branches, risky patterns.

A sensible setup

  1. Pick the community-standard formatter for your language and accept its defaults.
  2. Add a linter with a recommended rule set.
  3. Run both on save in the editor.
  4. Run both again in continuous integration so nothing slips through.

On an existing codebase

Format the whole project in one dedicated commit, so later history is not cluttered by formatting changes mixed with real ones.

last updated 2026-10-20