You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
…Method`
Fixesrubocop#11504.
This PR makes to allow `initialize` method in `Style/DocumentationMethod`
because `initialize` is a special method called from `new`.
In some languages they are called constructor to distinguish it from method.
So it would be different from the following intent that this cop wants to detect.
> Checks for missing documentation comment for public methods.
> It can optionally be configured to also require documentation for
> non-public methods.
Fixes#11504.
This PR makes to allow `initialize` method in `Style/DocumentationMethod`
because `initialize` is a special method called from `new`.
In some languages they are called constructor to distinguish it from method.
So it would be different from the following intent that this cop wants to detect.
> Checks for missing documentation comment for public methods.
> It can optionally be configured to also require documentation for
> non-public methods.
Is your feature request related to a problem? Please describe.
The Style/DocumentationMethod checks for all the public methods including
initialize
.The constructor doesn't have to have a documentation comment.
Describe the solution you'd like
Add an option for the cop to exclude method names. E.g.
Describe alternatives you've considered
An alternative is to disable the cop by the
rubocop:disable
comment around wanted methods.The text was updated successfully, but these errors were encountered: