-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Issue #10920: NoWhitespaceBefore error on semicolon or comma after string with emoji #10922
Conversation
Github, generate report |
2b74f50
to
f1f145d
Compare
* @param stringArrayIndex the index of the character to check | ||
* @return true if character at {@code stringArrayIndex} is whitespace | ||
*/ | ||
private static boolean isCodePointWhitespace(int[] codePoints, int stringArrayIndex) { |
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 had considered adding this method to CheckUtil
, but so far there is only one other possible usage in another check (WhitespaceAroundCheck
).
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.
May be there are same issues with other whitespace checks, e.g. GenericWhitespace, NoWhitespaceBeforeCaseDefaultColon, WhitespaceAfter?
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.
Issue opened for further investigation at #10924
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.
issue is approved, lets proceed to review fix for this Check only.
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.
@nmancus1 , please rename stringArrayIndex
to index
, as it is index in codepoints array.
name method isWhitespace
by argument it is clear that it is for codepoint
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.
Done
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.
see minor comment above.
ok to merge as it is done.
…a after string with emoji
f1f145d
to
02d532f
Compare
closes #10920 .
Diff Regression config: https://gist.githubusercontent.com/nmancus1/c505009a3aa0485a4293d193c00c807b/raw/9645b8608afd7b0dbd57df4baa2fb23cfe1802d0/config.xml