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