Skip to content

Commit

Permalink
Merge pull request #301 from HaxeCheckstyle/#300
Browse files Browse the repository at this point in the history
fixes #300
  • Loading branch information
adireddy authored Nov 1, 2016
2 parents 163d6fc + ec4b979 commit c307d13
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/checkstyle/Checker.hx
Original file line number Diff line number Diff line change
Expand Up @@ -282,10 +282,11 @@ class Checker {
var cls = file.name.substring(0, file.name.indexOf(".hx"));
if (excludesForCheck.contains(cls)) return true;

cls = cls.replace("/", ":");
var slashes:EReg = ~/[\/\\]/g;
cls = slashes.replace(cls, ":");
for (exclude in excludesForCheck) {
var regStr:String = exclude + ":.*?" + cls.substring(cls.lastIndexOf(":") + 1, cls.length) + "$";
var r = new EReg(regStr.replace("/", ":"), "i");
var regStr:String = slashes.replace(exclude, ":") + ":.*?" + cls.substring(cls.lastIndexOf(":") + 1, cls.length) + "$";
var r = new EReg(regStr, "i");
if (r.match(cls)) return true;
}
return false;
Expand Down

0 comments on commit c307d13

Please sign in to comment.