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

Style/Documentation with only macros #8788

Closed
marcandre opened this issue Sep 24, 2020 · 1 comment · Fixed by #8812 or #11294
Closed

Style/Documentation with only macros #8788

marcandre opened this issue Sep 24, 2020 · 1 comment · Fixed by #8812 or #11294

Comments

@marcandre
Copy link
Contributor

marcandre commented Sep 24, 2020

I'd like Style/Documentation to accept the following:

module RuboCop
  module AST
    # Responsible for compatibility with main gem
    # @api private
    module RuboCopCompatibility
      # ...
    end

    extend RuboCopCompatibility  # => This triggers Style/Documentation: Missing top-level module documentation comment
  end
end

I think that (at least) macro calls like extend should not trigger it.

@carlos-ssh
Copy link

Great job guys!!!

tejasbubane added a commit to tejasbubane/rubocop that referenced this issue Nov 16, 2020
koic added a commit that referenced this issue Nov 16, 2020
[Fix #8788] Change `Style/Documentation` to not trigger offense with only macros
koic added a commit to koic/rubocop that referenced this issue Dec 16, 2022
Fixes rubocop#11293.

This PR fixes a false negative for `Style/Documentation`
when using custom macro.

The built-in macros (e.g. `include`, `extend`, `prepend`) and
DSL like `belongs_to` should be treated differently.
Only `include`, `extend`, and `prepend` will be needed to resolve rubocop#8788.
bbatsov pushed a commit that referenced this issue Dec 20, 2022
Fixes #11293.

This PR fixes a false negative for `Style/Documentation`
when using custom macro.

The built-in macros (e.g. `include`, `extend`, `prepend`) and
DSL like `belongs_to` should be treated differently.
Only `include`, `extend`, and `prepend` will be needed to resolve #8788.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants