summaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-02-09 20:44:13 +0000
committerw0rp <devw0rp@gmail.com>2017-02-09 20:44:13 +0000
commit9f8c76b5b939c3a73937069dc1c29efeb2eae49f (patch)
tree2c7016aeb63157a85b4ec5a64ad5b916ae69a196 /autoload
parent38d9802d12118999dfbb1bba40b84288f655d148 (diff)
downloadale-9f8c76b5b939c3a73937069dc1c29efeb2eae49f.zip
Make ALE complain when conflicting command options are used
Diffstat (limited to 'autoload')
-rw-r--r--autoload/ale/linter.vim9
1 files changed, 9 insertions, 0 deletions
diff --git a/autoload/ale/linter.vim b/autoload/ale/linter.vim
index 0a5b9ae3..be173588 100644
--- a/autoload/ale/linter.vim
+++ b/autoload/ale/linter.vim
@@ -114,6 +114,15 @@ function! ale#linter#PreProcess(linter) abort
\ . 'must be defined'
endif
+ if (
+ \ has_key(a:linter, 'command')
+ \ + has_key(a:linter, 'command_chain')
+ \ + has_key(a:linter, 'command_callback')
+ \) > 1
+ throw 'Only one of `command`, `command_callback`, or `command_chain` '
+ \ . 'should be set'
+ endif
+
let l:obj.output_stream = get(a:linter, 'output_stream', 'stdout')
if type(l:obj.output_stream) != type('')