File tree Expand file tree Collapse file tree 3 files changed +5
-10
lines changed Expand file tree Collapse file tree 3 files changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -26,8 +26,6 @@ def initialize(options)
26
26
#
27
27
# @return [Skunk::Command::StatusReporter]
28
28
def execute
29
- RubyCritic ::Config . formats = [ :json ]
30
-
31
29
report ( critique )
32
30
33
31
status_reporter
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ def non_test_modules
37
37
def calculate_average
38
38
return 0 if @analysed_modules_count . zero?
39
39
40
- ( @skunk_score_total . to_f / @analysed_modules_count ) . round ( 2 )
40
+ ( @skunk_score_total . to_d / @analysed_modules_count ) . round ( 2 )
41
41
end
42
42
43
43
def find_worst_module
Original file line number Diff line number Diff line change @@ -13,13 +13,10 @@ def self.generate_report(analysed_modules)
13
13
end
14
14
15
15
def self . report_generator_class ( config_format )
16
- if REPORT_GENERATOR_CLASS_FORMATS . include? config_format
17
- require "skunk/generators/#{ config_format } _report"
18
- Generator . const_get ( "#{ config_format . capitalize } Report" )
19
- else
20
- require "skunk/generators/console_report"
21
- Generator ::ConsoleReport
22
- end
16
+ return if REPORT_GENERATOR_CLASS_FORMATS . none? { |format | format == config_format }
17
+
18
+ require "skunk/generators/#{ config_format } _report"
19
+ Generator . const_get ( "#{ config_format . capitalize } Report" )
23
20
end
24
21
end
25
22
end
You can’t perform that action at this time.
0 commit comments