Class: Quality::Tools::Shellcheck

Inherits:
Tool
  • Object
show all
Defined in:
lib/quality/tools/shellcheck.rb

Overview

Adds ‘ShellCheck’ tool support to quality gem

Instance Method Summary collapse

Methods inherited from Tool

#initialize

Constructor Details

This class inherits a constructor from Quality::Tools::Tool

Instance Method Details

#quality_shellcheckObject



11
12
13
14
15
16
# File 'lib/quality/tools/shellcheck.rb', line 11

def quality_shellcheck
  ratchet_quality_cmd('shellcheck',
                      args: shellcheck_args,
                      gives_error_code_on_no_relevant_code: true,
                      gives_error_code_on_violations: true)
end

#shellcheck_argsObject



7
8
9
# File 'lib/quality/tools/shellcheck.rb', line 7

def shellcheck_args
  "-fgcc -sbash #{shell_files.join(' ')}"
end