fedora-iot / greenboot

Generic Health Checking Framework for systemd
GNU Lesser General Public License v2.1
101 stars 29 forks source link

Use differential-shellcheck instead of action-shellcheck #106

Closed jamacku closed 1 year ago

jamacku commented 1 year ago

This change doesn't change the core behavior of ShellCheck linting. Differential ShellCheck uses by default flag -X. It will also exclude all shell scripts located in tests/ from linting.

Some benefits of using differential ShellCheck Action

Differential ShellCheck is a GitHub Action that performs differential ShellCheck scans on shell scripts changed via PR and reports results directly in PR.

It is able to produce reports in SARIF format. GitHub understands this format and is able to display it nicely as a PR comment, and on the Files Changed tab, please see below.

image

image

Documentation is available at @redhat-plumbers-in-action/differential-shellcheck. Let me know If you are missing some feature or setting. I'm always happy to extend functionality.

github-advanced-security[bot] commented 1 year ago

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

say-paul commented 1 year ago

This looks cool!! do you have its as IDE-plugin(vs code) as static analysis tool?

jamacku commented 1 year ago

This looks cool!! do you have its as IDE-plugin(vs code) as static analysis tool?

Unfortunately, no, but I believe you can use https://github.com/Microsoft/sarif-vscode-extension with this action. Once you link your GitHub account with sarif-vscode-extension, you should see the reports in your IDE.

Screenshot from 2023-09-11 15-30-22

Screenshot from 2023-09-11 15-30-57

nullr0ute commented 1 year ago

LGTM