summaryrefslogtreecommitdiff
path: root/mesonbuild/scripts/clippy.py
AgeCommit message (Collapse)Author
2025-12-20add clippy-json targetJohn Turner
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".
2025-11-19compilers: Remove Environment parameter from RustCompiler.get_rust_toolDylan Baker
2025-01-19clippy: skip "linker" blocks in target_sourcesPaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-01-08clippy: skip running it if --cap-lints allow is included in the command linePaolo Bonzini
Meson builds libraries before running clippy, thus all dependencies must be present and clippy is run only for the warnings (instead, Cargo treats clippy as a separate toolchain and builds everything). In Meson's case thus it is pointless to run clippy whenever --cap-lints allow is included in the command line. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2024-12-19scripts: add "clippy" internal toolPaolo Bonzini
Similar to the "ninja scan-build" target for C, add a clippy internal tool that runs clippy-driver on all crates in the project. The approach used is more efficient than with "ninja scan-build", and does not require rerunning Meson in a separate build directory; it uses the introspection data to find the compiler arguments for the target and invokes clippy-driver with a slightly modified command line. This could actually be applied to scan-build as well, reusing the run_tool_on_targets() function. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>