-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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] Add shellcheck linter #17279
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
@mx-psi @jpkrohling PR: #17292 |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
@mohitsaxenaknoldus, are you still interested in working on this one? |
**Description:** <Describe what has changed.> <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> So i fixed the issues which shellcheck displayed, which were only 3 double quote issues and the `read -r` issue. After looking into the closed PR i also replaced `printf`-statements with `echo`. For the shellcheck-worfklow I used [https://github.com/ludeeus/action-shellcheck](url) I didn't find a way to check multiple directories at once, so we just use 2 steps here. I added the disabled checks provided by the intentional issue, but i'm not quite sure if we need to add `-x` here. Couldn't find anything in the documentation so far. On top of that i'm not quite sure if we should run the shellcheck in dependency of any other workflows or just on its own. Edit: I added the option `ignore_paths` so that shellcheck-action is only run in specified paths and ignores subpaths of this directory. **Link to tracking Issue:** <Issue number if applicable> - #17279 **Testing:** <Describe what testing was performed and which tests were added.> **Documentation:** <Describe the documentation added.> --------- Co-authored-by: Evan Bradley <11745660+evan-bradley@users.noreply.github.com>
resolved by #32052 |
Thank you @led0nk! |
Component(s)
No response
Describe the issue you're reporting
shellcheck is a static analysis tool for identifying issues on shell scripts. It could be useful for identifying issues like #17037 and it's generally good for enforcing idiomatic and sensible shell scripts.
Running something like:
brings up about ~15 issues to be addressed today.
To ensure we continously lint our scripts with shellcheck, we should add a Github workflow that lints our shell scripts with shellcheck and fixes the issues pointed out by the command above.
The text was updated successfully, but these errors were encountered: