clang-tidy
Hacker ApprovedShares rank 2 of 12 static analyzers by recommenders
Free C and C++ linter that catches common bugs and is widely recommended alongside sanitizers and compiler warnings. Critics say it struggles with lifetime checks and produces false positives.
Free C and C++ linter that catches common bugs and is widely recommended alongside sanitizers and compiler warnings. Critics say it struggles with lifetime checks and produces false positives.
18 people gave an opinion
- recommend it
- 14
- criticize it
- 4
- approval share
- 78%
Recommended in 6 of 13 months
- November 2025: recommended
- December 2025: not recommended
- January 2026: recommended
- February 2026: not recommended
- March 2026: not recommended
- April 2026: not recommended
- May 2026: not recommended
- June 2026: recommended
- July 2026: recommended
- August 2026: recommended
- September 2026: not recommended
- October 2026: recommended
- November 2026: not recommended (month in progress)
Why it carries the badge
- 14 people recommend itNeeds 10 or more, met.
- 3.5 recommenders for every criticNeeds 2 to 1 or better, met.
- Recommended in 6 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
Catches common C and C++ mistakes
“C has plenty of high quality linters like ClangTidy that can teach junior and intermediate developers what not to do”
Comment from 13 Nov 2025 in “Rust in Android: move fast and fix things” “cppcoreguidelines-init-variables + cppcoreguidelines-pro-type-member-init would have flagged it”
Comment from 5 Oct 2026 in “Type Safe Generic Data Structures in C (2025)” “It will catch that and a lot of iffy stuff.”
Comment from 7 Nov 2025 in “A prvalue is not a temporary” Core part of static analysis
“use static analysis beyond compiler warnings (Clang Tidy, Clang Static Analyzer)”
Comment from 10 Oct 2026 in “C for Rust programmers” “you'll also wanna use a static analysis tool like clang-tidy”
Comment from 11 Jan 2026 in “C++ std::move doesn't move anything: A deep dive into Value Categories” “Use clang tidy and other static analyzers”
Comment from 16 Jun 2026 in “Memory safety CVEs differ between Rust and C/C++” Free and more customisable than GCC
“GCC only recently started with its safety analysers, it doesn't do C++, and isn't as customisable as clang tidy”
Comment from 11 Aug 2026 in “Tail-call optimization in C is relatively recent” “we have modern versions freely available like clang tidy”
Comment from 15 Jan 2026 in “Is Rust faster than C?” Rules configurable for your team
“figure out good clang-tidy and clang-format rules”
Comment from 3 Jul 2026 in “Godot will no longer accept AI-authored code contributions” “Yes, configure clang-tidy as such.”
Comment from 25 Jul 2026 in “The PImpl idiom and the C++26 std:indirect type”
What people warn about
Each mark is one comment
Struggles with lifetime checks
“how MSVC and clang-tidy have struggled to achieve the Core Guidelines ideas for lifetimes”
Comment from 16 Oct 2026 in “C++26 Contracts: Introduction to Preconditions and Postconditions”
Other static analyzers people recommend
The four most recommended other static analyzers, 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.
See all 12 static analyzers, rankedWhat people said
21 of the 23 comments that mention it, newest first. Each links to the original comment.
“how MSVC and clang-tidy have struggled to achieve the Core Guidelines ideas for lifetimes”
“use static analysis beyond compiler warnings (Clang Tidy, Clang Static Analyzer)”
“If the goal is language subsetting, they do the job just fine.”
“cppcoreguidelines-init-variables + cppcoreguidelines-pro-type-member-init would have flagged it”
“GCC only recently started with its safety analysers, it doesn't do C++, and isn't as customisable as clang tidy”
“Yes, configure clang-tidy as such.”
“There's clang-format, clang-tidy, cppcheck and so many others”
“Using AI to write ruff rules or clang-tidy rules with fixes is literally the same thing and obviously best practice”
“figure out good clang-tidy and clang-format rules”
“it is a big deal to even improve C and C++ safety by at least adopt the tooling that is already there”
“Use clang tidy and other static analyzers”
“we have modern versions freely available like clang tidy”
“clang-tidy, ASAN, UBSAN, LSAN, MSAN, and TSAN are AMAZING”
“If you are coding C and C++ and NOT using clang-tidy, you are doing it wrong.”
“getting it to run at all in realistic projects is quite a chore”
“Resharper and clang-tidy still have more value than all LLMs”
“you'll also wanna use a static analysis tool like clang-tidy”
“Relying on clang-tidy, non-default compiler flags, sanitizers and other tools is not only not enough”
“C has plenty of high quality linters like ClangTidy that can teach junior and intermediate developers what not to do”
“It will catch that and a lot of iffy stuff.”
“the other messages from clang-tidy were so low quality obvious false positives too, a waste of time”
Counts come from 1,795,640 Hacker News comments, November 2025 to November 2026. How we count. Report a mistake.