mirror of
https://github.com/luxfi/cli.git
synced 2026-10-30 17:01:20 +00:00
- Use modern $(...) syntax instead of backticks
- Quote variables to prevent word splitting
- Use ${var:?} pattern for safe rm -rf
- Use -exec instead of xargs for find
- Set severity to warning to skip info-level issues
17 lines
424 B
Bash
Executable File
17 lines
424 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
# Find all shell scripts and run shellcheck on them
|
|
# Excludes:
|
|
# - vendor directory
|
|
# - .git directory
|
|
# - pkg/ssh/shell/ - Go template files using {{ .Variable }} syntax
|
|
echo "Running shellcheck..."
|
|
find . -name "*.sh" -type f \
|
|
-not -path "./vendor/*" \
|
|
-not -path "./.git/*" \
|
|
-not -path "./pkg/ssh/shell/*" \
|
|
-exec shellcheck -S warning {} +
|
|
|
|
echo "Shellcheck passed!" |