123456789_123456789_123456789_123456789_123456789_

Class: RuboCop::InternalAffairs::Plugin

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, LintRoller::Plugin
Instance Chain:
self, LintRoller::Plugin
Inherits: LintRoller::Plugin
  • Object
Defined in: lib/rubocop/cop/internal_affairs/plugin.rb

Overview

A Plugin for ::RuboCop::InternalAffairs department, which has internal cops.

Instance Method Summary

Instance Method Details

#about

[ GitHub ]

  
# File 'lib/rubocop/cop/internal_affairs/plugin.rb', line 9

def about
  LintRoller::About.new(
    name: 'rubocop-internal_affairs',
    version: Version::STRING,
    homepage: 'https://github.com/rubocop/rubocop/tree/master/lib/rubocop/cop/internal_affairs',
    description: 'A collection of RuboCop cops to check for internal affairs.'
  )
end

#rules(_context)

[ GitHub ]

  
# File 'lib/rubocop/cop/internal_affairs/plugin.rb', line 22

def rules(_context)
  require_relative '../internal_affairs'

  LintRoller::Rules.new(
    type: :path,
    config_format: :rubocop,
    value: Pathname.new(__dir__).join('../../../../config/internal_affairs.yml')
  )
end

#supported?(context) ⇒ Boolean

[ GitHub ]

  
# File 'lib/rubocop/cop/internal_affairs/plugin.rb', line 18

def supported?(context)
  context.engine == :rubocop
end