Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
镜像
koalaman
ShellCheck
提交
485593da
S
ShellCheck
项目概览
镜像
/
koalaman
/
ShellCheck
上一次同步 11 个月
通知
42
Star
0
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
ShellCheck
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
485593da
编写于
10月 01, 2015
作者:
V
Vidar Holen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Don't warn about disrespected quotes in ${#var}.
上级
1181c6b3
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
7 addition
and
0 deletion
+7
-0
ShellCheck/Analytics.hs
ShellCheck/Analytics.hs
+7
-0
未找到文件。
ShellCheck/Analytics.hs
浏览文件 @
485593da
...
...
@@ -2541,6 +2541,7 @@ prop_checkQuotesInLiterals6 = verifyTree checkQuotesInLiterals "param='my\\ file
prop_checkQuotesInLiterals6a
=
verifyNotTree
checkQuotesInLiterals
"param='my
\\
file'; cmd=
\"
rm ${#param}
\"
; $cmd"
prop_checkQuotesInLiterals7
=
verifyTree
checkQuotesInLiterals
"param='my
\\
file'; rm $param"
prop_checkQuotesInLiterals8
=
verifyTree
checkQuotesInLiterals
"param=
\"
/foo/'bar baz'/etc
\"
; rm $param"
prop_checkQuotesInLiterals9
=
verifyNotTree
checkQuotesInLiterals
"param=
\"
/foo/'bar baz'/etc
\"
; rm ${#param}"
checkQuotesInLiterals
params
t
=
doVariableFlowAnalysis
readF
writeF
Map
.
empty
(
variableFlow
params
)
where
...
...
@@ -2572,12 +2573,18 @@ checkQuotesInLiterals params t =
then
return
$
getId
t
else
Nothing
squashesQuotes
t
=
case
t
of
T_DollarBraced
id
_
->
"#"
`
isPrefixOf
`
bracedString
t
otherwise
->
False
readF
_
expr
name
=
do
assignment
<-
getQuotes
name
return
(
if
isJust
assignment
&&
not
(
isParamTo
parents
"eval"
expr
)
&&
not
(
isQuoteFree
parents
expr
)
&&
not
(
squashesQuotes
expr
)
then
[
makeComment
WarningC
(
fromJust
assignment
)
2089
"Quotes/backslashes will be treated literally. Use an array."
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录