RuboCop::SocketrySourceRuboCopSocketryPlugin

class Plugin

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

Definitions

def initialize(...)

Initialize the plugin with version information.

Implementation

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

def about

Get information about this plugin for the LintRoller system.

Signature

returns LintRoller::About

Plugin metadata including name, version, and description.

Implementation

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

def rules(context)

Define the rules configuration for this plugin.

Signature

parameter context Object

The LintRoller context object.

returns LintRoller::Rules

Rules configuration specifying the path to the default RuboCop config.

Implementation

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