Class: Aptible::Tasks::Rubocop
- Inherits:
-
Object
- Object
- Aptible::Tasks::Rubocop
- Defined in:
- lib/aptible/tasks/rubocop.rb
Instance Method Summary collapse
Instance Method Details
#config ⇒ Object
10 11 12 |
# File 'lib/aptible/tasks/rubocop.rb', line 10 def config ::Rubocop::ConfigLoader.load_file(config_file) end |
#config_file ⇒ Object
6 7 8 |
# File 'lib/aptible/tasks/rubocop.rb', line 6 def config_file File.join(File.dirname(__FILE__), '..', '..', '..', '.rubocop.yml') end |
#run ⇒ Object
14 15 16 17 18 |
# File 'lib/aptible/tasks/rubocop.rb', line 14 def run cli = ::Rubocop::CLI.new result = cli.run(%W( -c #{config_file} )) abort unless result == 0 end |