|
protected final Checker createChecker(Configuration moduleConfig) |
|
throws Exception { |
|
final String name = moduleConfig.getName(); |
|
|
|
return createChecker(moduleConfig, findModuleCreationOption(name)); |
|
} |
|
final Configuration config = createRootConfig(moduleConfig); |
|
checker.configure(config); |
Usual flow is:
final DefaultConfiguration checkConfig = createModuleConfig(RegexpHeaderCheck.class);
checkConfig.addProperty("headerFile", getPath("InputRegexpHeaderHead.header"));
Checker checker = createChecker(checkConfig);
checker.setCharset("US-ASCII");
This causes a problem, AbstractHeaderCheck is already contextualized at createChecker and setting checker.setCharset("US-ASCII"); afterward just sets it for checker, and children modules are not contextualized.
This is really error-prone and should either be documented or fixed.
checkstyle/src/it/java/org/checkstyle/base/AbstractItModuleTestSupport.java
Lines 261 to 266 in 88486f7
checkstyle/src/it/java/org/checkstyle/base/AbstractItModuleTestSupport.java
Lines 296 to 297 in 88486f7
Usual flow is:
This causes a problem,
AbstractHeaderCheckis already contextualized atcreateCheckerand settingchecker.setCharset("US-ASCII");afterward just sets it for checker, and children modules are not contextualized.This is really error-prone and should either be documented or fixed.