mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-10 21:53: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>
(cherry picked from commit ae6cb653f4)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
@@ -133,8 +133,8 @@ cfmt:
|
||||
shellcheck:
|
||||
shellcheck tests/integration/*.bats tests/integration/*.sh \
|
||||
tests/integration/*.bash tests/*.sh \
|
||||
script/*
|
||||
# TODO: add shellcheck for more sh files
|
||||
man/*.sh script/*
|
||||
# TODO: add shellcheck for more sh files (contrib/completions/bash/runc).
|
||||
|
||||
shfmt:
|
||||
shfmt -ln bats -d -w tests/integration/*.bats
|
||||
|
||||
+2
-2
@@ -2,7 +2,7 @@
|
||||
set -e
|
||||
|
||||
# get into this script's directory
|
||||
cd "$(dirname "$(readlink -f "$BASH_SOURCE")")"
|
||||
cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
|
||||
|
||||
[ "$1" = '-q' ] || {
|
||||
set -x
|
||||
@@ -18,7 +18,7 @@ for FILE in *.md; do
|
||||
base="$(basename "$FILE")"
|
||||
name="${base%.md}"
|
||||
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)
|
||||
continue
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user