Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve empty-string-compare rule #1480

Merged
merged 1 commit into from Mar 18, 2021
Merged

Improve empty-string-compare rule #1480

merged 1 commit into from Mar 18, 2021

Conversation

ssbarnea
Copy link
Member

  • rewrite matching to avoid line processing and trigger only on when
    blocks, highly reducing the chance of false-positives
  • add additional pass test to avoid future regression
  • refactor rule to use embedded tests

Fixes: #1232

- rewrite matching to avoid line processing and trigger only on when
  blocks, highly reducing the chance of false-positives
- add additional pass test to avoid future regression
- refactor rule to use embedded tests

Fixes: #1232
@ssbarnea ssbarnea added the bug label Mar 18, 2021
@ssbarnea ssbarnea added this to the 5.0.5 milestone Mar 18, 2021
@ssbarnea ssbarnea merged commit 333b4e0 into master Mar 18, 2021
@ssbarnea ssbarnea deleted the 0/00 branch March 18, 2021 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rule 602 (Don’t compare to empty string) find an error in shell script
1 participant