New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resolve Pitest Issues - CustomImportOrderCheck (3) #7804
Comments
I'm on it. |
@rnveach I am generating pitest regression report for this check on different configurations but I receive this error: |
Please ensure you have the following lines in your config. They are required for regression. |
Surviving Mutation: Hardcoded Branch: Pitest regression report: https://dxtkastb.github.io/importordernewdiff/index.html Code analysis: checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/CustomImportOrderCheck.java Lines 757 to 789 in f9131f9
The method(Line:757 getImportGroup(boolean isStatic, String importPath) ) assigns an import to an appropriate group. @rnveach Please review. |
Pitest report, mutated branch, and regression look good.
Please point to this code that this statement comes from. So absolutely under no other circumstance will some other rule override those 2 in this scenario? Please provide that proof too. Is there some other way to rewrite the code to kill the mutation besides removing the if condition? It seems like wasted effort to run Line 783 has a |
If the conditions for Static/Same_package hold (in getImportGroup(...) method) , then also the import wouldn't change group because
in
I tried this too but the some tests failed so I did not dig deep into this scenario. One more thing,when I changed the Pitest comes with another mutation surviving:
So I think it is better to just remove the if condition. If everything sounds fine should I start a PR? |
@rnveach could you please review. If there's a problem, let me know. If everthing seems fine should I start a PR? |
@rnveach ping |
Fix was merged |
Child issue of #7797 ,
checkstyle/.ci/pitest.sh
Line 79 in abf829f
The text was updated successfully, but these errors were encountered: