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

Wrong warning from AvoidEscapedUnicodeCharacters #3476

Closed
rillig-nm opened this Issue Sep 29, 2016 · 1 comment

Comments

Projects
None yet
2 participants
@rillig-nm

rillig-nm commented Sep 29, 2016

$ cat Unicode.java
interface Unicode {
  String GOOD = "\\u1234";
  String BAD = "\u1234";
}

$ java -jar checkstyle-checkstyle-7.1.1/target/checkstyle-7.1.1-all.jar -c checkstyle.xml Unicode.java
Starting audit...
[WARN] F:\ishop\git\novosales\checkstyle\Unicode.java:2: Unicode-Escapes sollten vermieden werden. [AvoidEscapedUnicodeCharacters]
[WARN] F:\ishop\git\novosales\checkstyle\Unicode.java:3: Unicode-Escapes sollten vermieden werden. [AvoidEscapedUnicodeCharacters]
Audit done.

The warning in line 2 is wrong and should not be there.

Additionally, the Javadoc of the AvoidEscapedUnicodeCharactersCheck class is wrong in the first paragraph, where the Unicode escape sequence is rendered as instead of \u221e.

http://checkstyle.sourceforge.net/config_misc.html#AvoidEscapedUnicodeCharacters

@rillig-nm rillig-nm changed the title from AvoidEscapedUnicodeCharacters to Wrong warning from AvoidEscapedUnicodeCharacters Sep 29, 2016

@romani romani added the approved label Sep 29, 2016

Dziman added a commit to Dziman/checkstyle that referenced this issue Sep 29, 2016

Dziman added a commit to Dziman/checkstyle that referenced this issue Sep 29, 2016

Dziman added a commit to Dziman/checkstyle that referenced this issue Sep 30, 2016

Dziman added a commit to Dziman/checkstyle that referenced this issue Sep 30, 2016

Dziman added a commit to Dziman/checkstyle that referenced this issue Oct 1, 2016

Dziman added a commit to Dziman/checkstyle that referenced this issue Oct 2, 2016

Dziman added a commit to Dziman/checkstyle that referenced this issue Oct 6, 2016

romani added a commit that referenced this issue Oct 10, 2016

@romani romani added the bug label Oct 10, 2016

@romani romani added this to the 7.2 milestone Oct 10, 2016

@romani

This comment has been minimized.

Show comment
Hide comment
@romani

romani Oct 10, 2016

Member

fix is merged.

Member

romani commented Oct 10, 2016

fix is merged.

@romani romani closed this Oct 10, 2016

agcuda added a commit to agcuda/checkstyle that referenced this issue Oct 30, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment