mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 19:29:44 +08:00
Add Docker example
@@ -33,5 +33,12 @@ To check files whose shebang indicate that they are sh/bash/ksh scripts:
|
|||||||
|
|
||||||
```
|
```
|
||||||
# POSIX
|
# POSIX
|
||||||
find /path/to/scripts -type f -exec grep -Eq '^#!(.*/|.*env +)(sh|bash|ksh)' {} \; | xargs shellcheck
|
find /path/to/scripts -type f -exec grep -Eq '^#!(.*/|.*env +)(sh|bash|ksh)' {} \; \
|
||||||
|
| xargs shellcheck
|
||||||
|
```
|
||||||
|
|
||||||
|
## With Docker
|
||||||
|
|
||||||
|
```
|
||||||
|
docker run --volume /path/to/scripts:/mnt koalaman/shellcheck-alpine sh -c "find /mnt -name '*.sh' | xargs shellcheck"
|
||||||
```
|
```
|
Reference in New Issue
Block a user