All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@git.madduck.net.
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
2 call ale#assert#SetUpLinterTest('haml', 'hamllint')
4 let g:default_command = 'haml-lint %t'
11 call ale#assert#TearDownLinterTest()
13 Execute(The default command should be correct):
14 AssertLinter 'haml-lint', 'haml-lint %t'
16 Execute(The command should have the .rubocop.yml prepended as an env var if one exists):
17 call ale#test#SetFilename('../test-files/hamllint/rubocop-yml/subdir/file.haml')
18 let b:conf = ale#path#Simplify(g:dir . '/../test-files/hamllint/rubocop-yml/.rubocop.yml')
20 AssertLinter 'haml-lint',
21 \ ale#Env('HAML_LINT_RUBOCOP_CONF', b:conf) . 'haml-lint %t'
23 Execute(The command should have the nearest .haml-lint.yml set as --config if it exists):
24 call ale#test#SetFilename('../test-files/hamllint/haml-lint-yml/subdir/file.haml')
25 let b:conf = ale#path#Simplify(g:dir . '/../test-files/hamllint/haml-lint-yml/.haml-lint.yml')
27 AssertLinter 'haml-lint',
28 \ 'haml-lint --config ' . ale#Escape(b:conf) . ' %t',
30 Execute(The command should include a .rubocop.yml and a .haml-lint if both are found):
31 call ale#test#SetFilename('../test-files/hamllint/haml-lint-and-rubocop/subdir/file.haml')
32 let b:conf_hamllint = ale#path#Simplify(g:dir . '/../test-files/hamllint/haml-lint-and-rubocop/.haml-lint.yml')
33 let b:conf_rubocop = ale#path#Simplify(g:dir . '/../test-files/hamllint/haml-lint-and-rubocop/.rubocop.yml')
35 AssertLinter 'haml-lint',
36 \ ale#Env('HAML_LINT_RUBOCOP_CONF', b:conf_rubocop)
37 \ . 'haml-lint --config ' . ale#Escape(b:conf_hamllint) . ' %t'
39 Execute(The executable can be overridden):
40 let b:ale_haml_hamllint_executable = 'bin/haml-lint'
41 call ale#test#SetFilename('../test-files/dummy')
43 AssertLinter 'bin/haml-lint', 'bin/haml-lint %t'