-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Issue #17393: new check TypeBodyPadding #17781
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
base: master
Are you sure you want to change the base?
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.
Please follow CI validations, all should be green.
We would need PR to contribution repository to add new check in regression testing.
You can look at other New module PRs to see how to do this.
Example: #16946
src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/TypeBodyPaddingCheck.java
Outdated
Show resolved
Hide resolved
399a396 to
8c0a608
Compare
f796864 to
f4cd38f
Compare
There is one remaining failure. Is that depending on the contribution PR being merged?
|
f4cd38f to
719dde9
Compare
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.
Items
src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/TypeBodyPaddingCheck.java
Outdated
Show resolved
Hide resolved
719dde9 to
2772cdb
Compare
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.
Please start diff testing in real projects..
Items
src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/TypeBodyPaddingCheck.java
Outdated
Show resolved
Hide resolved
2772cdb to
098ccbe
Compare
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.
items:
| </head> | ||
| <body> | ||
| <section name="TypeBodyPadding"> | ||
| <p>Since Checkstyle 11.1</p> |
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.
11.1.0
we have 3 digits in versions
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.
Please do 11.2.0
11.1.0 will be done on Sunday, in 2 days, I don't think you will be ready
src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/TypeBodyPaddingCheck.java
Outdated
Show resolved
Hide resolved
|
GitHub, generate website |
|
please start testing on real code, please pay attentiont to |
|
Please add To all examples. We try to keep java code the same, to let users see how comments with violations are changing |
098ccbe to
484f2fb
Compare
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.
Please follow CI violations and fix them. Let me know if you need help.
Run mvn clean verify before pushing, it helps to catch most
One more quick look:
|
|
||
| // xdoc section -- start | ||
| public class Example5 { // violation 'A blank line is required after the opening' | ||
| } |
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 looks weird, crazy class by design.
It looks weird that this property is to cover this crazy code.
What you trying to cover are cases like:
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface MyMarkerAnnotation {}
https://www.baeldung.com/java-custom-annotation#1-class-level-annotation-example
Please add inner annotation declaration to all examples.
Example5 should be same by code (not a comments) as all others.
|
Please add to test Inputs cases with interface, record, enum. We need diversity. Please add to also case when class is declared in method body, just to see how Chevk will behave on such potential code. |
Issue #17393
Contribution PR: checkstyle/contribution#970