Closed cristianoliveira closed 8 years ago
Does it work if you pass the flags it asks for? (before the --
)
Hey @arcnmx Thanks for answering so fast :)
Which option should I pass through it?
Depending on which part of your source you want to run the lint over, cargo clippy --lib
or cargo clippy --bin BINARY_NAME_HERE
. It can't do all at the same time for a multi-crate project, basically.
Even using it. :(
cargo clippy --lib [ruby-2.2.1]
error: extra arguments to `rustc` can only be passed to one target, consider filtering
the package by passing e.g. `--lib` or `--bin NAME` to specify a single target
error: third party subcommand `cargo-clippy` exited unsuccessfully
To learn more, run the command again with --verbose.
Do you have some practical example? I mean, some project that use it currently and the command that I should use.
That's correct. How did you install cargo-clippy?
I've downloaded this repo, compiled it and created a symbolic link to /usr/local/bin/cargo-clippy
Can you point to a specific codebase / github repo where you're encountering this problem? Also does which cargo-clippy
point to /usr/local/bin/cargo-clippy
?
The code I am trying to run on is this one:
git clone git@github.com:cristianoliveira/funzzy.git
Where cargo-clippy is installed:
crosa@cristianoliveira ~/others/rust-clippy (master)$
which cargo-clippy
/usr/local/bin/cargo-clippy
works fine here on Linux... both:
cargo clippy --release --lib -- -Dclippy -Wclippy_pedantic --verbose
cargo clippy --release --bin funzzy -- -Dclippy -Wclippy_pedantic --verbose
However, you may just be better off checking out the new cargo-clippy: http://llogiq.github.io/2016/05/11/clippy.html
I've updated the nightly version of Rust to rustc 1.10.0-nightly (e0fd34bba 2016-05-09)
and it worked :)
Environment: