You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "adoroszlai (via GitHub)" <gi...@apache.org> on 2024/11/12 09:43:48 UTC

[PR] HDDS-11684. Remove suppression of HiddenField [ozone]

adoroszlai opened a new pull request, #7423:
URL: https://github.com/apache/ozone/pull/7423

   ## What changes were proposed in this pull request?
   
   Remove suppression of `HiddenField` checkstyle rule, currently only used for `Builder` classes.
   
   Checkstyle is already configured to ignore `HiddenField` for "setter" methods.  However,
   
   > [a] method is recognized as a setter if it is in the following form
   > `${returnType} set${Name}(${anyType} ${name})`
   > where ... `${name}` is name of the variable that is being set and `${Name}` its capitalized form that appears in the method name.
   > https://checkstyle.org/checks/coding/hiddenfield.html
   
   So we need to make sure to follow naming conventions:
   
   - parameter name must match method name
   - method name must be `set...`, not `with...`
   
   (We could also avoid the violation by renaming parameters to something like `newValue`.)
   
   In some classes suppression was completely unnecessary.
   
   https://issues.apache.org/jira/browse/HDDS-11684
   
   ## How was this patch tested?
   
   CI:
   https://github.com/adoroszlai/ozone/actions/runs/11793288532


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-11684. Remove suppression of HiddenField [ozone]

Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai merged PR #7423:
URL: https://github.com/apache/ozone/pull/7423


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-11684. Remove suppression of HiddenField [ozone]

Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on PR #7423:
URL: https://github.com/apache/ozone/pull/7423#issuecomment-2473020929

   Thanks @devmadhuu for the review.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org