mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 19:29:44 +08:00
adding more possible bash file extensions
@@ -21,10 +21,10 @@ To check files with one of multiple extensions:
|
|||||||
# if they don't match.
|
# if they don't match.
|
||||||
# dot glob will match shell scripts in hidden directories.
|
# dot glob will match shell scripts in hidden directories.
|
||||||
shopt -s globstar nullglob dotglob
|
shopt -s globstar nullglob dotglob
|
||||||
shellcheck /path/to/scripts/**/*.{sh,bash,ksh}
|
shellcheck /path/to/scripts/**/*.{sh,bash,ksh,bashrc,bash_profile,bash_login,bash_logout}
|
||||||
|
|
||||||
# POSIX
|
# POSIX
|
||||||
find /path/to/scripts -type f \( -name "*.sh" -o -name "*.bash" -o -name "*.ksh" \) -print |
|
find /path/to/scripts -type f \( -name "*.sh" -o -name "*.bash" -o -name "*.ksh" -o -name "*.bashrc" -o -name "*.bash_profile" -o -name "*.bash_login" -o -name "*.bash_logout" \) -print |
|
||||||
while IFS="" read -r file
|
while IFS="" read -r file
|
||||||
do
|
do
|
||||||
shellcheck "$file"
|
shellcheck "$file"
|
||||||
|
Reference in New Issue
Block a user