Skip to content

Commit

Permalink
Update readme/help-text
Browse files Browse the repository at this point in the history
  • Loading branch information
xd009642 committed Feb 22, 2020
1 parent c2408c2 commit 6d38538
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 14 deletions.
23 changes: 15 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ USAGE:
cargo tarpaulin [FLAGS] [OPTIONS] [-- <args>...]
FLAGS:
--all alias for --workspace (deprecated)
--all Alias for --workspace (deprecated)
--all-features Build all available features
-b, --branch Branch coverage: NOT IMPLEMENTED
--count Counts the number of hits during coverage
Expand All @@ -42,8 +42,9 @@ FLAGS:
-f, --forward Forwards unexpected signals to test. Tarpaulin will still take signals it is expecting.
--frozen Do not update Cargo.lock or any caches
-h, --help Prints help information
--ignore-panics ignore panic macros in tests
--ignore-tests ignore lines of test functions when collecting coverage
--ignore-config Ignore any project config files
--ignore-panics Ignore panic macros in tests
--ignore-tests Ignore lines of test functions when collecting coverage
-i, --ignored Run ignored tests as well
-l, --line Line coverage
--locked Do not update Cargo.lock
Expand All @@ -56,11 +57,13 @@ FLAGS:
--workspace Test all packages in the workspace
OPTIONS:
-Z <FEATURES>... list of unstable nightly only flags
-Z <FEATURES>... List of unstable nightly only flags
--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.
--config <FILE> Path to a toml file specifying a list of options this will override any other
options set
--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
Expand Down Expand Up @@ -329,13 +332,16 @@ docker run --security-opt seccomp=unconfined -v "${PWD}:/volume" xd009642/tarpau
### Config file

Tarpaulin has a config file setting where multiple coverage setups can be
encoded in a toml file. Below is an example file:
encoded in a toml file. This can be provided by an argumnet or if a
`.tarpaulin.toml` or `tarpaulin.toml` is present in the same directory as
the projects manifest or in the root directory that will be used unless
`--ignore-config` is passed. Below is an example file:

```toml
[feature_a]
[feature_a_coverage]
features = ["feature_a"]

[feature_b]
[feature_b_coverage]
features = ["feature_b"]
release = true

Expand All @@ -353,7 +359,8 @@ chosen will have no effect on the output of tarpaulin.

For reference on available keys and their types refer to the CLI help text
at the start of the readme or `src/config/mod.rs` for the concrete types
if anything is unclear.
if anything is unclear. For arguments to be passed into the test binary that
follow `--` in tarpaulin use `args` in the toml file.

Setting the field `config` will have no effect on the run as it won't be parsed
for additional configuration.
Expand Down
12 changes: 6 additions & 6 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ fn main() -> Result<(), String> {
.about("Tool to analyse test coverage of cargo projects")
.version(concat!("version: ", crate_version!()))
.args_from_usage(
"--config [FILE] 'path to a toml file specifying a list of options this will override any other options set'
--ignore-config 'ignore any project config files'
"--config [FILE] 'Path to a toml file specifying a list of options this will override any other options set'
--ignore-config 'Ignore any project config files'
--debug 'Show debug output - this is used for diagnosing issues with tarpaulin'
--verbose -v 'Show extra output'
--ignore-tests 'ignore lines of test functions when collecting coverage'
--ignore-panics 'ignore panic macros in tests'
--ignore-tests 'Ignore lines of test functions when collecting coverage'
--ignore-panics 'Ignore panic macros in tests'
--count 'Counts the number of hits during coverage'
--ignored -i 'Run ignored tests as well'
--line -l 'Line coverage'
Expand All @@ -72,7 +72,7 @@ fn main() -> Result<(), String> {
--no-default-features 'Do not include default features'
--features [FEATURE]... 'Features to be included in the target project'
--all-features 'Build all available features'
--all 'alias for --workspace (deprecated)'
--all 'Alias for --workspace (deprecated)'
--workspace 'Test all packages in the workspace'
--packages -p [PACKAGE]... 'Package id specifications for which package should be build. See cargo help pkgid for more info'
--exclude -e [PACKAGE]... 'Package id specifications to exclude from coverage. See cargo help pkgid for more info'
Expand All @@ -84,7 +84,7 @@ fn main() -> Result<(), String> {
--frozen 'Do not update Cargo.lock or any caches'
--target-dir [DIR] 'Directory for all generated artifacts'
--offline 'Run without accessing the network'
-Z [FEATURES]... 'list of unstable nightly only flags'")
-Z [FEATURES]... 'List of unstable nightly only flags'")
.args(&[
Arg::from_usage("--out -o [FMT] 'Output format of coverage report'")
.possible_values(&OutputFile::variants())
Expand Down

0 comments on commit 6d38538

Please sign in to comment.