cargo-geiger
cargo-geiger copied to clipboard
Allow checking only library, not bin
I want to run cargo geiger on the tree_magic library. However, geiger tries to run on the binary as well, leading to a compile error:
error[E0463]: can't find crate for `clap`
--> src/main.rs:25:1
|
25 | extern crate clap;
| ^^^^^^^^^^^^^^^^^^ can't find crate
I think it may not be respecting the required-features = ["cli"] line in Cargo.toml, but any case I would expect --lib not to count the lines of unsafe in src/main.rs.
Thanks for the report!
Hey I'm new to these repos, but I had trouble reproducing this bug.
HEAD (fcbb9592de0104e7fe6b9a580839f360a2fddbc8) of tree_magic master is not building, so I checked out e267314, and ran cargo geiger --features=cli, but i did not see the can't find crate error you got above.
Run without --features=cli and you should get the error: cargo geiger --lib