Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make
Layout/LeadingCommentSpace
aware of #:nodoc
This PR makes `Layout/LeadingCommentSpace` aware of `#:nodoc`. The following mention is the trigger. https://twitter.com/kamipo/status/1421031611588485121 It seems that there was no definitive comment on whether to allow `#:nodoc:`. - #277 - db79146 I've look RDoc doc's example of Ruby 3.0 and it looks to include leading comment space. ```ruby module MyModule # :nodoc: class Input end end module OtherModule # :nodoc: all class Output end end ``` https://docs.ruby-lang.org/en/3.0.0/RDoc/Markup.html#class-RDoc::Markup-label-Controlling+what+is+documented I also considered making it an option for the presence or absence of leading comment space in `#:nodoc:`, but I think it would be better to consistent it that space is included when possible as the role of cop.
- Loading branch information
Showing
3 changed files
with
16 additions
and
7 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
changelog/change_make_layout_leading_comment_space_aware_of_nodoc.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* [#9964](https://github.com/rubocop/rubocop/pull/9964): Make `Layout/LeadingCommentSpace` aware of `#:nodoc`. ([@koic][]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters