Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Layout/LeadingCommentSpace aware of #:nodoc #9964

Commits on Jul 30, 2021

  1. 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:`.
    
    - rubocop#277
    - rubocop@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.
    koic committed Jul 30, 2021
    Copy the full SHA
    66668f1 View commit details
    Browse the repository at this point in the history