The main reason for this PR is to use make's concurrency features to run the lint/fix commands instead of doing so serially. The reason for wanting this is to be able to run make --keep-going lint so that we can see the errors for all linters instead of just one at a time, while still having make return an error exit if one of the linters did in fact fail.
There were some clean up/extras/fixes along the way including:
Normalize shellcheck so the binary matches golangci-lint and hadolint (versioned binary name directly under out/linters)
Update the dependencies to their latest released versions (2 reasons: 1 to get latest and greatest, 2 steps over issue with ^ if shellcheck was already downloaded)
Adds nix-shell+direnv goodness
Moves LINT_LOWER_OS out from just for shellcheck's use (seems like a good idea to have, also renamed to LINT_OS_LOWER so it groups with LINT_OS better)
Reorganized the makefile so that there's only ever one {{ if .$filetype }} per file type. This just seems better to have everything per file-type in just one location instead of 2, 3, or 4.
Renamed golangci-lint make variables to match the other variables, to include the full binary name
Added $TOOL_BIN variable instead of writing the full path over and over. DRYness makes sense here.
Why is this needed
The reason for wanting this is to be able to run make --keep-going lint so that we can see the errors for all linters instead of just one at a time, while still having make return an error exit if one of the linters did in fact fail.
How Has This Been Tested?
I've run this locally, including make fix.
How are existing users impacted? What migration steps/scripts do we need?
Less run-fix-check cycles since more of the errors are going to show up at once.
Newer linters with possibly better checks.
Description
The main reason for this PR is to use make's concurrency features to run the lint/fix commands instead of doing so serially. The reason for wanting this is to be able to run
make --keep-going lint
so that we can see the errors for all linters instead of just one at a time, while still having make return an error exit if one of the linters did in fact fail.There were some clean up/extras/fixes along the way including:
{{ if .$filetype }}
per file type. This just seems better to have everything per file-type in just one location instead of 2, 3, or 4.Why is this needed
The reason for wanting this is to be able to run
make --keep-going lint
so that we can see the errors for all linters instead of just one at a time, while still having make return an error exit if one of the linters did in fact fail.How Has This Been Tested?
I've run this locally, including
make fix
.How are existing users impacted? What migration steps/scripts do we need?
Less run-fix-check cycles since more of the errors are going to show up at once. Newer linters with possibly better checks.