From c9a5d9845b9bff9174c4bb3b67a9f7bfda190ee6 Mon Sep 17 00:00:00 2001 From: w0rp Date: Sat, 15 Apr 2017 12:13:31 +0100 Subject: Explain some code better --- autoload/ale/linter.vim | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'autoload') 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 -- cgit v1.2.3