From 91a17fc57224a74f6bff5af3516b1438d9971f74 Mon Sep 17 00:00:00 2001 From: Martin Schulze <37703201+martin-schulze-vireso@users.noreply.github.com> Date: Sat, 6 Nov 2021 08:16:30 +0100 Subject: [PATCH] Sync title with error message in code --- SC2314.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/SC2314.md b/SC2314.md index d1837e4..69b2cfa 100644 --- a/SC2314.md +++ b/SC2314.md @@ -1,4 +1,4 @@ -## bats: ! \ will never fail the test +## In bats, ! does not cause a test failure ### Problematic code: @@ -39,8 +39,6 @@ The return code of the last command in the test will be the exit code of the tes This means that you can use `! ` on the last line of the test and it will still fail appropriately. However, you are encouraged to still use `run !` in this case for consistency. -Shellcheck won't emit this error when using `! ` as last command in a test to avoid confusing users whose tests work as intended. - ### Related resources: * [SC2251: This ! is not on a condition and skips errexit](SC2251.md)