2018-07-11 08:46:39 +02:00
|
|
|
(
|
2021-12-13 07:30:46 +01:00
|
|
|
# LINT: "if", "then", "elif", "else", "fi" do not need "&&"
|
2018-07-11 08:46:39 +02:00
|
|
|
if test -n ""
|
|
|
|
then
|
2021-12-13 07:30:46 +01:00
|
|
|
# LINT: missing "&&" on "echo"
|
2018-07-11 08:46:39 +02:00
|
|
|
echo very
|
2021-12-13 07:30:46 +01:00
|
|
|
# LINT: last statement before "elif" does not need "&&"
|
2018-07-11 08:46:39 +02:00
|
|
|
echo empty
|
|
|
|
elif test -z ""
|
2021-12-13 07:30:45 +01:00
|
|
|
then
|
2021-12-13 07:30:46 +01:00
|
|
|
# LINT: last statement before "else" does not need "&&"
|
2018-07-11 08:46:39 +02:00
|
|
|
echo foo
|
|
|
|
else
|
|
|
|
echo foo &&
|
2021-12-13 07:30:46 +01:00
|
|
|
# LINT: last statement before "fi" does not need "&&"
|
2018-07-11 08:46:39 +02:00
|
|
|
cat <<-\EOF
|
|
|
|
bar
|
|
|
|
EOF
|
2021-12-13 07:30:46 +01:00
|
|
|
# LINT: missing "&&" on "fi"
|
2018-07-11 08:46:39 +02:00
|
|
|
fi
|
|
|
|
echo poodle
|
|
|
|
) &&
|
|
|
|
(
|
2021-12-13 07:30:46 +01:00
|
|
|
# LINT: "then" on same line as "if"
|
2018-07-11 08:46:39 +02:00
|
|
|
if test -n ""; then
|
|
|
|
echo very &&
|
|
|
|
echo empty
|
2021-12-13 07:30:45 +01:00
|
|
|
fi
|
2018-07-11 08:46:39 +02:00
|
|
|
)
|