Loading lib/jsduck/logger.rb +3 −6 Original line number Diff line number Diff line Loading @@ -38,11 +38,12 @@ module JsDuck [:cat_class_missing, "Class is missing from categories file"], [:guide, "Guide is missing from --guides dir"], ] # Turn on all warnings by default # Turn on all warnings except :link_auto @warnings = {} @warning_docs.each do |w| @warnings[w[0]] = true end set_warning(:link_auto, false) @shown_warnings = {} end Loading Loading @@ -70,11 +71,7 @@ module JsDuck # get documentation for all warnings def doc_warnings @warning_docs.map {|w| "+#{w[0]} - #{w[1]}" } + [ " ", "+all - to turn on all warnings (default)", " ", ] @warning_docs.map {|w| " #{@warnings[w[0]] ? '+' : '-'}#{w[0]} - #{w[1]}" } + [" "] end # Prints warning message. Loading lib/jsduck/options.rb +4 −2 Original line number Diff line number Diff line Loading @@ -275,8 +275,10 @@ module JsDuck opts.on('--warnings=+A,-B,+C', Array, "Turns warnings selectively on/off.", "+foo turns on a warning, -foo turns it off.", "Possible warning types are:", " ", " +all - to turn on all warnings", " ", "By default these warnings are turned +on/-off:", " ", *Logger.instance.doc_warnings) do |warnings| warnings.each do |op| Loading Loading
lib/jsduck/logger.rb +3 −6 Original line number Diff line number Diff line Loading @@ -38,11 +38,12 @@ module JsDuck [:cat_class_missing, "Class is missing from categories file"], [:guide, "Guide is missing from --guides dir"], ] # Turn on all warnings by default # Turn on all warnings except :link_auto @warnings = {} @warning_docs.each do |w| @warnings[w[0]] = true end set_warning(:link_auto, false) @shown_warnings = {} end Loading Loading @@ -70,11 +71,7 @@ module JsDuck # get documentation for all warnings def doc_warnings @warning_docs.map {|w| "+#{w[0]} - #{w[1]}" } + [ " ", "+all - to turn on all warnings (default)", " ", ] @warning_docs.map {|w| " #{@warnings[w[0]] ? '+' : '-'}#{w[0]} - #{w[1]}" } + [" "] end # Prints warning message. Loading
lib/jsduck/options.rb +4 −2 Original line number Diff line number Diff line Loading @@ -275,8 +275,10 @@ module JsDuck opts.on('--warnings=+A,-B,+C', Array, "Turns warnings selectively on/off.", "+foo turns on a warning, -foo turns it off.", "Possible warning types are:", " ", " +all - to turn on all warnings", " ", "By default these warnings are turned +on/-off:", " ", *Logger.instance.doc_warnings) do |warnings| warnings.each do |op| Loading