Skip to content

feat: new rule SC2337#3451

Open
Zamiell wants to merge 1 commit intokoalaman:masterfrom
Zamiell:add-new-rule
Open

feat: new rule SC2337#3451
Zamiell wants to merge 1 commit intokoalaman:masterfrom
Zamiell:add-new-rule

Conversation

@Zamiell
Copy link
Copy Markdown

@Zamiell Zamiell commented Apr 16, 2026

This rule is very similar to SC2292 / require-double-brackets: https://www.shellcheck.net/wiki/SC2292
Which is an optional rule that enforces "[[" over "[" in Bash.

This new rule in this PR is SC2337 / require-double-equals.
It enforces "==" over "=". (It's an optional check in the same way that SC2292 is optional.)

Double equals is preferable because the code becomes more easy to read - in programming, a single equals usually means assignment and a double equals usually means equality comparison.

Let me know if anything else is needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant