-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: run ShellCheck in CI (#31809)
build: run ShellCheck Adds a ShellCheck check to edx-platform PRs and master, using the shared workflow & template from the .github repo. This will become a "required" check once it passes for 2 straight weeks on master. Brings all existing shell scripts into compliance with ShellCheck.
- Loading branch information
1 parent
7f769b4
commit cd24534
Showing
7 changed files
with
73 additions
and
32 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Run ShellCheck on PRs and master | ||
|
||
# For more context, see: | ||
# https://github.com/openedx/.github/blob/master/docs/decisions/0001-shellcheck.rst | ||
|
||
name: ShellCheck | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
shellcheck: | ||
strategy: | ||
matrix: | ||
os: ["ubuntu", "macos"] | ||
uses: openedx/.github/.github/workflows/shellcheck.yml@master | ||
with: | ||
# For details on the meaning of each of these arguments, see: | ||
# https://github.com/openedx/.github/blob/master/.github/workflows/shellcheck.yml | ||
# We exclude `./node_modules/*` by default because we want people to easily be able to | ||
# copy and run the command locally. Local copies of most of our services have a `./node_modules` | ||
# directory that we want to ignore. | ||
exclude-patterns: "./node_modules/*" | ||
operating-system: "${{ matrix.os }}" | ||
shellcheck-version: "v0.9.0" | ||
#shellcheck-options: "" |
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 |
---|---|---|
@@ -1,2 +1,4 @@ | ||
#!/usr/bin/env zsh | ||
# shellcheck disable=all | ||
# ^ This is zsh, which shellcheck doesn't support. | ||
git log --all ^opaque-keys-merge-base --format=%H $1 | while read f; do git branch --contains $f; done | sort -u |
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