summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorw0rp <w0rp@users.noreply.github.com>2019-06-16 18:13:47 +0100
committerGitHub <noreply@github.com>2019-06-16 18:13:47 +0100
commit15f23532b78d1d82c795fbd38a53bd5026f88ae4 (patch)
treec4e5ad4ee4ac56efd5289ab417e30bce1b3c3ca8 /test
parent3acfa0813e9c5edfa1d2a8099e86f39623d86251 (diff)
parenteb6a7b75164ae2a0acb87fc9a7402779dc3e3614 (diff)
downloadale-15f23532b78d1d82c795fbd38a53bd5026f88ae4.zip
Merge pull request #2577 from hsanson/fix-checkstyle-defaults
Fix checkstyle default configuration.
Diffstat (limited to 'test')
-rw-r--r--test/command_callback/checkstyle_paths/google_checks.xml0
-rw-r--r--test/command_callback/test_checkstyle_command_callback.vader20
2 files changed, 15 insertions, 5 deletions
diff --git a/test/command_callback/checkstyle_paths/google_checks.xml b/test/command_callback/checkstyle_paths/google_checks.xml
deleted file mode 100644
index e69de29b..00000000
--- a/test/command_callback/checkstyle_paths/google_checks.xml
+++ /dev/null
diff --git a/test/command_callback/test_checkstyle_command_callback.vader b/test/command_callback/test_checkstyle_command_callback.vader
index d775f9f2..7a9f26b3 100644
--- a/test/command_callback/test_checkstyle_command_callback.vader
+++ b/test/command_callback/test_checkstyle_command_callback.vader
@@ -6,17 +6,27 @@ After:
call ale#assert#TearDownLinterTest()
Execute(The checkstyle callback should return the correct default value):
- AssertLinter 'checkstyle', ale#Escape('checkstyle') . ' %s'
+ AssertLinter 'checkstyle',
+ \ ale#Escape('checkstyle')
+ \ . ' -c ' . ale#Escape('/google_checks.xml')
+ \ . ' %s'
Execute(The checkstyle executable should be configurable):
let b:ale_java_checkstyle_executable = 'foobar'
- AssertLinter 'foobar', ale#Escape('foobar') . ' %s'
+ AssertLinter 'foobar',
+ \ ale#Escape('foobar')
+ \ . ' -c ' . ale#Escape('/google_checks.xml')
+ \ . ' %s'
Execute(Custom options should be supported):
let b:ale_java_checkstyle_options = '--foobar'
- AssertLinter 'checkstyle', ale#Escape('checkstyle') . ' --foobar %s'
+ AssertLinter 'checkstyle',
+ \ ale#Escape('checkstyle')
+ \ . ' --foobar'
+ \ . ' -c ' . ale#Escape('/google_checks.xml')
+ \ . ' %s'
Execute(configuration files set in _config should be supported):
let b:ale_java_checkstyle_config = ale#path#Simplify(g:dir . '/checkstyle_paths/other_config.xml')
@@ -36,12 +46,12 @@ Execute(configuration files set in _options should be preferred over _config):
AssertLinter 'checkstyle', ale#Escape('checkstyle') . ' -x -c /bar.xml %s'
-Execute(google_checks.xml should be detected automatically):
+Execute(google_checks.xml should be used by default):
call ale#test#SetFilename('checkstyle_paths/test.java')
AssertLinter 'checkstyle',
\ ale#Escape('checkstyle')
- \ . ' -c ' . ale#Escape(ale#path#Simplify(g:dir . '/checkstyle_paths/google_checks.xml'))
+ \ . ' -c ' . ale#Escape('/google_checks.xml')
\ . ' %s'
Execute(Other relative paths should be supported):