CircleCI-Public / shellcheck-orb

An orb for ShellCheck, a static analysis tool for shell scripts (https://shellcheck.net) — check all scripts in your repository on every commit
https://circleci.com/developer/orbs/orb/circleci/shellcheck
MIT License
19 stars 26 forks source link

Feature Request: Output the names of matched files for verification #33

Closed schneems closed 3 years ago

schneems commented 3 years ago

Describe Request:

I would like to see what files were matched and checked by shellcheck in addition to whether or not the check was successful.

Examples:

For example I just added shellcheck to this project https://github.com/heroku/heroku-buildpack-ruby-experimental/pull/33. I want it to check shellcheck -x bin/build bin/compile bin/detect bin/release bin/support/bash_functions.sh but i'm unsure if it found all those files or not.

If this can be accomplished without a feature, please let me know.

Supporting Documentation Links:

schneems commented 3 years ago

I checked by purposefully introducing a violation into each file and it turns out only one of my files the bash_functions.sh is detected.

gmemstr commented 3 years ago

This is sort of expected - the check.sh script defaults to looking for .sh files:

https://github.com/CircleCI-Public/shellcheck-orb/blob/master/src/scripts/check.sh#L34-L36

The search pattern can be changed by passing through the pattern parameter :)

https://github.com/CircleCI-Public/shellcheck-orb/blob/master/src/commands/check.yml#L42

schneems commented 3 years ago

This is sort of expected - the check.sh script defaults to looking for .sh files: The search pattern can be changed by passing through the pattern parameter :)

Could we either output the list of files that are found to be valid via the pattern and/or some output if no files are matched?

gmemstr commented 3 years ago

Done in #36 :)