azohra / shell-linter

A Github Action for ShellCheck
https://github.com/marketplace/actions/shell-linter
MIT License
66 stars 13 forks source link

Feature/lint supported shells only #31

Closed Azbagheri closed 3 years ago

Azbagheri commented 3 years ago

Pull Request Checklist

Corresponding Issue

<ADD-ISSUE-HERE>

Description of Change

Adding support for scanning Shellcheck supported scripts only. 

Motivation and Context

Some of our users are using the action to scan directories with various types of scripts including some none-shell scripts that don't have any extension and instead use the shebang to point to the corresponding interpreter. With these changes, Shell Linter now checks the interpreter passed in the shebang and only allows the shellcheck supported ones.

Testing Steps

Added integration tests to cover these changes and they are all run in the pipeline. Locally they can be run using `./tests/test_runner`

Risks

Additional Information