when i write a PR, i run the tests and i like to have a pretty output to
make extra clear which one of the tests did run, which one did not, etc,
etc...
this always end up a variation of the template
> - `cargo fmt --all -- --check` to check standard code formatting
(`cargo fmt --all` applies these changes)
> - `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used -A
clippy::needless_collect` to check that you're using the standard code
style
> - `cargo test --workspace` to check that all tests pass
but with emojis and without the descriptions
> - 🟢 `cargo fmt --all`
> - 🔴 `cargo clippy --workspace -- -D warnings -D
clippy::unwrap_used -A clippy::needless_collect`
> - 🟡 `cargo test --workspace`
>
> and a ⚫ (`⚫`) when i did not have the time
or the resources to run the check stage
in this PR, i came up with a way to do that automatically with the
`toolkit` introduced in #8152😋
# Description
this PR
- adds `toolkit::pretty-print-command` to print the command names being
run with backticks and some colors
- adds `toolkit::report` to return a "report" of the PR check stages =>
see `help toolkit check pr`
- adds the `--pretty` option to `toolkit check pr` to return a
list-with-emojis version of the check report, i.e. a *GitHub*-friendly
list to drop in place in the "Tests + Formatting" section
- adds a clear mention to `toolkit check pr --pretty` in the PR template
to make it easily visible to anyone
hope you'll like it, that's not a huge deal but that's my attempt to
encourage developers to show that they run the tests, what stages did
pass and which one did not 😌👋
# User-Facing Changes
the developer can now use `toolkit check pr --pretty` to have a
ready-to-use output for *GitHub*
# Tests + Formatting
```
$nothing
```
# After Submitting
```
$nothing
```
i was writing #8148 and came to the "_Test + Formatting_" section of the
PR template.
i felt the developer instructions could be wrapped up in a common easy
to use format, e.g. a `Makefile`, to be used with a few-words command
only, e.g. `make fmt` or `make clippy`, instead of the long commands in
the PR template 🤔
> **Note**
> in case you guys do not want to add a `Makefile` to the `nushell`
source, that PR can be discarded 😌
# Description
this PR
- adds the few rules from the PR template to a new `Makefile`
- replaces the instructions in the PR template from the full commands to
the new `make` rules
# User-Facing Changes
- _none for the regular user_
- i believe easier to test PRs for the developer, allowing one not to
realy on knowing the long commands or using the shell history to run
them again 😋
# Tests + Formatting
_nothing to test_
# After Submitting
maybe mention that in `CONTRIBUTING.md`?