yegor256 / qulice

Quality Police for Java projects: aggregator of Checkstyle and PMD
https://www.qulice.com
Other
299 stars 111 forks source link

LineLengthCheck check doubles non-ASCII symbols #873

Open proshin-roman opened 6 years ago

proshin-roman commented 6 years ago

What's wrong I have next line in the code (keeping indentation):

        final String input = "Hello, товарищ output äÄ üÜ öÖ and ß";

This line has 68 chars length and contains 14 non-ASCII symbols. Then I run the build with qulice maven plugin (version 0.17.1; OS Windows 10; standard command line) and get next error:

[INFO] Checkstyle: <class name>.java[83]: Line is longer than 80 characters (found 82). (LineLengthCheck)

It says the length is 82 that means that non-ASCII symbols are calculated twice: 68 (including non-ASCII) + 14 (doubled non-ASCII symbols) = 82. It's a bug!

How it should be All symbols must be calculated in same way and once only.

0crat commented 6 years ago

@krzyk/z please, pay attention to this issue

krzyk commented 6 years ago

@proshin-roman The issue here is actually in checkstyle, have you checked there if they already fixed this bug?

proshin-roman commented 6 years ago

@krzyk It might be this issue https://github.com/checkstyle/checkstyle/issues/5089

krzyk commented 6 years ago

@proshin-roman So not much we can do here right now until it is fixed in checkstyle :(

proshin-roman commented 6 years ago

@krzyk Yes, I agree but I would prefer to keep the ticket open so that we don't forget about this problem. And then it can be closed as soon as qulice is upgraded to the fixed Checkstyle version.

lrozenblyum commented 6 years ago

The bug is reproduced in the build: http://www.rultor.com/t/14467-387496260

QwerTech commented 5 years ago

+1 for this issue.