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
DetailASTTest: 'checkTree' failing on deep AST tree #3961
Comments
I have reviewed some codes in DetailASTTest when handling #3700. I think I am able to rewrite the test 😄 |
Approved |
@Luolc Since your PR fixed the file with the original test, it is probably best to start off with another file that will fail and then provide fix to show it isn't an issue anymore. |
@rnveach That makes sense. So the steps tend to be:
|
Yes to all except step 3. The file needs to stay to prove we don't revert back and break the test again. |
@rnveach Got it. Just not sure where to put the input file. I am doing with step one now and the input file is put at https://github.com/checkstyle/checkstyle/tree/master/src/test/resources/com/puppycrawl/tools/checkstyle/checks (where the |
@Luolc Since its an input file to the test, it should be in the same package as the test. |
fix is merged. |
Taken from #3894 (comment) and seen at https://travis-ci.org/checkstyle/checkstyle/jobs/208912195#L254 ,
We should find a way to re-write this test, if possible, so it doesn't use the stack for each child.
When we run this on a deeply nested tree, we get a stackoverflow.
We should be able to walk through the tree like we do in other areas, see
checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/TreeWalker.java
Lines 495 to 508 in b4a337a
Any file skips in this test should be removed as proof the fix works.
The text was updated successfully, but these errors were encountered: