luizm / action-sh-checker

A GitHub action that performs static analysis for shell scripts using shellcheck, shfmt and checkbashisms.
MIT License
132 stars 12 forks source link

Add support for filenames with spaces #40

Closed rasa closed 3 years ago

rasa commented 3 years ago

This PR adds the following features:

  1. Adds support for filenames with spaces
  2. Allows user to set flag with 1, true, on, or yes (case insensitively)
  3. Lists files that are being excluded
  4. Lists number of files that are being scanned
  5. Replaces most echos with printf. See https://mywiki.wooledge.org/BashPitfalls?highlight=%28echo%29#echo_.24foo
  6. Includes the shellcheck/shopt options in the log
  7. Adds instructions on how to correct the issues found
  8. Passes all shellcheck and shfmt's checks
  9. Returns an exit code which binary ORs shellcheck's/shopt's/checkbashism's exit codes

I've tested everything including the SH_CHECKER_COMMENT logic.

luizm commented 3 years ago

https://github.com/luizm/action-sh-checker/releases/tag/v0.2.0

It is a pre-release

I did a quick validation and it seems good, @rasa @haraldh if you could use this version as well I really appreciate it.

haraldh commented 3 years ago
 Validating 406 shell script(s) using 'shellcheck ':
'shellcheck ' found no issues.
Validating 406 shell script(s) using 'shfmt -s':
'shfmt -s' found no issues.

https://github.com/dracutdevs/dracut/pull/1414/checks?check_run_id=2467329776