From 841a4885ec211c6450d06abf3753e0a19248f411 Mon Sep 17 00:00:00 2001 From: Xianpeng Shen Date: Sat, 26 Sep 2026 22:56:46 +0300 Subject: [PATCH] docs: fix the quick start, the clang-tidy examples and Used By - The quick start's `--checks='boost-*,...'` was split at each comma by YAML, so clang-tidy got the globs as file names and stopped with "no checks enabled". The whole argument is now quoted. - `--checks=.clang-tidy` does not load .clang-tidy: clang-tidy reads that file by itself and treats the value as one more check glob, which matches nothing. It is removed from all ten examples. - Used By drops Bosch Research (only forks of CONVINCE repositories), Jupyter Xeus (the hook is commented out) and Rancher Sandbox (the repository moved to Kubewarden), and adds doldecomp, HKUST Aerial Robotics and Kubewarden, whose default branches run the hook. --- README.md | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 60db802..65581f8 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ repos: - id: clang-format args: [--style=Google] # Other coding style: LLVM, GNU, Chromium, Microsoft, Mozilla, WebKit. - id: clang-tidy - args: [--checks='boost-*,bugprone-*,performance-*,readability-*,portability-*,modernize-*,clang-analyzer-*,cppcoreguidelines-*'] + args: ["--checks=boost-*,bugprone-*,performance-*,readability-*,portability-*,modernize-*,clang-analyzer-*,cppcoreguidelines-*"] ``` ### Custom Configuration Files @@ -83,8 +83,7 @@ repos: hooks: - id: clang-format args: [--style=file] # Loads style from .clang-format file - - id: clang-tidy - args: [--checks=.clang-tidy] # Loads checks from .clang-tidy file + - id: clang-tidy # clang-tidy reads your .clang-tidy file by itself ``` > [!TIP] @@ -102,7 +101,7 @@ repos: - id: clang-format args: [--style=file, --version=21] # Specifies version - id: clang-tidy - args: [--checks=.clang-tidy, --version=21] # Specifies version + args: [--version=21] # Specifies version ``` > [!TIP] @@ -124,7 +123,6 @@ repos: rev: v1.6.0 hooks: - id: clang-tidy - args: [--checks=.clang-tidy] # Auto-detects ./build/compile_commands.json if present ``` @@ -132,21 +130,21 @@ To specify the build directory explicitly: ```yaml - id: clang-tidy - args: [--compile-commands=build, --checks=.clang-tidy] + args: [--compile-commands=build] ``` To disable auto-detection (e.g. in a monorepo where auto-detect might pick the wrong database): ```yaml - id: clang-tidy - args: [--no-compile-commands, --checks=.clang-tidy] + args: [--no-compile-commands] ``` To see which `compile_commands.json` the hook is using, add `-v`: ```yaml - id: clang-tidy - args: [--compile-commands=build, -v, --checks=.clang-tidy] + args: [--compile-commands=build, -v] ``` > [!NOTE] @@ -239,7 +237,7 @@ repos: rev: v1.6.0 # includes --fix support hooks: - id: clang-tidy - args: [--checks=.clang-tidy, --fix] + args: [--fix] ``` > [!WARNING] @@ -261,7 +259,7 @@ repos: args: [--style=file, --version=21] files: ^(src|include)/.*\.(cpp|cc|cxx|h|hpp)$ # Limits to specific dirs and file types - id: clang-tidy - args: [--checks=.clang-tidy, --version=21] + args: [--version=21] files: ^(src|include)/.*\.(cpp|cc|cxx|h|hpp)$ ``` @@ -273,7 +271,7 @@ or `-j`: rev: v1.6.0 hooks: - id: clang-tidy - args: [--checks=.clang-tidy, --version=21, --jobs=4] + args: [--version=21, --jobs=4] ``` > [!WARNING] @@ -304,7 +302,7 @@ repos: - id: clang-format args: [--style=file, --version=21, --verbose] # Shows processed files - id: clang-tidy - args: [--checks=.clang-tidy, --verbose] # Shows which compile_commands.json is used + args: [--verbose] # Shows which compile_commands.json is used ``` ## Examples @@ -318,19 +316,19 @@ Two self-contained templates plus quick snippets for other common setups. ## Used By

- Bosch Research - Bosch Research   MIT ACL MIT ACL   bazel-contrib Bazel Contrib   CodSpeedHQ CodSpeed   - jupyter-xeus - Jupyter Xeus   + doldecomp + doldecomp   + HKUST-Aerial-Robotics + HKUST Aerial Robotics  
- rancher-sandbox - Rancher Sandbox   + kubewarden + Kubewarden   computationalgeography Computational Geography   IMSY-DKFZ @@ -339,7 +337,7 @@ Two self-contained templates plus quick snippets for other common setups. CONVINCE-Project   and many more.

- See the cpp-linter hub for the full list of organizations using cpp-linter tools. + See the cpp-linter showcase for projects using cpp-linter tools.

## FAQ