mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 19:29:44 +08:00
Sync title with error message in code
@@ -1,4 +1,4 @@
|
||||
## bats: ! \<command> 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 `! <command>` 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 `! <command>` 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)
|
||||
|
Reference in New Issue
Block a user