Enforce shell script codestyle with shfmt
Our system test shell scripts were a complete mess when it comes to indentation, which made them needlessly hard to read and edit. Use shfmt
to reformat all shell scripts to a common code style.
The selected code style (-i 2 -ci -bn
: 2 spaces, case option indentation and binary operations allowed on new line) conforms with the scripts in bin/
as well as the autoconf scripts and thus doesn't make any changes to those files, only affecting our bin/tests/system
and util/
scripts (and a single contrib/ and tests/ script) which should be safe to change.
For v9.16, there would be more affected files, so I'm in favor of limiting the changes to bin/tests/system
and perhaps util/
in that branch.
Example pipeline with failed shfmt: https://gitlab.isc.org/isc-projects/bind9/-/jobs/3745627
Prerequisite: https://gitlab.isc.org/isc-projects/images/-/merge_requests/283