diff options
author | w0rp <devw0rp@gmail.com> | 2017-04-15 12:13:31 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-04-15 12:13:31 +0100 |
commit | c9a5d9845b9bff9174c4bb3b67a9f7bfda190ee6 (patch) | |
tree | 55b7ea6bbff71f4d6bef214a7d53c55c29a47fc7 | |
parent | 7c49f5d4ccc79e7c5e2392f47d77142e31237e43 (diff) | |
download | ale-c9a5d9845b9bff9174c4bb3b67a9f7bfda190ee6.zip |
Explain some code better
-rw-r--r-- | autoload/ale/linter.vim | 7 |
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 |