Commit 65cc169 1 parent 82bf52e commit 65cc169 Copy full SHA for 65cc169
File tree 1 file changed +13
-8
lines changed
1 file changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -25,14 +25,7 @@ def run(args = ARGV)
25
25
act_on_options
26
26
apply_default_formatter
27
27
28
- runner = Runner . new ( @options , @config_store )
29
- trap_interrupt ( runner )
30
- all_passed = runner . run ( paths )
31
- display_warning_summary ( runner . warnings )
32
- display_error_summary ( runner . errors )
33
- maybe_print_corrected_source
34
-
35
- all_passed && !runner . aborting? && runner . errors . empty? ? 0 : 1
28
+ execute_runner ( paths )
36
29
rescue RuboCop ::Error => e
37
30
$stderr. puts Rainbow ( "Error: #{ e . message } " ) . red
38
31
return 2
@@ -72,6 +65,18 @@ def act_on_options
72
65
end
73
66
end
74
67
68
+ def execute_runner ( paths )
69
+ runner = Runner . new ( @options , @config_store )
70
+
71
+ trap_interrupt ( runner )
72
+ all_passed = runner . run ( paths )
73
+ display_warning_summary ( runner . warnings )
74
+ display_error_summary ( runner . errors )
75
+ maybe_print_corrected_source
76
+
77
+ all_passed && !runner . aborting? && runner . errors . empty? ? 0 : 1
78
+ end
79
+
75
80
def handle_exiting_options
76
81
return unless Options ::EXITING_OPTIONS . any? { |o | @options . key? o }
77
82
You can’t perform that action at this time.
0 commit comments