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

staticcheck: check for inclusive comparison to utf8.RuneSelf #761

Open
martisch opened this issue May 22, 2020 · 0 comments
Open

staticcheck: check for inclusive comparison to utf8.RuneSelf #761

martisch opened this issue May 22, 2020 · 0 comments
Labels
needs-decision We have to decide if this check is feasible and desirable new-check

Comments

@martisch
Copy link

The correct check for ASCII runes is x < utf8.RuneSelf but sometimes an error is made when an inclusive comparison like x <= utf8.RuneSelf is used.

I have made that mistake and have seen it in code by others.

@martisch martisch added the needs-triage Newly filed issue that needs triage label May 22, 2020
@dominikh dominikh added needs-decision We have to decide if this check is feasible and desirable new-check and removed needs-triage Newly filed issue that needs triage labels May 24, 2020
@dominikh dominikh changed the title check for inclusive comparison to utf8.RuneSelf staticcheck: check for inclusive comparison to utf8.RuneSelf Jun 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-decision We have to decide if this check is feasible and desirable new-check
Projects
None yet
Development

No branches or pull requests

2 participants