haxe-checkstyle
haxe-checkstyle copied to clipboard
WhitespaceAround fails with special characters in comment
class Test {
// °
var test:Int = 0;
}
./source/Test.hx:4: characters 16-17 : Error: No whitespace around "="
Same result with ä
or ß
and probably tons of other slightly non-standard characters.
I think this didn't cause issues not too long ago...
Can't seem to reproduce this anymore.. Might've been an old hxparse version.
This fails on python (I've been playing around with checkstyle on the python and lua targets. Don't think there's any real use-case for that, but I found a few Haxe bugs that way at least).
I just had the same problem when using vscode-checkstyle on a file with a comment that contained an umlaut. The same file runs fine on Neko and C++ builds of checkstyle.
I don't have a JS build set up, so I cannot debug it right now, but I guess the positions for tokens are off because of utf-8 / unicode encoding. So certain checks find violations because they look at the wrong position in the file.
We also might have to get the unittests to run on JS to make sure it runs properly in vscode.
I changed content
from String
to Bytes
, so now positions should be correct. At least my tests in vscode showed no more checkstyle issues with lines containing umlaut or other utf-8 characters.
~~hmmm... it works on Linux, but not on Windows~~ edit: it works on Windows, I had my haxelib setup mixed up, so vscode-checkstyle was using release version 2.2.1 instead of latest dev.
I haven't really checked, but I also haven't seen any issues with vscode-checkstyle, is it still broken?