lib/haml_lint/runner.rb
# Runs the appropriate linters against the desired files given the specified
# options.
#
# @param options [Hash]
# @raise [HamlLint::Exceptions::NoLintersError] when no linters are enabled
# @return [HamlLint::Report] a summary of all lints found
Runs the appropriate linters against the desired files given the specified
options.
Runs the appropriate linters against the desired files given the specified options .
def extract_applicable_files(options)
      excluded_files = options.fetch(:excluded_files, [])
      Utils.extract_files_from(options[:files]).reject do |file|
        excluded_files.any? do |exclusion_glob|
          File.fnmatch?(exclusion_glob, file,
                        File::FNM_PATHNAME | 
                        File::FNM_DOTMATCH)  
        end
      end
    end
def extract_applicable_files ( options ) excluded_files = options . fetch ( :excluded_files , [ ] ) Utils . extract_files_from ( options [ :files ] ) . reject do | file | excluded_files . any? do | exclusion_glob | File . fnmatch? ( exclusion_glob , file , File :: FNM_PATHNAME | File :: FNM_DOTMATCH ) end end end
Runs the appropriate linters against the desired files given the specified
options.
Runs the appropriate linters against the desired files given the specified options .
# Wildcards don't match path separators # `*` wildcard matches dotfiles
a summary of all lints found
a summary of all lints found
HamlLint::Report
[HamlLint::Exceptions::NoLintersError] when no linters are enabled
[ HamlLint :: Exceptions :: NoLintersError ] when no linters are enabled
options
None