Fix RegexpMultiline causing exception with default config. #1129
This commit is contained in:
parent
0ba72f9767
commit
4e0cb46ae5
|
|
@ -52,9 +52,10 @@
|
|||
<property name="maximum" value="0"/>
|
||||
</module>
|
||||
|
||||
<module name="RegexpMultiline"/>
|
||||
|
||||
<!--
|
||||
<module name="RegexpHeader"/>
|
||||
<module name="RegexpMultiline"/>
|
||||
<module name="UniqueProperties"/>
|
||||
-->
|
||||
<module name="TreeWalker">
|
||||
|
|
|
|||
|
|
@ -35,8 +35,11 @@ class DetectorOptions {
|
|||
private final int compileFlags;
|
||||
/** Used for reporting violations. */
|
||||
private final AbstractViolationReporter reporter;
|
||||
/** Format of the regular expression to check for. */
|
||||
private String format;
|
||||
/**
|
||||
* Format of the regular expression to check for. Default value is pattern that never matches
|
||||
* any string.
|
||||
*/
|
||||
private String format = "$.";
|
||||
/** The message to report on detection. If blank, then use the format. */
|
||||
private String message = "";
|
||||
/** Minimum number of times regular expression should occur in a file. */
|
||||
|
|
|
|||
|
|
@ -112,4 +112,11 @@ public class RegexpMultilineCheckTest extends BaseFileSetCheckTestSupport {
|
|||
verify(checkConfig, file.getPath(), expected);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDefaultConfiguration() throws Exception {
|
||||
final DefaultConfiguration checkConfig = createCheckConfig(RegexpMultilineCheck.class);
|
||||
final String[] expected = {
|
||||
};
|
||||
verify(checkConfig, getPath("InputSemantic.java"), expected);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue