-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #763 from BastilleBSD/shellcheck
shellcheck: general linting and github action
- Loading branch information
Showing
22 changed files
with
107 additions
and
60 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 |
---|---|---|
|
@@ -3,7 +3,7 @@ name: ShellCheck Linting | |
on: | ||
pull_request: | ||
branches: | ||
- main | ||
- master | ||
|
||
jobs: | ||
lint: | ||
|
@@ -15,8 +15,18 @@ jobs: | |
uses: actions/checkout@v4 | ||
|
||
- name: Run ShellCheck | ||
uses: ludeeus/action-shellcheckudeeus/[email protected] | ||
uses: ludeeus/[email protected] | ||
env: | ||
# Excluding SC3043: In POSIX sh, 'local' is undefined. Ignoring because local is a built-in command in FreeBSD | ||
# Excluding SC2154: Variable is referenced but not assigned. Because we include files in the scripts | ||
# Excluding SC3037: In POSIX sh, echo flags are undefined. Ignoring temporarily until we decide to keep it or | ||
# use printf instead | ||
# Excluding SC2155: Declare and assign separately to avoid masking return values. | ||
# Excluding SC2124: Assigning an array to a string! Check instead if this is a false positive or if there is | ||
# a better way to do it. | ||
SHELLCHECK_OPTS: -e SC3043 -e SC2154 -e SC3037 -e SC2155 -e SC2124 | ||
with: | ||
severity: warning | ||
scandir: "./usr/local/share/bastille" | ||
additional_files: "./usr/local/bin/bastille" | ||
ignore_paths: "./usr/local/share/bastille/templates" | ||
ignore_paths: "./usr/local/share/bastille/templates ./usr/local/share/bastille/colors.pre.sh" |
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
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 |
---|---|---|
|
@@ -51,6 +51,7 @@ fi | |
bastille_root_check | ||
|
||
if [ -z "${EDITOR}" ]; then | ||
# shellcheck disable=SC2209 | ||
EDITOR=vi | ||
fi | ||
|
||
|
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
Oops, something went wrong.