lib/goodcheck/cli.rb in goodcheck-2.6.1 vs lib/goodcheck/cli.rb in goodcheck-2.7.0
- old
+ new
@@ -61,11 +61,11 @@
config_path = DEFAULT_CONFIG_FILE
targets = []
rules = []
formats = [:text, :json]
format = :text
- loglevel = Logger::ERROR
+ loglevel = nil
force_download = false
OptionParser.new("Usage: goodcheck check [options] paths...") do |opts|
config_option(opts) { |config| config_path = config }
verbose_option(opts) { |level| loglevel = level }
@@ -80,10 +80,10 @@
opts.on("--format=<#{formats.join('|')}>", formats, "Output format [default: '#{format}']") do |f|
format = f
end
end.parse!(args)
- Goodcheck.logger.level = loglevel
+ Goodcheck.logger.level = loglevel if loglevel
if args.empty?
targets << Pathname(".")
else
args.each {|arg| targets << Pathname(arg) }