Skip to content

Commit b9db673

Browse files
authored
Update instruction: running clang-tidy (#7701)
1 parent 402dbad commit b9db673

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

shared/stinkytofu/README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,36 @@ cmake --build build --target stinkytofu_python
100100
cmake --build <build_dir> --target stinkytofu_python
101101
```
102102

103+
## Run clang-tidy
104+
105+
We use `clang-tidy-20`, so additional installation may required.
106+
107+
### 1. Download and Run the LLVM Setup Script
108+
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).
109+
110+
```bash
111+
# Get the official script and make it executable
112+
wget [https://apt.llvm.org/llvm.sh](https://apt.llvm.org/llvm.sh)
113+
chmod +x llvm.sh
114+
115+
# Run the script to add repositories
116+
sudo ./llvm.sh 20 reponly
117+
```
118+
119+
### Install `clang-tidy-20`
120+
121+
```bash
122+
sudo apt-get update
123+
sudo apt-get install -y clang-tidy-20
124+
```
125+
126+
### Run clang-tidy
127+
128+
```bash
129+
invoke build
130+
invoke tidy
131+
```
132+
103133
## Test
104134

105135
```bash

0 commit comments

Comments
 (0)