Skip to content

Commit f348165

Browse files
committed
ignoring check if it's not available
1 parent 3a88876 commit f348165

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/checkstyle/Main.hx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ class Main {
124124

125125
for (checkConf in config.checks) {
126126
var check = createCheck(checkConf);
127-
setCheckProperties(check, checkConf, config.defaultSeverity);
127+
if (check != null) setCheckProperties(check, checkConf, config.defaultSeverity);
128128
}
129129

130130
if (config.baseDefines != null) {
@@ -167,7 +167,10 @@ class Main {
167167

168168
function createCheck(checkConf:CheckConfig):Check {
169169
var check:Check = info.build(checkConf.type);
170-
if (check == null) failWith('Unknown check \'${checkConf.type}\'');
170+
if (check == null) {
171+
Sys.stdout().writeString('Unknown check \'${checkConf.type}\'');
172+
return null;
173+
}
171174
checker.addCheck(check);
172175
return check;
173176
}

0 commit comments

Comments
 (0)