Open rockett-m opened 1 month ago
@HalosGhost I did see the braces recommendation a lot via shellcheck. A warning not an error. I tried to clear as many warnings as I could for this PR
Divide and conquer PR new plan
Commit 1: ci.yml and shellcheck.sh and any fatal errors across .sh files (so the stage can pass)
Commit 2: shellcheck info and warning messages fixed to .sh files
Commit 3: style fixes etc and shebang update to *.sh scripts
Commit 4: use NUM_CORES and xargs in lint.sh for parallelization to lint.sh
@HalosGhost Incorporated your suggestions. Added more intelligent coloring, waived error codes/severity messages, summary report.
Can be viewed here: https://github.com/mit-dci/opencbdc-tx/actions/runs/10501604065/job/29091863763?pr=298
The waivers are more powerful when looking beyond errors (majority of the info warnings are about variable quotations 'SC2086')
$ ./scripts/shellcheck.sh -C auto -S info -e SC2034 -e SC2086 -e SC1010
Edit: I will add a path to the full report as well in the next push
This adds a shellcheck github workflow to check lint our shell files after discussion with @HalosGhost
I fixed a bunch of warnings / errors / info messages from shellcheck across our *.sh scripts.
Edit: added I assume we will want a
scripts/shellcheck.sh
script to tidy up the.github/workflows/ci.yml :: shellcheck
stage - and to have an easy way for users to run shellcheck / view reports.act -j shellcheck --container-architecture linux/amd64