Class: RuboCop::Shopify::Plugin

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

Instance Method Summary collapse

Instance Method Details

#aboutObject



8
9
10
11
12
13
14
15
# File 'lib/rubocop/shopify/plugin.rb', line 8

def about
  LintRoller::About.new(
    name: "rubocop-shopify",
    version: RuboCop::Shopify::VERSION,
    homepage: "https://github.com/Shopify/rubocop-shopify",
    description: "A plugin for RuboCop to enforce Shopify-specific coding standards."
  )
end

#rules(context) ⇒ Object



21
22
23
24
25
26
27
# File 'lib/rubocop/shopify/plugin.rb', line 21

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

#supported?(context) ⇒ Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/rubocop/shopify/plugin.rb', line 17

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