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
Issue #12280: Resolve Pitest suppression for SingleSpaceSeparatorCheck #12283
Issue #12280: Resolve Pitest suppression for SingleSpaceSeparatorCheck #12283
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
item:
@@ -199,7 +198,7 @@ private void visitEachToken(DetailAST node) { | |||
currentNode = currentNode.getFirstChild(); | |||
} | |||
else { | |||
while (currentNode.getNextSibling() == null && currentNode.getParent() != parent) { | |||
while (currentNode.getNextSibling() == null && currentNode.getParent() != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will go up to a ROOT ast, we should not do this, as it will walk through all nodes in tree. It is too much.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, my bad, sorry this is being huge mistake of my. I have not noticed it's a loop
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@romani it is possible for any situation where the parent will get null rather then Root. I am not seen any condition for this as of know
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so I think if we write it as null it will still walk till root ast because final DetailAST parent = node.getParent();
the parent here will always null BCS node here is root node bcs node is coming for private void visitEachToken(DetailAST node) {
and here node is pointing to root
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recommed to apply mutation as pitest suggest and run diff report on it (do not forget to disable all CI to speedup execution)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Kevin222004 ,
try to remove currentNode.getParent() != null
completely.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just remove it and run diff report generation on your local or by GitHub action.
It is easy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok so as a minor update if i remove this currentNode.getParent() != null
completely according to #12283 (comment) so unit test cases are failing in this situation so regression would not be generated there.
please gave a look at this as well #12283 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@romani ping
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this this while condition as as.
and apply mutation to final DetailAST parent = node.getParent();
to make it final DetailAST parent = node;
and see what is missed.
sounds like we can remove final DetailAST parent = node.getParent();
completely and make while condition as
currentNode.getParent() != node
as of know the whole approach is may wrong |
I am generating a diff report to just analyize |
Github, generate report |
1 similar comment
Github, generate report |
Report generation job failed on phase "make_report", step "Generate report". |
Github, generate report |
@Kevin222004 ping |
sorry for no activity on this pr from, long after #12283 (comment) |
Let us know when you think you may return. |
for this pr and all the issue related to Pitest I will comeback around December starting |
I am taking over resolving this mutation, so I am closing this PR for my own. |
Issue #12280: Resolve Pitest suppression for SingleSpaceSeparatorCheck
Diff Regression config: https://gist.githubusercontent.com/Kevin222004/55bba7110290f08feb12e3c4f36976e4/raw/a3bd29dd8d9035b48d5bbfba68042e33e4b82526/CONFIG.xml