提交 6ed60b40 编写于 作者: V Vladimir Panteleev

Extend SC2216/SC2217 with 'true' and 'false'

上级 8fa88239
...@@ -2819,6 +2819,7 @@ prop_checkPipeToNowhere4 = verify checkPipeToNowhere "printf 'Lol' << eof\nlol\n ...@@ -2819,6 +2819,7 @@ prop_checkPipeToNowhere4 = verify checkPipeToNowhere "printf 'Lol' << eof\nlol\n
prop_checkPipeToNowhere5 = verifyNot checkPipeToNowhere "echo foo | xargs du" prop_checkPipeToNowhere5 = verifyNot checkPipeToNowhere "echo foo | xargs du"
prop_checkPipeToNowhere6 = verifyNot checkPipeToNowhere "ls | echo $(cat)" prop_checkPipeToNowhere6 = verifyNot checkPipeToNowhere "ls | echo $(cat)"
prop_checkPipeToNowhere7 = verifyNot checkPipeToNowhere "echo foo | var=$(cat) ls" prop_checkPipeToNowhere7 = verifyNot checkPipeToNowhere "echo foo | var=$(cat) ls"
prop_checkPipeToNowhere8 = verify checkPipeToNowhere "foo | true"
checkPipeToNowhere :: Parameters -> Token -> WriterT [TokenComment] Identity () checkPipeToNowhere :: Parameters -> Token -> WriterT [TokenComment] Identity ()
checkPipeToNowhere _ t = checkPipeToNowhere _ t =
case t of case t of
......
...@@ -79,10 +79,10 @@ commonCommands = [ ...@@ -79,10 +79,10 @@ commonCommands = [
nonReadingCommands = [ nonReadingCommands = [
"alias", "basename", "bg", "cal", "cd", "chgrp", "chmod", "chown", "alias", "basename", "bg", "cal", "cd", "chgrp", "chmod", "chown",
"cp", "du", "echo", "export", "fg", "fuser", "getconf", "getopt", "cp", "du", "echo", "export", "false", "fg", "fuser", "getconf",
"getopts", "ipcrm", "ipcs", "jobs", "kill", "ln", "ls", "locale", "mv", "getopt", "getopts", "ipcrm", "ipcs", "jobs", "kill", "ln", "ls",
"nice", "printf", "ps", "pwd", "renice", "rm", "rmdir", "set", "sleep", "locale", "mv", "nice", "printf", "ps", "pwd", "renice", "rm", "rmdir",
"touch", "trap", "ulimit", "unalias", "uname" "set", "sleep", "touch", "trap", "true", "ulimit", "unalias", "uname"
] ]
sampleWords = [ sampleWords = [
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册