-
Notifications
You must be signed in to change notification settings - Fork 4
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
feat: improve rune scan #1
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I just executed the tests on this PR and they do not pass. |
so, what is wrong? could you show some details? |
pkg/bidichk/bidichk.go
Outdated
pass.Reportf(pos+token.Pos(start), "found dangerous unicode character sequence %s", name) | ||
start += utf8.RuneLen(r) | ||
start += idx + utf8.RuneLen(r) | ||
pass.Reportf(pos+token.Pos(idx), "found dangerous unicode character sequence %s", name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
token.Pos(idx)
is wrong, because idx
is the position from the last occurrence and not from the beginning of the file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh yeah, sorry, last suggestion was incorrect
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dropped the commit
3d7d904
to
d73ee04
Compare
golangci/golangci-lint#2330 (comment)
Ping @SVilgelm