-
Notifications
You must be signed in to change notification settings - Fork 47
EOS-27541: Add Github Action for shellcheck #58
Conversation
Lint all bash scripts using [shellcheck](https://github.com/koalaman/shellcheck) for any push to main or integration branches and PRs. Some extra strict options are enabled in .shellcheckrc. All of the enabled checks include some elements of several Bash style guides, although they don't follow all exactly: - [bahamas10/bash-style-guide](https://github.com/bahamas10/bash-style-guide) - [BashGuide/Practices](http://mywiki.wooledge.org/BashGuide/Practices) - [Google Shell Style Guide](https://google.github.io/styleguide/shellguide.html) For now the Action is configured to always succeed because of existing failures. Signed-off-by: Keith Pine <[email protected]>
LGTM (though I admit I don't have experience with this) |
@keithpine and @walterlopatka , I think this might be redundant since Codacy is already attached to this repo. Here is a picture showing the Codacy badge attached to the front README of this repo. You'll also notice that Codacy is already doing checks on each pull request: And, finally, this page suggests to me that Codacy includes shellcheck: |
@johnbent Thanks for that info. A couple of questions:
|
Plus @mukul-seagate11 . Mukul, can you help answer Keith's questions above about Codacy? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm good with this as a practice. I understand Codacy may run some of this, but I would prefer to control it with a finer-grained approach and then remove it when we have minimal (if any) shell scripts in the future.
The only change I would request is that we need to fork https://github.com/ludeeus/action-shellcheck in a github.com/Seagate repository and reference it in the uses
path that way, instead of directly referencing the remote repository to run code in our pipeline unsupervised.
Sure, let me address the same with. https://github.com/Seagate/action-shellcheck |
Unfortunately, at the moment Codacy does not support configuration files for Shellcheck but yes can be addressed via github actions for Shellcheck |
Shellcheck workflow has been addressed via #71 |
- Use Seagate fork of action - Add license and copyright - Remove workflow_dispatch Signed-off-by: Keith Pine <[email protected]>
Signed-off-by: Keith Pine <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
* EOS-27575: Avoid capturing container logs as variables (#60) Sometimes the log output from a container is so large that capturing it in a variable and printing it will cause bash to crash. Instead of capturing, just redirect the log output directly to the destination file. This does have a side-effect of creating an empty log file if a pod/container has no logs, where previously it would skip the file if the logs were empty. Other fixes: - Remove leading './' from paths in the output tar file - Fix some Shellcheck complaints - Use long options for tar and cortx_support_bundle commands (script self-documentation) - Reduce some code duplication Signed-off-by: Keith Pine <[email protected]> * Updated GitHub Actions to include integration branch Signed-off-by: Rick Osowski <[email protected]> * UDX-6683 move documentation to root README (#64) * Initial README updates Signed-off-by: Rick Osowski <[email protected]> * Second pass at documentation Signed-off-by: Rick Osowski <[email protected]> * Moved README to repo root / merged CODACY Signed-off-by: Rick Osowski <[email protected]> * Final pass at README.md Signed-off-by: Rick Osowski <[email protected]> * Update Codacy Markdown warnings Signed-off-by: Rick Osowski <[email protected]> * Initial review updates from squad Signed-off-by: Rick Osowski <[email protected]> * Update Codacy Markdown warnings, Take Two Signed-off-by: Rick Osowski <[email protected]> * EOS-28404: Remove unneeded services: cortx-control-headless / clusterip Signed-off-by: Walter Lopatka <[email protected]> * EOS-27541: Add Github Action for shellcheck (#58) * Add Github Action for shellcheck Lint all bash scripts using [shellcheck](https://github.com/koalaman/shellcheck) for any push to main or integration branches and PRs. Some extra strict options are enabled in .shellcheckrc. All of the enabled checks include some elements of several Bash style guides, although they don't follow all exactly: - [bahamas10/bash-style-guide](https://github.com/bahamas10/bash-style-guide) - [BashGuide/Practices](http://mywiki.wooledge.org/BashGuide/Practices) - [Google Shell Style Guide](https://google.github.io/styleguide/shellguide.html) For now the Action is configured to always succeed because of existing failures. Signed-off-by: Keith Pine <[email protected]> * Updates - Use Seagate fork of action - Add license and copyright - Remove workflow_dispatch Signed-off-by: Keith Pine <[email protected]> * Fix copyright year Signed-off-by: Keith Pine <[email protected]> * v0.0.21 (#72) * Prep v0.0.21 Signed-off-by: Walter Lopatka <[email protected]> * Prep for v0.0.21 Fixed container version name Signed-off-by: Walter Lopatka <[email protected]> * Patch for README.md GitHub formatting (#74) Signed-off-by: Rick Osowski <[email protected]> * Update .gitignore file (#76) Add auto-generated deployment files Signed-off-by: Keith Pine <[email protected]> * Update cortx-aws-k8s-installation.md (#78) Improved formatting. Co-authored-by: John Bent <[email protected]> Co-authored-by: Keith Pine <[email protected]> Co-authored-by: Rick Osowski <[email protected]> Co-authored-by: John Bent <[email protected]>
Lint all bash scripts using shellcheck for any push to main or integration branches and PRs.
Some extra strict options are enabled in .shellcheckrc (v0.8.0 required). All of the enabled checks cover some aspects of several Bash style guides, although they aren't all identical:
For now, the Action is configured to always succeed because of existing failures.
Signed-off-by: Keith Pine [email protected]