Skip to main content

Clang-Tidy

note

This is BETA. The behavior of this tool might change.

Supported VersionLanguageWebsite
11C/C++https://clang.llvm.org/extra/clang-tidy

Clang-Tidy is a Clang-based C++ "linter" tool. It diagnoses typical programming errors, like style violations, interface misuse, or bugs that can be deduced via static analysis.

Getting Started#

To start using Clang-Tidy, enable it in your repository settings.

If you want to configure Clang-Tidy, please put the .clang-tidy file(YAML/JSON) in the root directory. You can disable/enable Clang-Tidy rules (Checks) via the file. See the document more details.

Configuration#

You can customize the analysis via sider.yml:

linter:  clang_tidy:    dependencies:      - libgdbm-dev      - libfastjson-dev=0.99.8-2    include-path:      - myinclude      - foo/include      - /usr/include/libfastjson
NameTypeDefault
root_dirstring-
dependenciesstring[], map[]-
include-pathstring, string[]-

No analyzer-specific options.