summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--autoload/ale/linter.vim7
1 files changed, 4 insertions, 3 deletions
diff --git a/autoload/ale/linter.vim b/autoload/ale/linter.vim
index eec9cf15..b13aa1c9 100644
--- a/autoload/ale/linter.vim
+++ b/autoload/ale/linter.vim
@@ -178,12 +178,13 @@ function! ale#linter#GetAll(filetypes) abort
let l:combined_linters = []
for l:filetype in a:filetypes
- " Haven't we loaded the linter files for this filetype yet?
+ " Load linter defintions from files if we haven't loaded them yet.
if !has_key(s:linters, l:filetype)
- " So load it
execute 'silent! runtime! ale_linters/' . l:filetype . '/*.vim'
- " Still don't have the linter files? There must be occured an error
+ " Always set an empty List for the loaded linters if we don't find
+ " any. This will prevent us from executing the runtime command
+ " many times, redundantly.
if !has_key(s:linters, l:filetype)
let s:linters[l:filetype] = []
endif