Class: Glyphs::RuboCop::Plugin

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

Instance Method Summary collapse

Instance Method Details

#aboutObject



17
18
19
20
21
22
23
24
# File 'lib/glyphs/rubocop.rb', line 17

def about
  LintRoller::About.new(
    name: "glyphs",
    version: Glyphs::VERSION,
    homepage: "https://github.com/mhenrixon/glyphs",
    description: "Icon-name validation and legacy icon-helper autocorrection for Glyphs components."
  )
end

#rules(_context) ⇒ Object



30
31
32
33
34
35
36
# File 'lib/glyphs/rubocop.rb', line 30

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)


26
27
28
# File 'lib/glyphs/rubocop.rb', line 26

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