Skip to content

Commit

Permalink
Issue checkstyle#7920: Resolve Pitest Issues - RedundantImportCheck
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaurav-Punjabi committed Mar 25, 2020
1 parent f9131f9 commit 407e44b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
1 change: 0 additions & 1 deletion .ci/pitest.sh
Expand Up @@ -87,7 +87,6 @@ pitest-imports)
"PkgImportControl.java.html:<td class='covered'><pre><span class='survived'> if (regex || parent.regex) {</span></pre></td></tr>"
"PkgImportControl.java.html:<td class='covered'><pre><span class='survived'> if (regex) {</span></pre></td></tr>"
"PkgImportRule.java.html:<td class='covered'><pre><span class='survived'> if (isRegExp()) {</span></pre></td></tr>"
"RedundantImportCheck.java.html:<td class='covered'><pre><span class='survived'> else if (pkgName != null &#38;&#38; isFromPackage(imp.getText(), pkgName)) {</span></pre></td></tr>"
"UnusedImportsCheck.java.html:<td class='covered'><pre><span class='survived'> if (collect) {</span></pre></td></tr>"
);
checkPitestReport "${ignoredItems[@]}"
Expand Down
Expand Up @@ -150,7 +150,7 @@ private static boolean isFromPackage(String importName, String pkg) {
// So '.' must be present in member name and we are not checking for it
final int index = importName.lastIndexOf('.');
final String front = importName.substring(0, index);
return front.equals(pkg);
return pkg.equals(front);
}

}
@@ -0,0 +1,14 @@
package com.puppycrawl.tools.checkstyle.checks.javadoc.javadoctagcontinuationindentation;

public class InputJavadocTagContinuationIndentation1 {
/**
* Desc.
*
* @param s
* Desc. Line 8.
* Desc 2.
* Desc 3.
* Desc 4. Line 11.
*/
public void test(String s) {}
}

0 comments on commit 407e44b

Please sign in to comment.