mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-08-08 14:27:35 +08:00
Minor formatting fixes
This commit is contained in:
@@ -4889,15 +4889,12 @@ checkBatsTestDoesNotUseNegation params t =
|
||||
T_Banged id (T_Pipeline _ _ [T_Redirecting _ _ (T_Condition idCondition _ _)]) ->
|
||||
if t `isLastOf` commands
|
||||
then style id 2315 "In Bats, ! will not fail the test if it is not the last command anymore. Fold the `!` into the conditional!"
|
||||
else err id 2315
|
||||
"In Bats, ! does not cause a test failure. Fold the `!` into the conditional!"
|
||||
else err id 2315 "In Bats, ! does not cause a test failure. Fold the `!` into the conditional!"
|
||||
|
||||
T_Banged id cmd -> if t `isLastOf` commands
|
||||
then styleWithFix id 2314
|
||||
"In Bats, ! will not fail the test if it is not the last command anymore. Use `run ! ` (on Bats >= 1.5.0) instead."
|
||||
then styleWithFix id 2314 "In Bats, ! will not fail the test if it is not the last command anymore. Use `run ! ` (on Bats >= 1.5.0) instead."
|
||||
(fixWith [replaceStart id params 0 "run "])
|
||||
else errWithFix id 2314
|
||||
"In Bats, ! does not cause a test failure. Use 'run ! ' (on Bats >= 1.5.0) instead."
|
||||
else errWithFix id 2314 "In Bats, ! does not cause a test failure. Use 'run ! ' (on Bats >= 1.5.0) instead."
|
||||
(fixWith [replaceStart id params 0 "run "])
|
||||
_ -> return ()
|
||||
isLastOf t commands =
|
||||
|
Reference in New Issue
Block a user