summaryrefslogtreecommitdiff
path: root/docs/markdown/howtox.md
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2024-11-16 16:05:05 +0100
committerDylan Baker <dylan@pnwbakers.com>2024-12-19 09:25:20 -0800
commit5768ccba6eb77167da96712c20a4e042efb31d03 (patch)
tree274bba153b1cdf9f5826d559681bd6be918b86b3 /docs/markdown/howtox.md
parent27c567de5d1807ac72708ea48018a21f0c6b8dd2 (diff)
downloadmeson-5768ccba6eb77167da96712c20a4e042efb31d03.tar.gz
ninjabackend: add support for "ninja clippy"
Add a target that builds all crates that could be extern to others, and then reruns clippy. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'docs/markdown/howtox.md')
-rw-r--r--docs/markdown/howtox.md20
1 files changed, 20 insertions, 0 deletions
diff --git a/docs/markdown/howtox.md b/docs/markdown/howtox.md
index 4a57e8569..ba6a3b8f8 100644
--- a/docs/markdown/howtox.md
+++ b/docs/markdown/howtox.md
@@ -239,6 +239,26 @@ And then pass it through the variable (remember to use absolute path):
$ SCANBUILD=$(pwd)/my-scan-build.sh ninja -C builddir scan-build
```
+## Use clippy
+
+If your project includes Rust targets, you can invoke clippy like this:
+
+```console
+$ meson setup builddir
+$ ninja -C builddir clippy
+```
+
+Clippy will also obey the `werror` [builtin option](Builtin-options.md#core-options).
+
+By default Meson uses as many concurrent processes as there are cores
+on the test machine. You can override this with the environment
+variable `MESON_NUM_PROCESSES`.
+
+Meson will look for `clippy-driver` in the same directory as `rustc`,
+or try to invoke it using `rustup` if `rustc` points to a `rustup`
+binary. If `clippy-driver` is not detected properly, you can add it to
+a [machine file](Machine-files.md).
+
## Use profile guided optimization
Using profile guided optimization with GCC is a two phase