Class: RuboCop::Socketry::Plugin

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

Overview

Represents a LintRoller plugin that provides RuboCop rules for Socketry projects. This plugin integrates custom RuboCop cops and configuration into the LintRoller system.

Instance Method Summary collapse

Constructor Details

#initializePlugin

Initialize the plugin with version information.



15
16
17
18
# File 'lib/rubocop/socketry/plugin.rb', line 15

def initialize(...)
	super
	@version = RuboCop::Socketry::VERSION
end

Instance Method Details

#aboutObject

Get information about this plugin for the LintRoller system.



22
23
24
25
26
27
28
29
# File 'lib/rubocop/socketry/plugin.rb', line 22

def about
	LintRoller::About.new(
		name: "rubocop-socketry",
		version: @version,
		homepage: "https://github.com/socketry/rubocop-socketry",
		description: "RuboCop rules for Socketry projects."
	)
end

#rules(context) ⇒ Object

Define the rules configuration for this plugin.



34
35
36
37
38
39
40
# File 'lib/rubocop/socketry/plugin.rb', line 34

def rules(context)
	LintRoller::Rules.new(
		type: :path,
		config_format: :rubocop,
		value: File.expand_path("config.yaml", __dir__),
	)
end