Hacker ApprovedDepartments

clang-tidy

Hacker Approved

Shares 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%
Each figure is one person. RecommendsCriticizes

Recommended in 6 of 13 months

  1. November 2025: recommended
  2. December 2025: not recommended
  3. January 2026: recommended
  4. February 2026: not recommended
  5. March 2026: not recommended
  6. April 2026: not recommended
  7. May 2026: not recommended
  8. June 2026: recommended
  9. July 2026: recommended
  10. August 2026: recommended
  11. September 2026: not recommended
  12. October 2026: recommended
  13. 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.

clang-tidy compared with 4 alternatives
ProductRecommendCriticizeApprovalMonthsOwnedBadge
zizmor19195%6—Approved
clang-tidyThis page14478%6—Approved
Semgrep141058%7——
PHPStan110100%7—Approved
SonarQube101343%6——
See all 12 static analyzers, ranked

What 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”

MixedComment from 16 Oct 2026 in “C++26 Contracts: Introduction to Preconditions and Postconditions”

“use static analysis beyond compiler warnings (Clang Tidy, Clang Static Analyzer)”

RecommendsComment from 10 Oct 2026 in “C for Rust programmers”

“If the goal is language subsetting, they do the job just fine.”

RecommendsComment from 6 Oct 2026 in “Type Safe Generic Data Structures in C (2025)”

“cppcoreguidelines-init-variables + cppcoreguidelines-pro-type-member-init would have flagged it”

RecommendsComment from 5 Oct 2026 in “Type Safe Generic Data Structures in C (2025)”

“GCC only recently started with its safety analysers, it doesn't do C++, and isn't as customisable as clang tidy”

RecommendsComment from 11 Aug 2026 in “Tail-call optimization in C is relatively recent”

“Yes, configure clang-tidy as such.”

RecommendsComment from 25 Jul 2026 in “The PImpl idiom and the C++26 std:indirect type”

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

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

“Using AI to write ruff rules or clang-tidy rules with fixes is literally the same thing and obviously best practice”

RecommendsComment from 8 Jul 2026 in “Automating AI Away”

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

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

“it is a big deal to even improve C and C++ safety by at least adopt the tooling that is already there”

RecommendsComment from 16 Jun 2026 in “Memory safety CVEs differ between Rust and C/C++”

“Use clang tidy and other static analyzers”

RecommendsComment from 16 Jun 2026 in “Memory safety CVEs differ between Rust and C/C++”

“we have modern versions freely available like clang tidy”

RecommendsComment from 15 Jan 2026 in “Is Rust faster than C?”

“clang-tidy, ASAN, UBSAN, LSAN, MSAN, and TSAN are AMAZING”

RecommendsComment from 13 Jan 2026 in “LLVM: The Bad Parts”

“If you are coding C and C++ and NOT using clang-tidy, you are doing it wrong.”

RecommendsComment from 12 Jan 2026 in “LLVM: The Bad Parts”

“getting it to run at all in realistic projects is quite a chore”

CriticizesComment from 11 Jan 2026 in “C++ std::move doesn't move anything: A deep dive into Value Categories”

“Resharper and clang-tidy still have more value than all LLMs”

RecommendsComment from 11 Jan 2026 in “Don't fall into the anti-AI hype”

“you'll also wanna use a static analysis tool like clang-tidy”

RecommendsComment from 11 Jan 2026 in “C++ std::move doesn't move anything: A deep dive into Value Categories”

“Relying on clang-tidy, non-default compiler flags, sanitizers and other tools is not only not enough”

CriticizesComment from 26 Dec 2025 in “Memory Safety”

“C has plenty of high quality linters like ClangTidy that can teach junior and intermediate developers what not to do”

RecommendsComment from 13 Nov 2025 in “Rust in Android: move fast and fix things”

“It will catch that and a lot of iffy stuff.”

RecommendsComment from 7 Nov 2025 in “A prvalue is not a temporary”

“the other messages from clang-tidy were so low quality obvious false positives too, a waste of time”

CriticizesComment from 1 Nov 2025 on Hacker News

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