summaryrefslogtreecommitdiff
path: root/docs/markdown/snippets
diff options
context:
space:
mode:
authorJohn Turner <jturner.usa@gmail.com>2025-11-30 15:00:14 -0500
committerJohn Turner <jturner.usa@gmail.com>2025-12-20 01:21:48 -0500
commit651fe54d12f07dd98ff94f8a8cea2469e746a590 (patch)
tree2184ce050f47fbdb6f3477216ebed5d8f26ed220 /docs/markdown/snippets
parentbfa96def243340841c1752bb63eeb4add92fe25a (diff)
downloadmeson-651fe54d12f07dd98ff94f8a8cea2469e746a590.tar.gz
add clippy-json target
Add a clippy-json target to the ninja script. This is useful for rust-analyzer, which requires an "external check command" to function when not using cargo. Also we add a "clippy-json-prereq" target, and invoke it in the clippy.py script. The prereq target tries to build as much of the project as possible with "-k0".
Diffstat (limited to 'docs/markdown/snippets')
-rw-r--r--docs/markdown/snippets/clippy-json.md9
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/markdown/snippets/clippy-json.md b/docs/markdown/snippets/clippy-json.md
new file mode 100644
index 000000000..3b8ae370c
--- /dev/null
+++ b/docs/markdown/snippets/clippy-json.md
@@ -0,0 +1,9 @@
+# New "clippy-json" Ninja Target For rust-analyzer
+
+A new `clippy-json` ninja target will now be generated for rust projects.
+
+rust-analyzer supports non-cargo based projects so long as you provide it with a `rust-project.json` file and a custom "check command" to provide compiler errors.
+
+Meson already for some time has generated a `rust-project.json` file for rust-analyzer, but had no way to hook up its rustc/clippy output to rust-analyzer.
+
+To use the new feature, you want to override the rust-analyzer check command as shown [here](https://rust-analyzer.github.io/book/non_cargo_based_projects.html), and set it to `ninja clippy-json -C build` or something to the same effect.