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

Issue #10920: NoWhitespaceBefore error on semicolon or comma after string with emoji #10922

Merged
merged 1 commit into from
Nov 12, 2021

Conversation

nrmancuso
Copy link
Member

@nrmancuso
Copy link
Member Author

Github, generate report

* @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) {
Copy link
Member Author

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).

Copy link
Member

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?

Copy link
Member Author

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

Copy link
Member

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.

Copy link
Member

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

Copy link
Member

@romani romani left a 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.

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.

Version 9.x reports NoWhitespaceBefore error on semicolon or comma after string with emoji
3 participants