File tree Expand file tree Collapse file tree 4 files changed +9
-12
lines changed Expand file tree Collapse file tree 4 files changed +9
-12
lines changed Original file line number Diff line number Diff line change @@ -13,5 +13,5 @@ puts ARGV.inspect
1313require "skunk/cli/application"
1414require "skunk/config"
1515
16- Skunk ::Config . formats = %i[ json html ]
16+ Skunk ::Config . formats = %i[ json console html ]
1717Skunk ::Cli ::Application . new ( ARGV ) . execute
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 44
55module 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
Original file line number Diff line number Diff 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
2225end
You can’t perform that action at this time.
0 commit comments