Class: RuboCop::Runner
- Inherits:
-
Object
- Object
- RuboCop::Runner
- Defined in:
- lib/rubocop/runner.rb
Overview
This class handles the processing of files, which includes dealing with formatters and letting cops inspect the files.
Defined Under Namespace
Classes: InfiniteCorrectionLoop
Constant Summary collapse
- MAX_ITERATIONS =
200
Instance Attribute Summary collapse
-
#aborting ⇒ Object
(also: #aborting?)
readonly
Returns the value of attribute aborting.
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
-
#warnings ⇒ Object
readonly
Returns the value of attribute warnings.
Instance Method Summary collapse
- #abort ⇒ Object
-
#initialize(options, config_store) ⇒ Runner
constructor
A new instance of Runner.
- #run(paths) ⇒ Object
Constructor Details
#initialize(options, config_store) ⇒ Runner
Returns a new instance of Runner.
23 24 25 26 27 28 29 |
# File 'lib/rubocop/runner.rb', line 23 def initialize(, config_store) @options = @config_store = config_store @errors = [] @warnings = [] @aborting = false end |
Instance Attribute Details
#aborting ⇒ Object (readonly) Also known as: aborting?
Returns the value of attribute aborting.
20 21 22 |
# File 'lib/rubocop/runner.rb', line 20 def aborting @aborting end |
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
20 21 22 |
# File 'lib/rubocop/runner.rb', line 20 def errors @errors end |
#warnings ⇒ Object (readonly)
Returns the value of attribute warnings.
20 21 22 |
# File 'lib/rubocop/runner.rb', line 20 def warnings @warnings end |
Instance Method Details
#abort ⇒ Object
40 41 42 |
# File 'lib/rubocop/runner.rb', line 40 def abort @aborting = true end |
#run(paths) ⇒ Object
31 32 33 34 35 36 37 38 |
# File 'lib/rubocop/runner.rb', line 31 def run(paths) target_files = find_target_files(paths) if @options[:list_target_files] list_files(target_files) else inspect_files(target_files) end end |