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 #6345: RightCurly with option alone false negative for class, method and constructor #6505
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.
If @romani agrees issue is still valid, we will need new tests to show changes.
src/main/java/com/puppycrawl/tools/checkstyle/checks/blocks/RightCurlyCheck.java
Show resolved
Hide resolved
@fzdy1914 Please make all CI green and keep number of commits at 1. |
@rnveach Can you help look into the failing test? |
This comment has been minimized.
This comment has been minimized.
@fzdy1914
You will have to run Let me know if you need more help. |
Ready for review. |
src/main/java/com/puppycrawl/tools/checkstyle/checks/blocks/RightCurlyCheck.java
Outdated
Show resolved
Hide resolved
Ready to review. |
@romani please review and review #6505 (comment) . |
@romani Can kindly give your review for this PR? |
@fzdy1914 as PR is entering final stages, please provide us a regression report. See https://github.com/checkstyle/contribution/tree/master/checkstyle-tester#diffgroovy-diff-report-generation . If you have any questions feel free to ask us. |
I am ok with code changed. |
What does property mutation mean? Do you mean that I should write a config to test all possible combinations of tokens and mode to test if there is a regression? |
I wrote the following checks and get an error, can you help to examine my file.
The comment I use is |
Combinations of properties. It is ok if after the default check you specify all tokens.
You can remove this as it isn't needed. It was just an example.
There is no problem with your config since you don't specify this. It looks to be an issue with maven-site (or something on the maven side). |
@fzdy1914 Please check that you are using the latest master in contribution. Your output is saying maven-checkstyle-plugin 2.17 and we are using 3.0 . This is the cause of the failure. Also, as another recommendation, the more modules you put into a config the more memory you will have to give regression. To ensure you don't run into memory issues and have to restarted regression I usually give it 3 gigs of ram or split up the regression into 3 for each option. |
It is better to have only one Check in config for one report generation, it will be easier to verify it. You can run diff tool few times, have few reports. |
I reproduced the same problem with cacheFile, fix is merged to contribution repo, please pull from us code to avoid problem. |
This is the report generated: link. It seems ok from my observation. |
@fzdy1914 , there are CI failures in tests, please fix and relaunch regression |
Okay, seems my other PR causes some problem with this one. |
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 to merge, report is good.
please rebase to latest code, for some reason not all CIs are executed on you PR.
@rnveach , please do review one more time, as bunch of comments pass since your approval.
minor item to fix:
src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/DetectorOptions.java
Show resolved
Hide resolved
Changed as request |
Fixes #6345.
When I working with this pr, I found that this may be an intended behavior of checkstyle.
See here, it allows empty body.
If it is not the intended behavior, I will just delete the line that allows empty body.