-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Issue #15769: fix false-positive indentation violations for block codes #16515
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
Conversation
Github, generate report for Indentation/all-examples-in-one |
Failed to download or process the specified configuration(s).
|
ffcf264
to
fbfa4b1
Compare
Github, generate report for Indentation/all-examples-in-one |
Report for Indentation/all-examples-in-one: |
@Zopsss , please do first review |
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:
src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/BlockParentHandler.java
Show resolved
Hide resolved
src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/BlockParentHandler.java
Show resolved
Hide resolved
.../puppycrawl/tools/checkstyle/checks/indentation/indentation/InputIndentationCodeBlocks1.java
Show resolved
Hide resolved
Github, generate report |
first, we need to check regression on the project suggested here #14294 (comment) report is ready #16515 (comment) |
@Zopsss in the regression config, we need to specify the google_style config as this issue is related to google-style right? |
Yes, find diff between current master branch's google_checks.xml config and your modified google_checks.xml config. Check the generated report, if false positives/negatives are introduced then report them here and try to fix them |
Github, generate report |
@Zopsss report generation exceeded 6 hours limit and got cancelled twice https://github.com/checkstyle/checkstyle/actions/runs/13871818479 ?? |
Sorry, even I'm seeing this error for the first time. @romani can you check what's the issue here? |
Github, generate report |
Please do not run on whole Google style config, just use intendtation module from it, nothing else. |
Github, generate report |
Report generation failed on phase "make_report", |
Github, generate report |
Report generation failed on phase "make_report", |
Error : Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.12.1:site (default-site) on project sample: Error generating maven-checkstyle-plugin:3.1.1:checkstyle report: Failed during checkstyle configuration: Exception was thrown while processing /home/runner/work/checkstyle/checkstyle/.ci-temp/contribution/checkstyle-tester/src/main/java/openjdk21/src/jdk.jlink/share/classes/module-info.java: IllegalStateException occurred while parsing file /home/runner/work/checkstyle/checkstyle/.ci-temp/contribution/checkstyle-tester/src/main/java/openjdk21/src/jdk.jlink/share/classes/module-info.java. 54:0: no viable alternative at input 'module': NoViableAltException -> [Help 1] |
please use https://github.com/checkstyle/contribution/blob/master/checkstyle-tester/my_check.xml but module should one one , attention to |
@romani like this ? |
Yes |
Github, generate report |
diff is huge, please start copy all code from diff report to Input to have all distinct cases that we missed in Inputs. |
report is weird. there are diffs in switch and case blocks. this report is based on google config and not every project uses it. so obviously there will be diffs. |
we have already checked the regression using default indentation config #16515 (comment) |
Please go through their diff and add missing examples to our inputs. We can ignore other projects. Also if you're going to generate more regression reports then only include projects which uses google-style, other projects will not help us to find edge cases. |
Github, generate report |
Github, generate report |
@Zopsss in camunda project, violations on switch expression are fixed in #16418. these diffs got removed that PR's regression report #16418 (comment) |
fbfa4b1
to
78e1fb8
Compare
Github, generate report |
like I said , there is no violation change in Hbase project, do I still need to add examples from it to our input ?? |
Sorry I'm not able to understand why diff got removed. Were the violations in diff was false positives? And your PR fixed them?
Can you point out the PR where the violation message was changed? |
Did we fixed some bug that's why the violation message was changed? Or is it something else? If the diff doesn't have any false-postivie/negative and if you don't find an example which is not in our input files then you don't need to add any new example. We'll be good to go |
78e1fb8
to
d66657d
Compare
diffes in the Hbase project is mainly due to the way they are formatting
this is how we expect it to be:
|
@Zopsss , please finish review |
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.
Sorry for the late review, LGTM! Thanks a lot for all the hard work!!!
@romani please merge the PR |
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.
Good step forward!!!
fixes #15769
Diff Regression config: https://gist.githubusercontent.com/mohitsatr/d55485b980e5c7ae9c883ba8f79dcbd6/raw/c824102d90368dbd060f41a1f6bda249cdcf0a5b/master_google_style.xml
Diff Regression patch config: https://gist.githubusercontent.com/mohitsatr/60d8725143067033c0ee8c8b8c6902c0/raw/e585f76bf1fe45a3eab04329b4f3ae01766aa394/google_checks_codeblock.xml
Diff Regression projects: https://gist.githubusercontent.com/mohitsatr/68b0817ac52ff7773d35585ee12fc1cc/raw/f9c7774ca78df1f48f34bf30799bd3952abd9e2a/list-of-projects.properties