rubocop / rubocop-rails

A RuboCop extension focused on enforcing Rails best practices and coding conventions.
https://docs.rubocop.org/rubocop-rails
MIT License
821 stars 263 forks source link

Make `Lint/UselessAccessModifier` aware of `ActiveSupport::Concern` #1385

Open Earlopain opened 2 weeks ago

Earlopain commented 2 weeks ago

Ref https://github.com/rubocop/rubocop/issues/7298

Allow code like this by default:


module Foo
  extend ActiveSupport::Concern

  private

  def private_instance_bar
  end

  class_methods do
    private

    def private_class_bar
    end
  end
end

Before submitting the PR make sure the following are checked: