Class: QuietQuality::Tools::HamlLint::Runner
Constant Summary
RelevantRunner::MAX_FILES
Constants inherited
from BaseRunner
BaseRunner::MAX_FILES
Instance Method Summary
collapse
#command, #exec_command, #invoke!
Methods inherited from BaseRunner
#command, #exec_command, #initialize, #invoke!, #success_status?
Methods included from Logging
#debug, #info, #warn
Instance Method Details
#base_command ⇒ Object
13
14
15
|
# File 'lib/quiet_quality/tools/haml_lint/runner.rb', line 13
def base_command
["haml-lint", "--reporter", "json"]
end
|
#base_exec_command ⇒ Object
17
18
19
|
# File 'lib/quiet_quality/tools/haml_lint/runner.rb', line 17
def base_exec_command
["haml-lint"]
end
|
#failure_status?(stat) ⇒ Boolean
haml-lint uses the ‘sysexits` gem, and exits with Sysexits::EX_DATAERR for the failures case here in lib/haml_lint/cli.rb. That’s mapped to status 65 - other statuses have other failure meanings, which we don’t want to interpret as “problems encountered”
29
30
31
|
# File 'lib/quiet_quality/tools/haml_lint/runner.rb', line 29
def failure_status?(stat)
stat.exitstatus == 65
end
|
#no_files_output ⇒ Object
9
10
11
|
# File 'lib/quiet_quality/tools/haml_lint/runner.rb', line 9
def no_files_output
%({"files": []})
end
|
#relevant_path?(path) ⇒ Boolean
21
22
23
|
# File 'lib/quiet_quality/tools/haml_lint/runner.rb', line 21
def relevant_path?(path)
path.end_with?(".haml")
end
|
5
6
7
|
# File 'lib/quiet_quality/tools/haml_lint/runner.rb', line 5
def tool_name
TOOL_NAME
end
|