Issue #13321: Kill mutation for UncommentedMainCheck-3#13365
Merged
rdiachenko merged 1 commit intocheckstyle:masterfrom Jul 10, 2023
Merged
Issue #13321: Kill mutation for UncommentedMainCheck-3#13365rdiachenko merged 1 commit intocheckstyle:masterfrom
rdiachenko merged 1 commit intocheckstyle:masterfrom
Conversation
Contributor
Author
|
Github, generate report |
41 tasks
Contributor
Contributor
Author
|
Github, generate report |
Contributor
Member
New file can have only interface or record. Are you sure in your explanation? |
romani
approved these changes
Jul 7, 2023
Member
romani
left a comment
There was a problem hiding this comment.
After reading a code, I agree on this update
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #13321: Kill mutation for UncommentedMainCheck-3
Check
https://checkstyle.org/checks/misc/uncommentedmain.html
Mutation
checkstyle/config/pitest-suppressions/pitest-misc-suppressions.xml
Lines 201 to 208 in 2be5780
Explaination
In visitToken when Token is classDEF or RecordDef it call visitClassOrRecordDef where if classDepth == 0 then only currentClass will update know every time when new file come sequentially they alwyas have a class and that time the classDepth is always 0. and classdepth is reset to 0 in begintree.
Regression
Diff Regression config: https://gist.githubusercontent.com/Kevin222004/92e6545d9dda7c3febcd4ad8f8a91443/raw/5b88dc50b3b7828cca1bce0d4d6aa47209d25647/UMC.xml
Diff Regression projects: https://gist.githubusercontent.com/Kevin222004/9600f179b602d4c971bdb0a050099005/raw/360a95ed7bb60d7a0956e531199d484c4d6f6617/test-projects.properties
Report label: Regression-2