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('java', 'checkstyle')
3 call ale#test#SetFilename('dummy.java')
6 call ale#assert#TearDownLinterTest()
8 Execute(The checkstyle callback should return the correct default value):
9 AssertLinter 'checkstyle',
10 \ ale#Escape('checkstyle')
11 \ . ' -c ' . ale#Escape('/google_checks.xml')
14 Execute(The checkstyle executable should be configurable):
15 let b:ale_java_checkstyle_executable = 'foobar'
17 AssertLinter 'foobar',
18 \ ale#Escape('foobar')
19 \ . ' -c ' . ale#Escape('/google_checks.xml')
22 Execute(Custom options should be supported):
23 let b:ale_java_checkstyle_options = '--foobar -cp -classpath /path/to/checkstyle-8.7-all.jar'
25 AssertLinter 'checkstyle',
26 \ ale#Escape('checkstyle')
27 \ . ' --foobar -cp -classpath /path/to/checkstyle-8.7-all.jar'
28 \ . ' -c ' . ale#Escape('/google_checks.xml')
31 Execute(configuration files set in _config should be supported):
32 let b:ale_java_checkstyle_config = ale#path#Simplify(g:dir . '/../test-files/checkstyle/other_config.xml')
34 AssertLinter 'checkstyle',
35 \ ale#Escape('checkstyle')
36 \ . ' -c ' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/checkstyle/other_config.xml'))
39 Execute(configuration files set in _options should be preferred over _config):
40 let b:ale_java_checkstyle_config = '/foo.xml'
41 let b:ale_java_checkstyle_options = '-c /bar.xml'
43 AssertLinter 'checkstyle', ale#Escape('checkstyle') . ' -c /bar.xml %s'
45 let b:ale_java_checkstyle_options = '-x -c /bar.xml'
47 AssertLinter 'checkstyle', ale#Escape('checkstyle') . ' -x -c /bar.xml %s'
49 Execute(google_checks.xml should be used by default):
50 call ale#test#SetFilename('../test-files/checkstyle/test.java')
52 AssertLinter 'checkstyle',
53 \ ale#Escape('checkstyle')
54 \ . ' -c ' . ale#Escape('/google_checks.xml')
57 Execute(Other relative paths should be supported):
58 let b:ale_java_checkstyle_config = '../test-files/checkstyle/other_config.xml'
60 AssertLinter 'checkstyle',
61 \ ale#Escape('checkstyle')
62 \ . ' -c ' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/checkstyle/other_config.xml'))
65 call ale#test#SetFilename('../test-files/checkstyle/test.java')
67 let b:ale_java_checkstyle_config = 'other_config.xml'
69 AssertLinter 'checkstyle',
70 \ ale#Escape('checkstyle')
71 \ . ' -c ' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/checkstyle/other_config.xml'))