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

feat: improve rune scan #1

Merged
merged 1 commit into from
Nov 2, 2021
Merged

feat: improve rune scan #1

merged 1 commit into from
Nov 2, 2021

Conversation

ldez
Copy link
Contributor

@ldez ldez commented Nov 2, 2021

Copy link

@SVilgelm SVilgelm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@breml
Copy link
Owner

breml commented Nov 2, 2021

I just executed the tests on this PR and they do not pass.

@SVilgelm
Copy link

SVilgelm commented Nov 2, 2021

so, what is wrong? could you show some details?

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)
Copy link
Owner

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.

Copy link

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dropped the commit

@ldez ldez force-pushed the fix/improvements branch from 3d7d904 to d73ee04 Compare November 2, 2021 18:52
@breml breml merged commit 413c815 into breml:master Nov 2, 2021
@ldez ldez deleted the fix/improvements branch November 2, 2021 18:59
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.

3 participants