clang-tidy – clang-based linter tool

clang-tidy is a clang-based C++ “linter” tool. Its purpose is to provide an extensible framework for diagnosing and fixing typical programming errors, like style violations, interface misuse, or bugs that can be deduced via static analysis. clang-tidy is modular and provides a convenient interface for writing new checks.

clang-tidy has its own checks and can also run Clang Static Analyzer checks. Each check has a name and the checks to run can be chosen using the -checks= option, which specifies a comma-separated list of positive and negative (prefixed with -) globs. Positive globs add subsets of checks, and negative globs remove them.

clang-tidy originated as part of the LLVM project, leveraging the Clang compiler’s robust parsing and semantic analysis capabilities. It was developed to provide a powerful, open-source alternative to commercial static analysis tools for C, C++, and Objective-C, enabling deeper code insights and seamless integration into CI/CD pipelines. Its development is ongoing, with new checks and features continually added by the community.

This is free and open source software.

Website: clang.llvm.org/extra/clang-tidy
Support:
Developer: The LLVM Project
License: Apache License v2.0

clang-tidy is written in C++. Learn C++ with our recommended free books and free tutorials.


Related Software

C and C++ Linters
OCLintStatic code analysis tool for improving quality and reducing defects
cpplintStatic code checker for C++
UncrustifySource code beautifer
Include What You UseSource analysis tool for C and C++ projects built on Clang
CppcheckStatic analysis tool for C/C++ code
ClangFormatCode formatting tool
Clang-TidyClang-based C++ “linter” tool

Read our verdict in the software roundup.


Best Free and Open Source Software Explore our comprehensive directory of recommended free and open source software. Our carefully curated collection spans every major software category.

This directory is part of our ongoing series of informative articles for Linux enthusiasts. It features hundreds of detailed reviews, along with open source alternatives to proprietary solutions from major corporations such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk.

You’ll also find interesting projects to try, hardware coverage, free programming books and tutorials, and much more.

Discovered a useful open source Linux program that we haven’t covered yet? Let us know by completing this form.
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted