raspiblitz icon indicating copy to clipboard operation
raspiblitz copied to clipboard

add shellcheck action to catch script errors

Open openoms opened this issue 1 year ago • 5 comments

will need to fix or ignore errors

Can be run locally with act https://github.com/nektos/act :

  • install github cli https://cli.github.com/
  • install act with github cli
gh extension install https://github.com/nektos/gh-act
  • run this action
gh act -W '.github/workflows/test-shellcheck.yml'

openoms avatar Apr 07 '24 06:04 openoms

Because this might force a lot of small changes - also in the sd card build area, lets target that change for v1.12.0

rootzoll avatar Apr 07 '24 13:04 rootzoll

@rootzoll d52f15c and 68b478d are catching errors which affect the run of the scripts already.

Making these changes allows us to use shellcheck more rigorously so there are no new errors are introduced.

If there are false positives espiacally around using $@ vs "$@" we can ignore those lines explicitly.

openoms avatar Apr 07 '24 14:04 openoms

Disabled checking the lines which are working correctly, but causing shellcheck errors. The rest are actual bugs.

openoms avatar Apr 07 '24 14:04 openoms

@rootzoll should we include d52f15c separately?

openoms avatar Apr 08 '24 07:04 openoms

@rootzoll should we include d52f15c separately?

@openoms cherry-picked into dev & v1.11

rootzoll avatar Apr 08 '24 12:04 rootzoll