haxe-checkstyle
haxe-checkstyle copied to clipboard
"Parsing failed: Unexpected ï" if file has byte order mark
If checkstyle is run on a file with a byte order mark (for example this file), it causes the following error:
./source/Test.hx:1:1: error: Parsing failed: Unexpected ï
Stacktrace:
Called from hxparse/Lexer.hx line 100
Called from Checker.hx line 104
Called from Checker.hx line 133
Checkstyle version: 191bf0c245
This should be fixed in hxparse, because if I remove the BOM from content before sending it to Lexer, all positions are off by three. And that would likely affect a lot of checks.
So the solution for now is to remove the BOM from your files.
Makes sense. And yeah, that's what I did. :)
Ping @Simn.
I don't think hxparse is the right place to fix this, haxeparser is more appropriate.