Class: Kaizo::Plugin

Inherits:
LintRoller::Plugin
  • Object
show all
Defined in:
lib/kaizo/plugin.rb

Overview

A plugin that integrates kaizo with RuboCop's plugin system.

Instance Method Summary collapse

Instance Method Details

#aboutObject



6
7
8
9
10
11
12
13
# File 'lib/kaizo/plugin.rb', line 6

def about
  LintRoller::About.new(
    name: "kaizo",
    version: VERSION,
    homepage: "https://github.com/flipmine/kaizo",
    description: "A strict, punishing set of design cops for AI-agent-authored Ruby.",
  )
end

#rules(_context) ⇒ Object



19
20
21
22
23
24
25
# File 'lib/kaizo/plugin.rb', line 19

def rules(_context)
  LintRoller::Rules.new(
    type: :path,
    config_format: :rubocop,
    value: Pathname.new(__dir__).join("../../config/default.yml"),
  )
end

#supported?(context) ⇒ Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/kaizo/plugin.rb', line 15

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