Skip to content

Commit 6789fa7

Browse files
committed
Enable HTML report
1 parent dc14401 commit 6789fa7

File tree

3 files changed

+5
-10
lines changed

3 files changed

+5
-10
lines changed

lib/skunk/commands/default.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ def initialize(options)
2626
#
2727
# @return [Skunk::Command::StatusReporter]
2828
def execute
29-
RubyCritic::Config.formats = [:json]
30-
3129
report(critique)
3230

3331
status_reporter

lib/skunk/generators/html/skunk_data.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def non_test_modules
3737
def calculate_average
3838
return 0 if @analysed_modules_count.zero?
3939

40-
(@skunk_score_total.to_f / @analysed_modules_count).round(2)
40+
(@skunk_score_total.to_d / @analysed_modules_count).round(2)
4141
end
4242

4343
def find_worst_module

lib/skunk/reporter.rb

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,10 @@ def self.generate_report(analysed_modules)
1313
end
1414

1515
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")
2320
end
2421
end
2522
end

0 commit comments

Comments
 (0)