Skip to content

Commit

Permalink
Issue checkstyle#7804: Resolve Pitest Issues - CustomImportOrderCheck…
Browse files Browse the repository at this point in the history
… (3)
  • Loading branch information
DXTkastb committed Apr 3, 2020
1 parent 676dc23 commit 0d4e536
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
1 change: 0 additions & 1 deletion .ci/pitest.sh
Expand Up @@ -70,7 +70,6 @@ pitest-header)
pitest-imports)
mvn -e -P$1 clean test org.pitest:pitest-maven:mutationCoverage;
declare -a ignoredItems=(
"CustomImportOrderCheck.java.html:<td class='covered'><pre><span class='survived'> if (bestMatch.group.equals(NON_GROUP_RULE_GROUP)) {</span></pre></td></tr>"
"IllegalImportCheck.java.html:<td class='covered'><pre><span class='survived'> if (!result) {</span></pre></td></tr>"
"ImportControlLoader.java.html:<td class='covered'><pre><span class='survived'> else if (ALLOW_ELEMENT_NAME.equals(qName) || &#34;disallow&#34;.equals(qName)) {</span></pre></td></tr>"
"ImportOrderCheck.java.html:<td class='covered'><pre><span class='survived'> else if (matcher.start() == bestPos &#38;&#38; matcher.end() &#62; bestEnd) {</span></pre></td></tr>"
Expand Down
Expand Up @@ -768,16 +768,14 @@ else if (customImportOrderRules.contains(SAME_PACKAGE_RULE_GROUP)) {
bestMatch.matchLength = importPath.length();
}
}
if (bestMatch.group.equals(NON_GROUP_RULE_GROUP)) {
for (String group : customImportOrderRules) {
if (STANDARD_JAVA_PACKAGE_RULE_GROUP.equals(group)) {
bestMatch = findBetterPatternMatch(importPath,
STANDARD_JAVA_PACKAGE_RULE_GROUP, standardPackageRegExp, bestMatch);
}
if (SPECIAL_IMPORTS_RULE_GROUP.equals(group)) {
bestMatch = findBetterPatternMatch(importPath,
group, specialImportsRegExp, bestMatch);
}
for (String group : customImportOrderRules) {
if (STANDARD_JAVA_PACKAGE_RULE_GROUP.equals(group)) {
bestMatch = findBetterPatternMatch(importPath,
STANDARD_JAVA_PACKAGE_RULE_GROUP, standardPackageRegExp, bestMatch);
}
if (SPECIAL_IMPORTS_RULE_GROUP.equals(group)) {
bestMatch = findBetterPatternMatch(importPath,
group, specialImportsRegExp, bestMatch);
}
}
if (bestMatch.group.equals(NON_GROUP_RULE_GROUP)
Expand Down

0 comments on commit 0d4e536

Please sign in to comment.