Issue #13491: Simplify setterHaveSinceTag - #18989
Conversation
|
@romani Is a custom check necessary for this according to you? |
0d9cc49 to
e1c8b1e
Compare
|
@romani Done, Added a new internal check that removes the need for |
|
Working on CI. |
e1c8b1e to
ca23358
Compare
romani
left a comment
There was a problem hiding this comment.
we cannot expose this Check to public, it does not make any sense out of Checkstyle code base.
cd003a3 to
ff08b6e
Compare
|
until CI is green , humas do no review |
I was trying to figure out how internal checks are written. |
|
Please read and watch videos at Starting_Development. |
eb89317 to
574be46
Compare
|
done |
574be46 to
b4f1ef1
Compare
|
Any changes?? |
|
@romani Please review |
b4f1ef1 to
b2b72f7
Compare
|
@romani CI Failures seem to fail because of other reasons. |
b2b72f7 to
e0ced99
Compare
|
please make extra commit with mistake in code to show that it actually violates code if someone forget to do this. |
e0ced99 to
135f368
Compare
|
@romani Should i revert back the change if the results are satisfactory? |
135f368 to
82bb60c
Compare
|
@romani ping |
|
@romani ping.. |
|
@romani good to merge. |
|
@romani Pending from long time. Good to merge |
romani
left a comment
There was a problem hiding this comment.
tested, works:
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/UnnecessarySemicolonInTryWithResourcesCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/UnnecessarySemicolonInTryWithResourcesCheck.java
index 0bb7c5f997..4edf236861 100644
--- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/UnnecessarySemicolonInTryWithResourcesCheck.java
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/UnnecessarySemicolonInTryWithResourcesCheck.java
@@ -72,7 +72,6 @@ public final class UnnecessarySemicolonInTryWithResourcesCheck extends AbstractC
* Setter to allow unnecessary semicolon if closing parenthesis is not on the same line.
*
* @param allowWhenNoBraceAfterSemicolon a value to set.
- * @since 8.22
*/
public void setAllowWhenNoBraceAfterSemicolon(boolean allowWhenNoBraceAfterSemicolon) {
this.allowWhenNoBraceAfterSemicolon = allowWhenNoBraceAfterSemicolon;
runs
Setter 'setAllowWhenNoBraceAfterSemicolon' in 'UnnecessarySemicolonInTryWithResourcesCheck' must have a @since tag
expected to be true
at com.puppycrawl.tools.checkstyle.internal.AllChecksTest.testAllChecksOrFiltersSettersHaveSinceTag(AllChecksTest.java:635)

Issue: #13491
Simplified setterHaveSinceTag by seperating the method check and class check.
Added new internal check SetterSinceTagCheck.
contribution: checkstyle/contribution#1036