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

Fix a false positive for Lint/UselessAccessModifier when using same access modifier inside and outside the included block #11638

Merged
merged 1 commit into from
Mar 6, 2023

Commits on Mar 6, 2023

  1. Fix a false positive for Lint/UselessAccessModifier when using same…

    … access modifier inside and outside the `included` block
    
    This PR is fix a false positive for `Lint/UselessAccessModifier` when using same access modifier inside and outside the `included` block.
    
    If an included block is used within a class, as shown below, I think it should not be a violation even if the same access modifier is used inside and outside the included block.
    
    ```ruby
    class SomeClass
      included do
        private
        def foo; end
      end
      private
      def bar; end
    end
    ```
    ydah committed Mar 6, 2023
    Configuration menu
    Copy the full SHA
    0d3c056 View commit details
    Browse the repository at this point in the history