mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-09-22 11:57:44 +08:00
Mention -- as alternative to ./* in SC2035
This commit is contained in:
@@ -2885,7 +2885,7 @@ checkUnassignedReferences params t = warnings
|
|||||||
isGuarded _ = False
|
isGuarded _ = False
|
||||||
|
|
||||||
match var candidate =
|
match var candidate =
|
||||||
if var /= candidate && (map toLower var) == (map toLower candidate)
|
if var /= candidate && map toLower var == map toLower candidate
|
||||||
then 1
|
then 1
|
||||||
else dist var candidate
|
else dist var candidate
|
||||||
|
|
||||||
@@ -2897,9 +2897,7 @@ checkGlobsAsOptions _ (T_SimpleCommand _ _ args) =
|
|||||||
mapM_ check $ takeWhile (not . isEndOfArgs) args
|
mapM_ check $ takeWhile (not . isEndOfArgs) args
|
||||||
where
|
where
|
||||||
check v@(T_NormalWord _ (T_Glob id s:_)) | s == "*" || s == "?" =
|
check v@(T_NormalWord _ (T_Glob id s:_)) | s == "*" || s == "?" =
|
||||||
info id 2035 $
|
info id 2035 "Use ./*glob* or -- *glob* so names with dashes won't become options."
|
||||||
"Use ./" ++ concat (oversimplify v)
|
|
||||||
++ " so names with dashes won't become options."
|
|
||||||
check _ = return ()
|
check _ = return ()
|
||||||
|
|
||||||
isEndOfArgs t =
|
isEndOfArgs t =
|
||||||
|
Reference in New Issue
Block a user