mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 19:29:44 +08:00
Replace **/*.sh with find, since the former won't find all scripts
@@ -15,7 +15,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Run ShellCheck
|
||||
run: shellcheck **/*.sh
|
||||
run: find . -type f -name "*.sh" -exec shellcheck {} +
|
||||
```
|
||||
|
||||
## GitHub Advanced Security Integration
|
||||
@@ -87,16 +87,16 @@ jobs:
|
||||
|
||||
### Customizing ShellCheck Options
|
||||
|
||||
ShellCheck supports various options that can be used in your workflow:
|
||||
ShellCheck supports various options that can be used in your workflow (in this case, set minimum severity, specify shell dialect, and set output format):
|
||||
|
||||
```yaml
|
||||
- name: Run ShellCheck
|
||||
run: |
|
||||
shellcheck \
|
||||
--severity=warning \ # Set minimum severity
|
||||
--shell=bash \ # Specify shell dialect
|
||||
--format=gcc \ # Set output format
|
||||
**/*.sh
|
||||
find . -type f -name "*.sh" -exec shellcheck \
|
||||
--severity=warning \
|
||||
--shell=bash \
|
||||
--format=gcc \
|
||||
{} +
|
||||
```
|
||||
|
||||
### Common Options
|
||||
|
Reference in New Issue
Block a user