Closed PyroTechniac closed 2 years ago
So I realise why the warning is omitted. The Config struct has default values and just using serde to deserialize I can only spot non-default settings for skip-clean
and force-clean
. My config handling code looks for one of them being non-default and prioritises it. Whereas the clap code does some checks on what flags are provided and warns even if one of them is set as default.
However, I have tried this with just skip-clean = true
in the config and it worked, with force-clean = false
it didn't :thinking:. I'll do some more digging, but just putting skip-clean = true
should work for you... If it doesn't if you have an example project I'll give that a try
Ah I did get force-clean=false in the tarpaulin.toml to be respected. https://github.com/xd009642/tarpaulin/pull/964 so that's part of the issue solved. Just curious on how it works on your stuff :thinking:
Once I'm off work tonight I'll try to create a working example and send it over
Have you had a chance to try it out? No rush but I'll probably merge the PR in a week or so if I don't hear back as it seems to fix one UX issue :eyes:
I've released merged the PR with the potential fix for this in, and 0.20.0 is in the process of releasing (once CI finished). So closing this issue, if it's not fixed though feel free to reopen
This seems to be working as intended now! Sorry for being unable to test this, and thank you for the quick fix!
Describe the bug
cargo tarpaulin
doesn't respect theskip-clean
andforce-clean
config optionsSecondary bug: when calling
cargo tarpaulin --skip-clean --force-clean
a warning is thrown up about option incompatibility, but if bothforce-clean = true
andskip-clean = true
are set in a config file, no warning is emitted.To Reproduce
then call
cargo tarpaulin
twice in a row, it should clean the project each time.Expected behavior No cleaning of the project should occur.