Hacker ApprovedDepartments

clang-format

Ranked 6 of 7 code formatters by recommenders

Recommended as a near-perfect code formatter, often run alongside clang-tidy for linting and style rules.

Recommended as a near-perfect code formatter, often run alongside clang-tidy for linting and style rules.

8 people gave an opinion

recommend it
7
criticize it
1
approval share
88%
Each figure is one person. RecommendsCriticizes

Recommended in 4 of 13 months

  1. November 2025: not recommended
  2. December 2025: not recommended
  3. January 2026: recommended
  4. February 2026: recommended
  5. March 2026: not recommended
  6. April 2026: not recommended
  7. May 2026: recommended
  8. June 2026: not recommended
  9. July 2026: recommended
  10. August 2026: not recommended
  11. September 2026: not recommended
  12. October 2026: not recommended
  13. November 2026: not recommended (month in progress)

Why it doesn’t carry the badge

  • 7 people recommend itNeeds 10 or more, not met.
  • 7 recommenders for every criticNeeds 2 to 1 or better, met.
  • Recommended in 4 of 13 monthsNeeds 4 or more, met.

The same three rules apply to every product, and the badge can’t be bought. How the badge works

What people say about it

The reasons people give, with the number of comments that give each one. Open a reason to read what they said.

Why people recommend it

Each mark is one comment

  • Seen as near-perfect formatter

    “clang-format would be the perfect tool for this also, even though it's not designed to work on D.”

    Comment from 3 Feb 2026 in “G Lang – A lightweight interpreter written in D (2.4MB)”

    “clang-format was essentially perfect from my perspective”

    Comment from 5 May 2026 in “Formatting a 25M-line codebase overnight”
  • Pairs with clang-tidy and linters

    “There's clang-format, clang-tidy, cppcheck and so many others”

    Comment from 9 Jul 2026 in “Rewriting Bun in Rust”

    “figure out good clang-tidy and clang-format rules”

    Comment from 3 Jul 2026 in “Godot will no longer accept AI-authored code contributions”
  • Configurable alignment and style rules

    “AlignConsecutiveAssignments in clang-format might be the right fit.”

    Comment from 21 Feb 2026 in “Index, Count, Offset, Size”

    “figure out good clang-tidy and clang-format rules”

    Comment from 3 Jul 2026 in “Godot will no longer accept AI-authored code contributions”

Other code formatters people recommend

The four most recommended other code formatters, with the same counts for each, so you can compare like for like. The tick on each bar marks the 2 to 1 line the badge needs.

clang-format compared with 4 alternatives
ProductRecommendCriticizeApprovalMonthsOwnedBadge
gofmt26584%10—Approved
Black18675%6—Approved
FracturedJson18290%2——
Prettier161062%8——
clang-formatThis page7188%4——
See all 7 code formatters, ranked

What people said

7 of the 8 comments that mention it, newest first. Each links to the original comment.

“There's clang-format, clang-tidy, cppcheck and so many others”

RecommendsComment from 9 Jul 2026 in “Rewriting Bun in Rust”

“figure out good clang-tidy and clang-format rules”

RecommendsComment from 3 Jul 2026 in “Godot will no longer accept AI-authored code contributions”

“clang-format was essentially perfect from my perspective”

RecommendsComment from 5 May 2026 in “Formatting a 25M-line codebase overnight”

“AlignConsecutiveAssignments in clang-format might be the right fit.”

RecommendsComment from 21 Feb 2026 in “Index, Count, Offset, Size”

“clang-format would be the perfect tool for this also, even though it's not designed to work on D.”

RecommendsComment from 3 Feb 2026 in “G Lang – A lightweight interpreter written in D (2.4MB)”

“I'd let it output whatever it wants and then run it through clang-format”

RecommendsComment from 19 Jan 2026 in “Ask HN: COBOL devs, how are AI coding affecting your work?”

“That just makes them hard to read and leads to horrible diffs and horrible merge conflicts.”

CriticizesComment from 13 Dec 2025 in “I tried Gleam for Advent of Code”

Counts come from 1,795,640 Hacker News comments, November 2025 to November 2026. How we count. Report a mistake.