Code Formatter

noun

say it: “KOHD FOR-mat-er” /ˈkoʊd ˈfɔrmætər/

A tool that rewrites code's spacing, quotes and line breaks into one consistent style, without changing what the code does.

What is a code formatter?

A code formatter rewrites a file's layout (spaces, quotes, blank lines, line breaks) into one consistent style, without changing what the code does. Ruff and Black format Python; Prettier formats JavaScript.

# before formatting
total=sum( [ 4.5,3 ] )
# after formatting
total = sum([4.5, 3])

In a sentence

  • “With a code formatter running on save, the team stopped arguing about quotes.”
  • “The code formatter fixed the spacing in all forty files in a second.”

Level: Apprentice · More Software Development terms at this level

Updated