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 accept constant visibility declaration as namespace #7144

Closed
AdrienSdy opened this issue Jun 16, 2019 · 2 comments
Closed

Comments

@AdrienSdy
Copy link
Contributor

AdrienSdy commented Jun 16, 2019

When declare the visibility of a constant (class and module include), the namespace object get an offense to document it.

module Namespace
  class Private
  end

  private_constant :Private
end

Expected behavior

Don't get an offense on the Namespace module. by considering constant visibility declaration as constant declaration.

Actual behavior

Get an offense on the Namespace module.

Steps to reproduce the problem

  • Create a file with the code above
  • Run Rubocop on it

RuboCop version

0.71.0 (using Parser 2.6.3.0, running on ruby 2.4.5 x86_64-darwin18)
AdrienSdy added a commit to AdrienSdy/rubocop that referenced this issue Jun 16, 2019
…tation cop

Extend the definition of namespaces by adding the constants visibility
statement.
No longer report an error for classes and modules that contain constants'
visibility statements.
AdrienSdy added a commit to AdrienSdy/rubocop that referenced this issue Jun 16, 2019
…tation cop

Extend the definition of namespaces by adding the constants visibility
statement.
No longer report an error for classes and modules that contain constants'
visibility statements.
AdrienSdy added a commit to AdrienSdy/rubocop that referenced this issue Jul 17, 2019
…tation cop

Extend the definition of namespaces by adding the constants visibility
statement.
No longer report an error for classes and modules that contain constants'
visibility statements.
AdrienSdy added a commit to AdrienSdy/rubocop that referenced this issue Aug 29, 2019
…tation cop

Extend the definition of namespaces by adding the constants visibility
statement.
No longer report an error for classes and modules that contain constants'
visibility statements.
@stale
Copy link

stale bot commented Sep 14, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution and understanding!

@stale stale bot added the stale Issues that haven't been active in a while label Sep 14, 2019
@AdrienSdy
Copy link
Contributor Author

AdrienSdy commented Oct 26, 2019

This issue is pending reviews on the pull request.

@stale stale bot removed the stale Issues that haven't been active in a while label Oct 26, 2019
ty-porter pushed a commit to ty-porter/rubocop that referenced this issue Mar 21, 2020
…tation cop (rubocop#7147)

Extend the definition of namespaces by adding the constants visibility
statement.
No longer report an error for classes and modules that contain constants'
visibility statements.

Co-authored-by: Bozhidar Batsov <bozhidar@batsov.com>
Neodelf pushed a commit to Neodelf/rubocop that referenced this issue Apr 28, 2020
…tation cop (rubocop#7147)

Extend the definition of namespaces by adding the constants visibility
statement.
No longer report an error for classes and modules that contain constants'
visibility statements.

Co-authored-by: Bozhidar Batsov <bozhidar@batsov.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant