Class: Rubysmith::Extensions::Rubocop

Inherits:
Object
  • Object
show all
Defined in:
lib/rubysmith/extensions/rubocop.rb

Overview

Ensures project skeleton adheres to style guide.

Instance Method Summary collapse

Constructor Details

#initialize(client: ::RuboCop::CLI.new) ⇒ Rubocop

Returns a new instance of Rubocop.



16
17
18
19
# File 'lib/rubysmith/extensions/rubocop.rb', line 16

def initialize(client: ::RuboCop::CLI.new, **)
  @client = client
  super(**)
end

Instance Method Details

#callObject



21
22
23
24
25
# File 'lib/rubysmith/extensions/rubocop.rb', line 21

def call
  logger.info { "Running RuboCop autocorrect..." }
  autocorrect
  true
end