build.xml:
now clean target also removes expandedjava14.g generated by antlr. GenericIllegalRegexpCheck: removed to item about explicit setting of match flags. Indentation: Todo item about static init blocks fixed in IndentationCheckTest.testInvalidBlockWithChecker().
This commit is contained in:
parent
4f892fe43a
commit
52dea9dcdc
|
|
@ -72,6 +72,7 @@
|
|||
<fileset dir="src/checkstyle">
|
||||
<include name="**/Generated*.java"/>
|
||||
<include name="**/Generated*.txt"/>
|
||||
<include name="**/expandedjava14.g"/>
|
||||
</fileset>
|
||||
</delete>
|
||||
<delete dir="target" />
|
||||
|
|
|
|||
|
|
@ -113,21 +113,16 @@ public class GenericIllegalRegexpCheck extends AbstractFormatCheck
|
|||
public RE getRegexp()
|
||||
{
|
||||
final RE regexp = super.getRegexp();
|
||||
|
||||
// we should explicitly set match flags because
|
||||
// we caching RE and another check (or instance
|
||||
// of this check could change match flags.
|
||||
if (mIgnoreCase) {
|
||||
regexp.setMatchFlags(RE.MATCH_CASEINDEPENDENT);
|
||||
}
|
||||
// Without the else, in a sequence of GenericIllegalRegexpCheck's,
|
||||
// the first with mIgnoreCase true, the second with mIgnoreCase
|
||||
// false, the second still has match behaviour flags as
|
||||
// RE.MATCH_CASEINDEPENDENT.
|
||||
// This happens with GenericIllegalRegexpCheckTest method
|
||||
// testIgnoreCaseFalse(), for example.
|
||||
// TODO: Check whether this a bug or known feature of
|
||||
// org.apache.regexp.RE.
|
||||
else {
|
||||
regexp.setMatchFlags(RE.MATCH_NORMAL);
|
||||
}
|
||||
return regexp;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -84,8 +84,8 @@ public class InputInvalidBlockIndent {
|
|||
|
||||
}
|
||||
|
||||
/*
|
||||
static init at beginning of line is broken for now
|
||||
|
||||
// static init at beginning of line is broken for now
|
||||
|
||||
|
||||
static { int var = 4; }
|
||||
|
|
@ -93,7 +93,7 @@ public class InputInvalidBlockIndent {
|
|||
|
||||
|
||||
static {
|
||||
int var = 4;
|
||||
int var = 4;
|
||||
}
|
||||
|
||||
static {
|
||||
|
|
@ -112,7 +112,7 @@ public class InputInvalidBlockIndent {
|
|||
{
|
||||
int var = 4;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
static
|
||||
{
|
||||
|
|
|
|||
|
|
@ -364,7 +364,18 @@ public class IndentationCheckTest extends BaseCheckTestCase {
|
|||
"66: block lcurly at indentation level 10 not at correct indentation, 12",
|
||||
"67: block child at indentation level 14 not at correct indentation, 16",
|
||||
"82: block rcurly at indentation level 10 not at correct indentation, 12",
|
||||
// TODO: static gives back wrong colno "87: block static at indentation level 2 not at correct indentation, 4",
|
||||
"91: static initialization at indentation level 2 not at correct indentation, 4",
|
||||
"92: static initialization at indentation level 6 not at correct indentation, 4",
|
||||
"96: static initialization child at indentation level 7 not at correct indentation, 8",
|
||||
"99: static initialization at indentation level 6 not at correct indentation, 4",
|
||||
"101: static initialization rcurly at indentation level 2 not at correct indentation, 4",
|
||||
"103: static initialization at indentation level 2 not at correct indentation, 4",
|
||||
"105: static initialization rcurly at indentation level 6 not at correct indentation, 4",
|
||||
"107: static initialization at indentation level 2 not at correct indentation, 4",
|
||||
"109: static initialization child at indentation level 6 not at correct indentation, 8",
|
||||
"112: static initialization lcurly at indentation level 2 not at correct indentation, 4",
|
||||
"113: static initialization child at indentation level 6 not at correct indentation, 8",
|
||||
"114: static initialization rcurly at indentation level 6 not at correct indentation, 4",
|
||||
"119: static initialization child at indentation level 6 not at correct indentation, 8",
|
||||
"124: static initialization child at indentation level 4 not at correct indentation, 8",
|
||||
"125: static initialization rcurly at indentation level 2 not at correct indentation, 4",
|
||||
|
|
|
|||
Loading…
Reference in New Issue