clang-tidy-check

Installation
SKILL.md

What I do

Run clang-tidy static analysis on newly added or modified C++ files in the BE and Cloud modules, using the project's .clang-tidy configuration. The script parses git diff to identify changed line ranges and filters clang-tidy output to diagnostics on those lines where possible, reducing noise from pre-existing code. Diagnostics from included headers that were not part of the diff are filtered out, though some edge cases may still appear.

When to use me

  • After building BE, before committing C++ code changes
  • When CI reports clang-tidy warnings on your PR
  • When you want to proactively check new code for common bugs and style issues

Prerequisites

  1. The relevant module must be built first — clang-tidy needs compile_commands.json generated during the CMake build. For BE files, build BE; for Cloud files, build Cloud.
  2. clang-tidy must be installed — the project uses clang-tidy from the LDB toolchain.

Procedure

Step 1: Build the relevant module (if not already done)

Installs
2
Repository
apache/doris
GitHub Stars
15.3K
First Seen
Apr 29, 2026
clang-tidy-check — apache/doris