-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CI] add shellcheck-workflow (#32052)
**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>
- Loading branch information
1 parent
6107b19
commit 520cade
Showing
11 changed files
with
107 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: shellcheck | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
permissions: {} | ||
|
||
jobs: | ||
shellcheck: | ||
name: shellcheck | ||
runs-on: ubuntu-latest | ||
env: | ||
VERSION: v0.10.0 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: shellcheck workflow-scripts | ||
uses: ludeeus/action-shellcheck@2.0.0 | ||
env: | ||
SHELLCHECK_OPTS: -x -e SC2059 -e SC2086 | ||
with: | ||
scandir: ".github/workflows/scripts" | ||
severity: warning | ||
version: ${{ env.VERSION }} | ||
- name: shellcheck buildscripts | ||
uses: ludeeus/action-shellcheck@2.0.0 | ||
env: | ||
SHELLCHECK_OPTS: -x -e SC2059 -e SC2086 | ||
with: | ||
scandir: "internal/buildscripts" | ||
severity: warning | ||
version: ${{ env.VERSION }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters