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('gitcommit', 'gitlint')
4 let b:bin_dir = has('win32') ? 'Scripts' : 'bin'
10 call ale#assert#TearDownLinterTest()
12 Execute(The gitlint callbacks should return the correct default values):
13 AssertLinter 'gitlint', ale#Escape('gitlint') . ' lint'
15 Execute(The gitlint executable should be configurable, and escaped properly):
16 let g:ale_gitcommit_gitlint_executable = 'executable with spaces'
18 AssertLinter 'executable with spaces',
19 \ ale#Escape('executable with spaces') . ' lint'
21 Execute(The gitlint command callback should let you set options):
22 let g:ale_gitcommit_gitlint_options = '--some-option'
24 AssertLinter 'gitlint', ale#Escape('gitlint') . ' --some-option lint'
26 Execute(The gitlint callbacks shouldn't detect virtualenv directories where they don't exist):
27 call ale#test#SetFilename('../test-files/python/no_virtualenv/subdir/foo/COMMIT_EDITMSG')
29 AssertLinter 'gitlint', ale#Escape('gitlint') . ' lint'
31 Execute(The gitlint callbacks should detect virtualenv directories):
32 call ale#test#SetFilename('../test-files/python/with_virtualenv/subdir/foo/COMMIT_EDITMSG')
33 let b:executable = ale#path#Simplify(
34 \ g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/gitlint'
37 AssertLinter b:executable, ale#Escape(b:executable) . ' lint'
39 Execute(You should able able to use the global gitlint instead):
40 call ale#test#SetFilename('../test-files/python/with_virtualenv/subdir/foo/COMMIT_EDITMSG')
41 let g:ale_gitcommit_gitlint_use_global = 1
43 AssertLinter 'gitlint', ale#Escape('gitlint') . ' lint'