Install a hook to run lints at pre-commit to force issues to be fixed
during development.
This introduces a 5-10 second delay when committing due to how slow
clang-format is.
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Rewrite lint scripts to report what they do and if they pass. In the
case they fail list the files that caused the failure, except for
clang-format, which will be slow to run of every file individually
(should just run `make fmt` anyway). Also add a script to run all the
lints in order with a single command.
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Ensure rustup is up-to-date to avoid users having a version that is too
old to support the TOML format.
If rustup was just installed, tell the user to source the new env vars
to use the correct version of the toolchain.
Signed-off-by: Tim Crawford <tcrawford@system76.com>
rustup 1.23.0 (2020-11-27) introduced support for TOML syntax for the
toolchain file. Use this and specify required compoenents.
To ensure you are using a new enough rustup, run:
rustup self update