* add "clippy.toml" in order to set MSRV for clippy linting
this works only if clippy is invoked with "+nightly"
* add "--target" to clippy in order to also lint tests
Fails trom time to time with:
```
info: installing component 'rustc'
memory allocation of 16777216 bytes failed
Error: The process 'C:\Rust\.cargo\bin\rustup.exe' failed with exit code 3221226505
```
on Build (windows-latest, i686-pc-windows-gnu, feat_os_windows)
Before this change we never ran tests on uucore itself
meaning that is was not possible to test
functions of the shared core, only their usage
in the different binaries
This change adds running uucore to our ci, which will increase coverage for the few doctests that exist
and is extracted from #1988 where first tests for uucore will be introduced
- `ignore` and `excl-br-line` options used to target code coverage analysis
- direct/repeated (non-DRY) CLI options are used by necessity (`grcov` is ignoring command line env variables)
* CI: Only run rustfmt in one environment
- This displays clippy warnings even when rustfmt fails.
- This avoids displaying 3 copies of the same rustfmt warning as Github
annotations.
- Avoids duplicated work.
* CI: Suppress warnings when building for the oldest toolchain version
We had cases of warnings emitted due to `rustc` bugs that were fixed
in non-obsolete versions.
* factor: Remove a workaround for warnings on obsolete rustc
## [why]
Compiler and clippy warnings will change over time. To avoid build failures due to some
updated allow/warn categories for more future rust versions, the tests using the
toolchain utilities are converted to a form which will always "pass" but will push any
errors/warnings to the GHA UI as annotations.
Additional build-breaking tests utilizing more stable tools (or local scripts) can be
added at a later date if/when desired.
This should prevent CI failures for already known-working builds.
## [why]
Code coverage must currently use some unstable features in nightly rust builds. The
nightly builds are, by definition, unstable and subject to frequent breaking changes.
To prevent CI build breakage, the toolchain is pinned to a specific known working set.
Note: (maint!) this will require periodic review until code coverage is more fully
implemented/integrated into Rust and moved into the stable channel.
- refs: <https://github.com/mozilla/grcov/issues/427>, <https://github.com/newsboat/newsboat/issues/916>