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('html', 'htmlhint')
3 call ale#test#SetFilename('../test-files/htmlhint/test.html')
5 let g:node_executable = ale#path#Simplify(
6 \ g:dir . '/../test-files/htmlhint/node_modules/.bin/htmlhint'
8 let g:config_path = ale#path#Simplify(
9 \ g:dir . '/../test-files/htmlhint/with_config/.htmlhintrc'
13 unlet! g:node_executable
16 call ale#assert#TearDownLinterTest()
18 Execute(The default command should be correct):
19 AssertLinter g:node_executable,
20 \ ale#Escape(g:node_executable) . ' --format=unix %t'
22 Execute(The global executable should be used if the option is set):
23 let g:ale_html_htmlhint_executable = 'foo'
24 let g:ale_html_htmlhint_use_global = 1
26 AssertLinter 'foo', ale#Escape('foo') . ' --format=unix %t',
28 " This is so old configurations which might include this still work.
29 Execute(--format=unix should be removed from the options if added):
30 let g:ale_html_htmlhint_options = '--format=unix'
32 AssertLinter g:node_executable,
33 \ ale#Escape(g:node_executable) . ' --format=unix %t'
35 Execute(The configuration file should be automatically detected):
36 call ale#test#SetFilename('../test-files/htmlhint/with_config/test.html')
38 AssertLinter g:node_executable,
39 \ ale#Escape(g:node_executable)
40 \ . ' --config ' . ale#Escape(g:config_path)
41 \ . ' --format=unix %t'
43 " This is so old configurations which might include the config will work.
44 Execute(The configuration file should be configurable through the options variable):
45 call ale#test#SetFilename('../test-files/htmlhint/with_config/test.html')
46 let g:ale_html_htmlhint_options = '--config=/foo/bar/.htmlhintrc'
48 AssertLinter g:node_executable,
49 \ ale#Escape(g:node_executable)
50 \ . ' --config=/foo/bar/.htmlhintrc'
51 \ . ' --format=unix %t'