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%
Recommended in 4 of 13 months
- November 2025: not recommended
- December 2025: not recommended
- January 2026: recommended
- February 2026: recommended
- March 2026: not recommended
- April 2026: not recommended
- May 2026: recommended
- June 2026: not recommended
- July 2026: recommended
- August 2026: not recommended
- September 2026: not recommended
- October 2026: not recommended
- 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.
| Product | Recommend | Criticize | Approval | Months | Owned | Badge |
|---|---|---|---|---|---|---|
| gofmt | 26 | 5 | 84% | 10 | — | Approved |
| Black | 18 | 6 | 75% | 6 | — | Approved |
| FracturedJson | 18 | 2 | 90% | 2 | — | — |
| Prettier | 16 | 10 | 62% | 8 | — | — |
| clang-formatThis page | 7 | 1 | 88% | 4 | — | — |
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”
“figure out good clang-tidy and clang-format rules”
“clang-format was essentially perfect from my perspective”
“AlignConsecutiveAssignments in clang-format might be the right fit.”
“clang-format would be the perfect tool for this also, even though it's not designed to work on D.”
“I'd let it output whatever it wants and then run it through clang-format”
“That just makes them hard to read and leads to horrible diffs and horrible merge conflicts.”
Counts come from 1,795,640 Hacker News comments, November 2025 to November 2026. How we count. Report a mistake.