lib/quality/tools/cane.rb in quality-22.0.0 vs lib/quality/tools/cane.rb in quality-23.0.0

- old
+ new

@@ -1,5 +1,7 @@ +# frozen_string_literal: true + module Quality module Tools # Adds 'cane' tool support to quality gem module Cane private @@ -10,14 +12,20 @@ "--style-exclude '#{source_files_exclude_glob}'", "--doc-exclude '#{source_files_exclude_glob}'", ] end + def ruby_files_glob + "{#{ruby_files.join(',')}}" + end + def cane_args args = [ "-f '#{ruby_files_glob}'", ] - args += cane_exclude_args unless exclude_files.empty? + unless exclude_files.nil? || exclude_files.empty? + args += cane_exclude_args + end args.join(' ') end def quality_cane ratchet_quality_cmd('cane', gives_error_code_on_violations: true,