The test method testInvalidArrayInitWithTrueStrictCondition() in IndentationCheckTest.java uses the input file InputIndentationInvalidArrayInitIndent.java to verify behavior with forceStrictCondition=true.
InputIndentaionCheckTest.java
https://github.com/checkstyle/checkstyle/blob/master/src/test/java/com/puppycrawl/tools/checkstyle/checks/indentation/IndentationCheckTest.java
However, the same input is not tested with forceStrictCondition=false, which leads to incomplete test coverage for this configuration.
A new test method (e.g., testInvalidArrayInitWithFalseStrictCondition()) should be added to verify behavior when forceStrictCondition is false.
The test method
testInvalidArrayInitWithTrueStrictCondition()inIndentationCheckTest.javauses the input fileInputIndentationInvalidArrayInitIndent.javato verify behavior withforceStrictCondition=true.InputIndentaionCheckTest.javahttps://github.com/checkstyle/checkstyle/blob/master/src/test/java/com/puppycrawl/tools/checkstyle/checks/indentation/IndentationCheckTest.java
However, the same input is not tested with
forceStrictCondition=false, which leads to incomplete test coverage for this configuration.A new test method (e.g.,
testInvalidArrayInitWithFalseStrictCondition()) should be added to verify behavior whenforceStrictConditionis false.