File tree 2 files changed +3
-9
lines changed
2 files changed +3
-9
lines changed Original file line number Diff line number Diff line change 8
8
- SC2264: Warn about wrapper functions that blatantly recurse
9
9
- SC2265/SC2266: Warn when using & or | with test statements
10
10
- SC2267: Warn when using xargs -i instead of -I
11
- - Optional avoid-x-comparisons: Style warning SC2268 for ` [ x$var = xval ] `
11
+ - SC2268: Warn about unnecessary x-comparisons like ` [ x$var = xval ] `
12
12
13
13
### Fixed
14
14
- SC1072/SC1073 now respond to disable annotations, though ignoring parse errors
Original file line number Diff line number Diff line change @@ -196,6 +196,7 @@ nodeChecks = [
196
196
,checkAssignToSelf
197
197
,checkEqualsInCommand
198
198
,checkSecondArgIsComparison
199
+ ,checkComparisonWithLeadingX
199
200
]
200
201
201
202
optionalChecks = map fst optionalTreeChecks
@@ -243,13 +244,6 @@ optionalTreeChecks = [
243
244
cdPositive = " echo $VAR" ,
244
245
cdNegative = " VAR=hello; echo $VAR"
245
246
}, checkUnassignedReferences' True )
246
-
247
- ,(newCheckDescription {
248
- cdName = " avoid-x-comparisons" ,
249
- cdDescription = " Warn about 'x'-prefix in comparisons" ,
250
- cdPositive = " [ \" x$var\" = xval ]" ,
251
- cdNegative = " [ \" $var\" = val ]"
252
- }, nodeChecksToTreeCheck [checkComparisonWithLeadingX])
253
247
]
254
248
255
249
optionalCheckMap :: Map. Map String (Parameters -> Token -> [TokenComment ])
@@ -4006,7 +4000,7 @@ checkComparisonWithLeadingX params t =
4006
4000
check lhs rhs
4007
4001
_ -> return ()
4008
4002
where
4009
- msg = " Avoid outdated x-prefix in comparisons as it no longer serves a purpose."
4003
+ msg = " Avoid x-prefix in comparisons as it no longer serves a purpose."
4010
4004
check lhs rhs = sequence_ $ do
4011
4005
l <- fixLeadingX lhs
4012
4006
r <- fixLeadingX rhs
You can’t perform that action at this time.
0 commit comments