From 5b60176aa31c384546b8c5a35b58094360119363 Mon Sep 17 00:00:00 2001 From: KKyang Date: Fri, 22 May 2026 14:36:01 +0900 Subject: [PATCH] Update instruction on running clang-tidy --- shared/stinkytofu/README.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/shared/stinkytofu/README.md b/shared/stinkytofu/README.md index 5029781bebb9..5f565be654e7 100644 --- a/shared/stinkytofu/README.md +++ b/shared/stinkytofu/README.md @@ -100,6 +100,36 @@ cmake --build build --target stinkytofu_python cmake --build --target stinkytofu_python ``` +## Run clang-tidy + +We use `clang-tidy-20`, so additional installation may required. + +### 1. Download and Run the LLVM Setup Script +This script automatically detects your OS distribution, adds the correct LLVM stable/nightly APT repository, and updates your package lists[span_2](start_span)[span_2](end_span). + +```bash +# Get the official script and make it executable +wget [https://apt.llvm.org/llvm.sh](https://apt.llvm.org/llvm.sh) +chmod +x llvm.sh + +# Run the script to add repositories +sudo ./llvm.sh 20 reponly +``` + +### Install `clang-tidy-20` + +```bash +sudo apt-get update +sudo apt-get install -y clang-tidy-20 +``` + +### Run clang-tidy + +```bash +invoke build +invoke tidy +``` + ## Test ```bash