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:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Run ShellCheck
|
- name: Run ShellCheck
|
||||||
run: shellcheck **/*.sh
|
run: find . -type f -name "*.sh" -exec shellcheck {} +
|
||||||
```
|
```
|
||||||
|
|
||||||
## GitHub Advanced Security Integration
|
## GitHub Advanced Security Integration
|
||||||
@@ -87,16 +87,16 @@ jobs:
|
|||||||
|
|
||||||
### Customizing ShellCheck Options
|
### 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
|
```yaml
|
||||||
- name: Run ShellCheck
|
- name: Run ShellCheck
|
||||||
run: |
|
run: |
|
||||||
shellcheck \
|
find . -type f -name "*.sh" -exec shellcheck \
|
||||||
--severity=warning \ # Set minimum severity
|
--severity=warning \
|
||||||
--shell=bash \ # Specify shell dialect
|
--shell=bash \
|
||||||
--format=gcc \ # Set output format
|
--format=gcc \
|
||||||
**/*.sh
|
{} +
|
||||||
```
|
```
|
||||||
|
|
||||||
### Common Options
|
### Common Options
|
||||||
|
Reference in New Issue
Block a user