Skip to content

Commit 4b5e987

Browse files
committed
fixed Haxe 3 compile
1 parent a3a6903 commit 4b5e987

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

schema/CheckstyleSchemaGenerator.hx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,11 @@ class CheckstyleSchemaGenerator {
101101
if (name.length <= 0) {
102102
continue;
103103
}
104+
#if (haxe_ver < 4)
105+
if (name == "InlineFinalCheck") {
106+
continue;
107+
}
108+
#end
104109
var fullPath:String = ~/[\/\\]/g.replace(Path.join([path, name]), ".");
105110
name = name.substr(0, name.length - 5);
106111
checks.push({name: name, path: fullPath});

test/checkstyle/config/ConfigParserTest.hx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,11 @@ class ConfigParserTest {
6565
Assert.fail(message);
6666
});
6767

68+
#if (haxe_ver >= 4.0)
6869
Assert.areEqual(74, configParser.getCheckCount());
70+
#else
71+
Assert.areEqual(73, configParser.getCheckCount());
72+
#end
6973
}
7074

7175
@Test
@@ -76,7 +80,11 @@ class ConfigParserTest {
7680

7781
Assert.areEqual(0, configParser.getUsedCheckCount());
7882
configParser.addAllChecks();
83+
#if (haxe_ver >= 4.0)
7984
Assert.areEqual(74, configParser.getUsedCheckCount());
85+
#else
86+
Assert.areEqual(73, configParser.getUsedCheckCount());
87+
#end
8088
}
8189

8290
@Test

0 commit comments

Comments
 (0)