Loading lib/jsduck/logger.rb +13 −6 Original line number Diff line number Diff line Loading @@ -25,18 +25,25 @@ module JsDuck @shown_warnings = {} end # Configures warnings to default settings. # # NB! Needs to be called before retrieving the documentation with # #doc_warnings (otherwise the +/- signs will be wrong). def configure_defaults # Enable all warnings except some. set_warning(:all, true) set_warning(:link_auto, false) set_warning(:param_count, false) set_warning(:fires, false) set_warning(:nodoc, false) end # Configures the logger with command line options. def configure(opts) self.verbose = true if opts.verbose self.colors = opts.color unless opts.color.nil? # Enable all warnings except the following: set_warning(:all, true) set_warning(:link_auto, false) set_warning(:param_count, false) set_warning(:fires, false) set_warning(:nodoc, false) begin opts.warnings.each do |w| set_warning(w[:type], w[:enabled], w[:path], w[:params]) Loading lib/jsduck/options/processor.rb +3 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,9 @@ module JsDuck # Options::Record object, validates the options, applies it to # various singleton classes and returns the Options::Record. def self.process(args) # HACK! First establish warnings defaults. Logger.configure_defaults opts = Options::Parser.new.parse(args) # Expand list of input files Loading Loading
lib/jsduck/logger.rb +13 −6 Original line number Diff line number Diff line Loading @@ -25,18 +25,25 @@ module JsDuck @shown_warnings = {} end # Configures warnings to default settings. # # NB! Needs to be called before retrieving the documentation with # #doc_warnings (otherwise the +/- signs will be wrong). def configure_defaults # Enable all warnings except some. set_warning(:all, true) set_warning(:link_auto, false) set_warning(:param_count, false) set_warning(:fires, false) set_warning(:nodoc, false) end # Configures the logger with command line options. def configure(opts) self.verbose = true if opts.verbose self.colors = opts.color unless opts.color.nil? # Enable all warnings except the following: set_warning(:all, true) set_warning(:link_auto, false) set_warning(:param_count, false) set_warning(:fires, false) set_warning(:nodoc, false) begin opts.warnings.each do |w| set_warning(w[:type], w[:enabled], w[:path], w[:params]) Loading
lib/jsduck/options/processor.rb +3 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,9 @@ module JsDuck # Options::Record object, validates the options, applies it to # various singleton classes and returns the Options::Record. def self.process(args) # HACK! First establish warnings defaults. Logger.configure_defaults opts = Options::Parser.new.parse(args) # Expand list of input files Loading