Updated SC2251 (markdown)

Eisuke Kawashima
2025-07-29 10:41:42 +09:00
parent e33cf5f6f5
commit a40c6b465e

@@ -27,8 +27,8 @@ Adding `|| exit ` will instead exit with failure when the command succeeds.
ShellCheck will not detect cases where `$?` is implicitly or explicitly used to check the value afterwards: ShellCheck will not detect cases where `$?` is implicitly or explicitly used to check the value afterwards:
``` ```sh
set -e; set -e
check_success() { [ $? -eq 0 ] || exit 1; } check_success() { [ $? -eq 0 ] || exit 1; }
! false; check_success ! false; check_success
! true; check_success ! true; check_success