You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consider the following commands: haxelib run checkstyle -s tests/unit/src (Unix-style path) haxelib run checkstyle -s tests\unit\src (Windows-style path)
On Windows, both commands run; however, the second one results in errors for each file processed. Here is an example of the output, when run against the haxe-flixel project:
tests\unit\src/FlxAssert.hx:1: character 0 : Error: Check AvoidStarImport failed: regexp.c(115) : Regexp compilation error : PCRE does not support \L, \l, \N{name}, \U, or \u in tests\unit\src:flixel:math:FlxRandomTest:.*?FlxAssert$
Stacktrace:
Called from /usr/local/lib/haxe/std/neko/_std/EReg.hx line 33
Called from /usr/local/lib/haxe/std/neko/_std/EReg.hx line 22
Called from checkstyle/Checker.hx line 288
Called from checkstyle/Checker.hx line 268
From a quick review of the code, the function Checker.checkForExclude() appears to only handle forward slashes. I suspect the escaping logic could be updated to something like the following:
varslashes=~/[/\\]/g;
cls=slashes.replace(cls, ":");
for (excludeinexcludesForCheck) {
varregStr:String=slashes.replace(exclude, ":") +":.*?"+cls.substring(cls.lastIndexOf(":") +1, cls.length) +"$";
varr=newEReg(regStr, "i");
if (r.match(cls)) returntrue;
}
The text was updated successfully, but these errors were encountered:
seraku24
changed the title
Regex failure when specifiying path using backslashes (i.e. Windows-style).
Regex failure when specifying path using backslashes (i.e. Windows-style).
Nov 1, 2016
Consider the following commands:
haxelib run checkstyle -s tests/unit/src
(Unix-style path)haxelib run checkstyle -s tests\unit\src
(Windows-style path)On Windows, both commands run; however, the second one results in errors for each file processed. Here is an example of the output, when run against the haxe-flixel project:
From a quick review of the code, the function
Checker.checkForExclude()
appears to only handle forward slashes. I suspect the escaping logic could be updated to something like the following:The text was updated successfully, but these errors were encountered: