mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
man/*sh: fix shellcheck warnings, add to shellcheck
Now the only remaining file that needs shellcheck warnings to be fixed is bash-completion. Note that in Makefile's TODO. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
@@ -133,8 +133,8 @@ cfmt:
|
|||||||
shellcheck:
|
shellcheck:
|
||||||
shellcheck tests/integration/*.bats tests/integration/*.sh \
|
shellcheck tests/integration/*.bats tests/integration/*.sh \
|
||||||
tests/integration/*.bash tests/*.sh \
|
tests/integration/*.bash tests/*.sh \
|
||||||
script/*
|
man/*.sh script/*
|
||||||
# TODO: add shellcheck for more sh files
|
# TODO: add shellcheck for more sh files (contrib/completions/bash/runc).
|
||||||
|
|
||||||
shfmt:
|
shfmt:
|
||||||
shfmt -ln bats -d -w tests/integration/*.bats
|
shfmt -ln bats -d -w tests/integration/*.bats
|
||||||
|
|||||||
+2
-2
@@ -2,7 +2,7 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
# get into this script's directory
|
# get into this script's directory
|
||||||
cd "$(dirname "$(readlink -f "$BASH_SOURCE")")"
|
cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
|
||||||
|
|
||||||
[ "$1" = '-q' ] || {
|
[ "$1" = '-q' ] || {
|
||||||
set -x
|
set -x
|
||||||
@@ -18,7 +18,7 @@ for FILE in *.md; do
|
|||||||
base="$(basename "$FILE")"
|
base="$(basename "$FILE")"
|
||||||
name="${base%.md}"
|
name="${base%.md}"
|
||||||
num="${name##*.}"
|
num="${name##*.}"
|
||||||
if [ -z "$num" -o "$name" = "$num" ]; then
|
if [ -z "$num" ] || [ "$name" = "$num" ]; then
|
||||||
# skip files that aren't of the format xxxx.N.md (like README.md)
|
# skip files that aren't of the format xxxx.N.md (like README.md)
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user