Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(lint): add shell linter - Differential ShellCheck #178

Closed
wants to merge 2 commits into from

Conversation

jamacku
Copy link

@jamacku jamacku commented May 17, 2023

It performs differential and full ShellCheck scans and reports results directly on GitHub.

differential-shellcheck Action 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, such a defect is easier to spot and fix.

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.

jamacku added 2 commits May 17, 2023 09:40
It performs differential ShellCheck scans and report results directly on GitHub.

documentation: https://github.com/redhat-plumbers-in-action/differential-shellcheck

Signed-off-by: Jan Macku <[email protected]>
It makes sure that the GitHub Actions are up-to-date.
@ericcurtin
Copy link
Member

ericcurtin commented May 17, 2023

Thanks for the contribution @jamacku

Unfortunately I avoid GitHub Actions plugins if at all possible in inotify-tools, unless I have no other option.

I would prefer just a shellcheck stage in here:

https://github.com/inotify-tools/inotify-tools/blob/master/build_and_test.sh

There is a reason I do things this way, it's to avoid vendor lock-in (in case we have to migrate from GitHub in future for whatever reason) and so people can easily run equivalents on their local machines to fix and debug build issues.

Also, when you run it in the build_and_test.sh script it will run many different versions from the many different platforms, sometimes this is actually a good thing as the different versions may find different things and you can choose to turn of certain versions of shellcheck if needs be.

I have avoided shellcheck because I have used it in the past and found it a tad pedantic.

But if someone put in the work to add in build_and_test.sh I'd likely merge anyway.

@jamacku
Copy link
Author

jamacku commented May 17, 2023

Hi @ericcurtin,
I understand your reasoning. Unfortunately, it's not possible to run differential-shellcheck locally.

Feel free to close this request. I'll come back once it would be possible to run differential-shellcheck locally.

@ericcurtin ericcurtin closed this May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants