Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
New checker: comparison to empty string constant #1183
Detects things like
Note that in some cases this is what the author needs but my experience tells me most of the times empty string value doesn't have a special meaning.
Note2: this probably belongs to the ComparisonChecker in base.py. This checker however only supports binary comparisons so I will have to fix his limitation first. Let me know how would you like to proceed about that.
@atodorov Thanks for the PR! I've got to think this one over a bit. I've definitely had code where I compare to empty string as shorthand for
If we go forward with this one I'd like to see us turn it off by default.
In these cases where we don't know the type of