Open romani opened 1 year ago
@Vyom-Yadav , @Kevin222004 , @rdiachenko , @nrmancuso , please share your opinion on this issue.
Agree 100%, I think overuse of comments diminishes the concision of examples and inputs.
Agreed, let's only permit // violation and // ok, because of ........
I also agree to remove // ok.
user should see is comment as red flag of attention. All other lines are without attention, as no violation on them, on all of them.
+1
@stoyanK7 , please share your position on this
I also agree with removing // ok
@rnveach , please share your thoughts
@sheetalj2205, we are ready to start removal. Referenced PR is merged.
@sheetalj2205, we are ready to start removal. Referenced PR is merged.
Okay, I am on it.
Hello @romani I just want to check before moving forward whether I understood it correctly or not, as we can see in these files InputDefaultComesLastDefaultMethodsInInterface.java and illegaltype/InputIllegalTypeEmptyStringMemberModifiers.java there are multiple //ok comments, we need to remove that and put it only at one place that is after class or interface name and I am supposed to do that for all the files of com.puppycrawl.tools.checkstyle.checks.coding package.
We need to remove all //ok
comments and keep only comments that some text after it like //ok bla bla bla
We need to remove all
//ok
comments and keep only comments that some text after it like//ok bla bla bla
can you please assign this to me
@sheetalj2205 we do not assign issues except to maintainers, just make a comment like “I am on XXXCheck” and send a PR.
@sheetalj2205, just make comment "I am xxxxxCheck tests" and send PR for single Check only. After we merge first PR you can send PRs for more, by group. We do not allow huge PRs that change all, such PRs usually never come to merge state.
I am on MethodParamPadCheck
I am on covariantequals
I am on defaultcomeslast
Please can you assign this issue.
No assignments, just make a comment what check/module you are going to work and keep sending PRs. Thanks a lot for helping.
Okay
I would like to work on this issue!
Just start sending PRs.
I'm on InputNoEnumTrailingComma
I am on missing switchdefault
Iam on unusedlocalvariable
I am on operatorwrap
I am on InputNoFinalizerFallThroughJava
I am on InputOuterTypeFilename2
I am on separatorwrap
I'm on InputEmptyCatchBlockViolationsByComment
im on InputOuterTypeFilename2.java without cr from Ishantgarg-web
Hey! I am on equalsavoidnull.
I am on InputOuterTypeFilename.
I am on 'illegaltype'
Hii.. I want to solve this issue please assign me
No assignments, just make a comment what Test you updating and send PR.
Remove '//ok' comments from the input files
I am working on requirethis.
I am on SuppressWarningsCheck
Remove '//ok' comments from the input files
removed '// ok' comments from input files #14325 https://github.com/checkstyle/checkstyle/pull/14325/files
Removing //ok from abbreviationaswordinname under naming directory
hi @romani @nrmancuso I want to write the code that user will not able to write only\ok comment this helps us to next time we not get new ok comment my aproach for this is create java file name as CustomOkcomment check that extends AbstarctCheck ,this code for user to avoid using simple //ok comments and they need to provide more context or remove if unnecessary. and the custom check to checksyle.xml, create a new module
I want to write the code that user will not able to write only\ok comment this helps us to next time we not get new ok comment
We already have this validation, in this issue we just resolving old problems, that is why removal of suppression lines is required in each update
Hey! Just wanted to notify you that I'm working on InputUnnecessaryParenthesesIfStatement2 to remove all ok comments.
@romani sir , as you mentioned in above issue , we have to remove this
@romani sir , as you mentioned in above issue , we have to remove this from each individual files ?
@555vedant Pick a module, comment "I am on xxx" and remove all related suppressions. It is recommended to limit your PR to single module
Hi I'm on InputRequireThisTryWithResources
I am on InputRequireThisTryWithResourcesOnlyOverlappingFalse
After hundreds of example PR reviews, I , and not only I found that comment
ok
is just a noise that makes it hard to read. This example is small, so you will not fill pain, but, there are more complicated examples and it is not good. I agree to put comment to explain some not obvious reason, but it will be exception.For now I treat all
//ok
comments as stuff to remove, there might be cases to keep them as form of:// ok, here is not obvious reason
// ok, here is pointing to Check limitation
In short - when it is not obvious.all suppression
<suppress id="UnnecessaryOkComment"
for at https://github.com/checkstyle/checkstyle/blob/master/config/checkstyle-input-suppressions.xml should be removed and referenced files updated to not have "// ok" commentsWe do need this removals in test inputs. Same is for Example files, it just makes example full of content that is hard to distinguish without code coloring.
user should see is comment as red flag of attention. All other lines are without attention, as no violation on them, on all of them.
We use to have such comments only at times when we had no enforcing and it was very manual markers , but it lost its role after we finished Input based tests
Such
ok
comment become to appear in completely unrelated places, by copy paste, and keep it at right place is not possible( or hard and outside of this project). Better without it . Location of violation comment is enforced by runtime - never outdated.Please choose name of module from file: https://github.com/checkstyle/checkstyle/blob/b6301c189ef5d2d731a755fa9a2e84aa0677494a/config/checkstyle-input-suppressions.xml#L68-L70 where name of module is
equalsavoidnull
and send PR for all files that belong to it in single PR.final goal is to remove all suppressions of "UnnecessaryOkComment".
Example of update: https://github.com/checkstyle/checkstyle/pull/13609/files attention on removal of suppression See more examples below for "Merged" Pull Requests.
One more example of expected update: https://github.com/checkstyle/checkstyle/commit/f7927735cc28b62d7b40e46a944c7d495a531f68