Skip to content

Commit 21741eb

Browse files
committed
testing
1 parent 0d827b8 commit 21741eb

File tree

4 files changed

+9
-12
lines changed

4 files changed

+9
-12
lines changed

bin/console

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ puts ARGV.inspect
1313
require "skunk/cli/application"
1414
require "skunk/config"
1515

16-
Skunk::Config.formats = %i[json html]
16+
Skunk::Config.formats = %i[json console html]
1717
Skunk::Cli::Application.new(ARGV).execute

lib/skunk/commands/default.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@ def execute
3737
# @param [RubyCritic::AnalysedModulesCollection] A collection of analysed modules
3838
def report(analysed_modules)
3939
Reporter.generate_report(analysed_modules)
40-
41-
status_reporter.analysed_modules = analysed_modules
42-
status_reporter.score = analysed_modules.score
4340
end
4441
end
4542
end

lib/skunk/commands/status_reporter.rb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,12 @@
44

55
module Skunk
66
module Command
7-
# Knows how to report status for stinky files
7+
# Extends RubyCritic::Command::StatusReporter to silence the status message
88
class StatusReporter < RubyCritic::Command::StatusReporter
9-
attr_accessor :analysed_modules
10-
119
def initialize(options = {})
1210
super(options)
1311
end
1412

15-
# Returns a simple status message indicating the analysis is complete
1613
def update_status_message
1714
@status_message = "Skunk Report Completed"
1815
end

lib/skunk/reporter.rb

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

1515
def self.report_generator_class(config_format)
16-
return unless Config.supported_format?(config_format)
17-
18-
require "skunk/generators/#{config_format}_report"
19-
Generator.const_get("#{config_format.capitalize}Report")
16+
if Config.supported_format?(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
2023
end
2124
end
2225
end

0 commit comments

Comments
 (0)