Skip to content

Commit

Permalink
Issue checkstyle#11720: Kill surviving mutation in RequireThisCheck
Browse files Browse the repository at this point in the history
  • Loading branch information
Vyom-Yadav committed Jun 27, 2022
1 parent c666b0e commit 072e6af
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 13 deletions.
@@ -1,14 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<suppressedMutations>
<mutation unstable="false">
<sourceFile>RequireThisCheck.java</sourceFile>
<mutatedClass>com.puppycrawl.tools.checkstyle.checks.coding.RequireThisCheck</mutatedClass>
<mutatedMethod>beginTree</mutatedMethod>
<mutator>org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_IF</mutator>
<description>removed conditional - replaced equality check with true</description>
<lineContent>if (toVisit == null) {</lineContent>
</mutation>

<mutation unstable="false">
<sourceFile>RequireThisCheck.java</sourceFile>
<mutatedClass>com.puppycrawl.tools.checkstyle.checks.coding.RequireThisCheck</mutatedClass>
Expand Down
1 change: 0 additions & 1 deletion .ci/pitest-survival-check-html.sh
Expand Up @@ -200,7 +200,6 @@ pitest-coding-require-this-check)
declare -a ignoredItems=(
"RequireThisCheck.java.html:<td class='covered'><pre><span class='survived'> &#38;&#38; ast.getParent().getType() != TokenTypes.LITERAL_CATCH) {</span></pre></td></tr>"
"RequireThisCheck.java.html:<td class='covered'><pre><span class='survived'> if (isAnonymousClassDef(ast)) {</span></pre></td></tr>"
"RequireThisCheck.java.html:<td class='covered'><pre><span class='survived'> if (toVisit == null) {</span></pre></td></tr>"
"RequireThisCheck.java.html:<td class='covered'><pre><span class='survived'> &#38;&#38; parent.getType() != TokenTypes.CTOR_DEF</span></pre></td></tr>"
"RequireThisCheck.java.html:<td class='covered'><pre><span class='survived'> &#38;&#38; lastChild.getType() == TokenTypes.OBJBLOCK;</span></pre></td></tr>"
"RequireThisCheck.java.html:<td class='covered'><pre><span class='survived'> if (definitionToken.getType() == TokenTypes.STATIC_INIT) {</span></pre></td></tr>"
Expand Down
Expand Up @@ -383,9 +383,7 @@ public void beginTree(DetailAST rootAST) {
while (curNode != null && toVisit == null) {
endCollectingDeclarations(frameStack, curNode);
toVisit = curNode.getNextSibling();
if (toVisit == null) {
curNode = curNode.getParent();
}
curNode = curNode.getParent();
}
curNode = toVisit;
}
Expand Down

0 comments on commit 072e6af

Please sign in to comment.