提交 41176c23 编写于 作者: K koalaman 提交者: GitHub

Merge pull request #822 from bittorf/master

SC2164: show two possible variants for circumenting the warning
......@@ -2515,7 +2515,7 @@ checkUncheckedCd params root =
when(t `isUnqualifiedCommand` "cd"
&& not (isCdDotDot t)
&& not (isCondition $ getPath (parentMap params) t)) $
warn (getId t) 2164 "Use cd ... || exit in case cd fails."
warn (getId t) 2164 "Use 'cd ... || exit' or 'cd ... || return' in case cd fails."
checkElement _ = return ()
isCdDotDot t = oversimplify t == ["cd", ".."]
hasSetE = isNothing $ doAnalysis (guard . not . isSetE) root
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册