0

Invert order of steps for running clang-tidy

Forgetting to change directories before running `gn gen .` will spray
the current directory with a bunch of random directories and files.
Switching the order of these commands makes it a bit safer to copy and
paste or reverse-search shell history without fully reading the
instructions. :)

Change-Id: Iff38edcba90d8fd0686b56af7ad6be3f25b5c4b1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4825763
Reviewed-by: Dirk Pranke <dpranke@google.com>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1193777}
This commit is contained in:
Daniel Cheng
2023-09-07 21:07:32 +00:00
committed by Chromium LUCI CQ
parent 20201f162f
commit 0241e1c781

@ -229,14 +229,14 @@ Running clang-tidy is then (hopefully) simple.
```
ninja -C out/Release chrome
```
2. Enter the build directory
2. Export Chrome's compile command database
```
gn gen out/Release --export-compile-commands
```
3. Enter the build directory
```
cd out/Release
```
3. Export Chrome's compile command database
```
gn gen . --export-compile-commands
```
4. Run clang-tidy.
```
<PATH_TO_LLVM_SRC>/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py \