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

WhitespaceAround fails with special characters in comment #98

Open
Gama11 opened this issue Mar 4, 2016 · 6 comments
Open

WhitespaceAround fails with special characters in comment #98

Gama11 opened this issue Mar 4, 2016 · 6 comments
Labels

Comments

@Gama11
Copy link
Member

Gama11 commented Mar 4, 2016

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

@Gama11 Gama11 added the bug label Mar 4, 2016
AlexHaxe added a commit that referenced this issue Mar 4, 2016
@Gama11
Copy link
Member Author

Gama11 commented Mar 4, 2016

Can't seem to reproduce this anymore.. Might've been an old hxparse version.

@Gama11 Gama11 closed this as completed Mar 4, 2016
@Gama11
Copy link
Member Author

Gama11 commented Apr 5, 2016

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

@Gama11 Gama11 reopened this Apr 5, 2016
@AlexHaxe
Copy link
Member

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.

AlexHaxe added a commit to AlexHaxe/haxe-checkstyle that referenced this issue May 1, 2018
AlexHaxe added a commit that referenced this issue May 1, 2018
…402)

* refactored to use Bytes instead of String for file contents, see #98
@AlexHaxe
Copy link
Member

AlexHaxe commented May 1, 2018

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.

@AlexHaxe
Copy link
Member

AlexHaxe commented May 1, 2018

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.

@AlexHaxe
Copy link
Member

AlexHaxe commented Dec 1, 2019

I haven't really checked, but I also haven't seen any issues with vscode-checkstyle, is it still broken?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants