I can not get a build in help from tarpaulin. I tried the two standard ways.
$ cargo help tarpaulin
error: Found argument '-h' which wasn't expected, or isn't valid in this context
USAGE:
cargo tarpaulin [FLAGS] [OPTIONS] [-- <args>...]
For more information try --help
$ cargo tarpaulin --help
warning: method is never used: `get_row_collum`
--> src/field.rs:46:5
|
46 | fn get_row_collum(idx: usize) -> (u8, u8) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: #[warn(dead_code)] on by default
Launching test
running /home/USERNAME/git/sudoku_solver/sudoku_solver_lib/target/debug/deps/sudoku_solver_lib-f75df56ee1f0a99a
running 15 tests
...............
test result: ok. 15 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
Coverage Results
src/exclusion_solver.rs: 0/33
src/field.rs: 96/111
src/possible_byte_fields.rs: 85/107
src/possible_fields_trait.rs: 2/4
71.76% coverage, 183/255 lines covered
Tarpaulin finished
Is there a way to list all flags?
So that is very weird, what OS are you on? If I run cargo tarpaulin --help I get:
cargo-tarpaulin version: 0.5.4
Tool to analyse test coverage of cargo projects
USAGE:
cargo tarpaulin [FLAGS] [OPTIONS] [-- <args>...]
FLAGS:
-b, --branch Branch coverage: NOT IMPLEMENTED
-f, --forward Forwards unexpected signals to test. Tarpaulin will
still take signals it is expecting.
--help Prints help information
--ignore-tests ignore lines of test functions when collecting
coverage
-i, --ignored Run ignored tests as well
-l, --line Line coverage
--no-count Disables counting line hits for a faster run
--skip-clean Skips the clean stage to reduce build times, may
affect coverage results
-V, --version Prints version information
-v, --verbose Show extra output
OPTIONS:
--ciserver <SERVICE>
Name of service, supported services are:
travis-ci, travis-pro, circle-ci, semaphore, jenkins and codeship.
If you are interfacing with coveralls.io or another site you can
also specify a name that they will recognise. Refer to their
documentation for this.
--coveralls <KEY>
Coveralls key, either the repo token, or if you're using travis use
$TRAVIS_JOB_ID and specify travis-{ci|pro} in --ciserver
-e, --exclude <PACKAGE>...
Package id specifications to exclude from coverage. See cargo help
pkgid for more info
--features <FEATURE>... Features to be included in the target project
-o, --out <FMT>... Output path [values: Json, Toml, Stdout, Xml]
-p, --packages <PACKAGE>...
Package id specifications for which package should be build. See
cargo help pkgid for more info
-r, --root <DIR> Root directory containing Cargo.toml to use
ARGS:
<args>...
OK. Strange. It is Arch Linux. I just installed this crate via cargo install cargo-tarpaulin a few hours ago.
$ cargo tarpaulin --version
cargo-tarpaulin version: 0.5.5
$ uname -a
Linux DEVICE-NAME 4.14.5-1-ARCH #1 SMP PREEMPT Sun Dec 10 14:50:30 UTC 2017 x86_64 GNU/Linux
md5-97e704c9c56f66290add32cc151114d3
$ cargo -V
cargo 0.23.0 (61fa02415 2017-11-22)
md5-97e704c9c56f66290add32cc151114d3
$ rustup show
Default host: x86_64-unknown-linux-gnu
installed toolchains
--------------------
stable-x86_64-unknown-linux-gnu (default)
nightly-2017-12-01-x86_64-unknown-linux-gnu
nightly-x86_64-unknown-linux-gnu
installed targets for active toolchain
--------------------------------------
x86_64-unknown-linux-gnu
x86_64-unknown-linux-musl
active toolchain
----------------
stable-x86_64-unknown-linux-gnu (default)
rustc 1.22.1 (05e2e1c41 2017-11-22)
Hmmm, I'm using clap and that handles the flags as well as displaying the help message. I'll check the clap docs to make sure I'm using it correctly but as this works fine for myself and other users, this might be an issue in clap instead of tarpaulin.
What happens if you run 'cargo tarpaulin --help' in a directory without a 'Cargo.toml'?
OK. Thanks for the quick response.
$ ls -lha
insgesamt 0
drwxr-xr-x 2 USERNAME users 40 Dec 13 19:10 .
drwxrwxrwt 14 root root 380 Dec 13 19:10 ..
$ cargo tarpaulin --help
Error during run
Some other interesting results:
$ cargo-tarpaulin --help
cargo-tarpaulin version: 0.5.5
Daniel McKenna, <[email protected]>
Tool to analyse test coverage of cargo projects
USAGE:
cargo [SUBCOMMAND]
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
SUBCOMMANDS:
help Prints this message or the help of the given subcommand(s)
tarpaulin Tool to analyse test coverage of cargo projects
$ cargo-tarpaulin -V
cargo-tarpaulin version: 0.5.5
md5-97e704c9c56f66290add32cc151114d3
$ cargo-tarpaulin help
cargo-tarpaulin version: 0.5.5
Daniel McKenna, <[email protected]>
Tool to analyse test coverage of cargo projects
USAGE:
cargo [SUBCOMMAND]
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
SUBCOMMANDS:
help Prints this message or the help of the given subcommand(s)
tarpaulin Tool to analyse test coverage of cargo projects
md5-97e704c9c56f66290add32cc151114d3
$ cargo tarpaulin help
error: Found argument 'help' which wasn't expected, or isn't valid in this context
USAGE:
cargo tarpaulin [FLAGS] [OPTIONS] [-- <args>...]
For more information try --help
md5-97e704c9c56f66290add32cc151114d3
$ cargo-tarpaulin tarpaulin --help
Error during run
Very interesting. That should be enough for me to go on! I'll let you know if I have any other questions or if I solve it.
So long shot but could you try to get the help message after installing this version?
cargo install cargo-tarpaulin --git https://github.com/xd009642/tarpaulin --branch issue_72 -f
It works 馃帀
$ cargo tarpaulin --help
cargo-tarpaulin version: 0.5.5
Tool to analyse test coverage of cargo projects
USAGE:
cargo tarpaulin [FLAGS] [OPTIONS] [-- <args>...]
FLAGS:
--all Build all packages in the workspace
-b, --branch Branch coverage: NOT IMPLEMENTED
-f, --forward Forwards unexpected signals to test. Tarpaulin will still take signals it is expecting.
-h, --help Prints help information
--ignore-tests ignore lines of test functions when collecting coverage
-i, --ignored Run ignored tests as well
-l, --line Line coverage
--no-count Disables counting line hits for a faster run
--skip-clean Skips the clean stage to reduce build times, may affect coverage results
-V, --version Prints version information
-v, --verbose Show extra output
OPTIONS:
--ciserver <SERVICE> Name of service, supported services are:
travis-ci, travis-pro, circle-ci, semaphore, jenkins and codeship.
If you are interfacing with coveralls.io or another site you can also specify a name
that they will recognise. Refer to their documentation for this.
--coveralls <KEY> Coveralls key, either the repo token, or if you're using travis use $TRAVIS_JOB_ID
and specify travis-{ci|pro} in --ciserver
-e, --exclude <PACKAGE>... Package id specifications to exclude from coverage. See cargo help pkgid for more
info
--features <FEATURE>... Features to be included in the target project
-o, --out <FMT>... Output path [values: Json, Toml, Stdout, Xml]
-p, --packages <PACKAGE>... Package id specifications for which package should be build. See cargo help pkgid for
more info
-r, --root <DIR> Root directory containing Cargo.toml to use
ARGS:
<args>...
$ cargo help tarpaulin
cargo-tarpaulin version: 0.5.5
Tool to analyse test coverage of cargo projects
USAGE:
cargo tarpaulin [FLAGS] [OPTIONS] [-- <args>...]
FLAGS:
--all Build all packages in the workspace
-b, --branch Branch coverage: NOT IMPLEMENTED
-f, --forward Forwards unexpected signals to test. Tarpaulin will still take signals it is expecting.
-h, --help Prints help information
--ignore-tests ignore lines of test functions when collecting coverage
-i, --ignored Run ignored tests as well
-l, --line Line coverage
--no-count Disables counting line hits for a faster run
--skip-clean Skips the clean stage to reduce build times, may affect coverage results
-V, --version Prints version information
-v, --verbose Show extra output
OPTIONS:
--ciserver <SERVICE> Name of service, supported services are:
travis-ci, travis-pro, circle-ci, semaphore, jenkins and codeship.
If you are interfacing with coveralls.io or another site you can also specify a name
that they will recognise. Refer to their documentation for this.
--coveralls <KEY> Coveralls key, either the repo token, or if you're using travis use $TRAVIS_JOB_ID
and specify travis-{ci|pro} in --ciserver
-e, --exclude <PACKAGE>... Package id specifications to exclude from coverage. See cargo help pkgid for more
info
--features <FEATURE>... Features to be included in the target project
-o, --out <FMT>... Output path [values: Json, Toml, Stdout, Xml]
-p, --packages <PACKAGE>... Package id specifications for which package should be build. See cargo help pkgid for
more info
-r, --root <DIR> Root directory containing Cargo.toml to use
ARGS:
<args>...
Awesome, glad to know it works!