lib/scss_lint/cli.rb in scss-lint-0.23.0 vs lib/scss_lint/cli.rb in scss-lint-0.23.1
- old
+ new
@@ -43,11 +43,11 @@
halt :config
end
end
# @return [OptionParser]
- def options_parser
+ def options_parser # rubocop:disable MethodLength
@options_parser ||= OptionParser.new do |opts|
opts.banner = "Usage: #{opts.program_name} [options] [scss-files]"
opts.separator ''
opts.separator 'Common options:'
@@ -60,11 +60,11 @@
'List of file names to exclude') do |files|
@options[:excluded_files] = files
end
opts.on('-f', '--format Formatter', 'Specify how to display lints', String) do |format|
- set_output_format(format)
+ define_output_format(format)
end
opts.on('-i', '--include-linter linter,...', Array,
'Specify which linters you want to run') do |linters|
@options[:included_linters] = linters
@@ -187,10 +187,10 @@
output = reporter.report_lints
print output if output
end
# @param format [String]
- def set_output_format(format)
+ def define_output_format(format)
@options[:reporter] = SCSSLint::Reporter.const_get(format + 'Reporter')
rescue NameError
puts "Invalid output format specified: #{format}"
halt :config
end