feat: avoid double negative of a binary operator in test

suggest `[ a != b ]` over `[ ! a = b ]` and `! [ a = b ]`, and so forth.
c.f. SC2236 and SC2237 (unary operations)

close #3164
This commit is contained in:
Eisuke Kawashima
2025-04-15 02:19:31 +09:00
parent 7dc4214149
commit 34cdbaa5e0
2 changed files with 31 additions and 0 deletions

View File

@@ -5,6 +5,7 @@
- SC2330: Warn about unsupported glob matches with [[ .. ]] in BusyBox.
- SC2331: Suggest using standard -e instead of unary -a in tests.
- SC2332: Warn about `[ ! -o opt ]` being unconditionally true in Bash.
- SC2335: Avoid double negative of a binary operator in test—suggest `[ a != b ]` over `[ ! a = b ]` and `! [ a = b ]`, and so forth.
- SC3062: Warn about bashism `[ -o opt ]`.
- Precompiled binaries for Linux riscv64 (linux.riscv64)
### Changed