Fix for Crystal support (#651)

* Strip color from Crystal compiler output

* Don't lint files if the file doesn't exist

* Lint files if they are readable
This commit is contained in:
David Alexander
2017-06-15 04:30:34 -04:00
committed by w0rp
parent f814be45b1
commit fb682be199
2 changed files with 5 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
" Author: w0rp <devw0rp@gmail.com>
" Author: w0rp <devw0rp@gmail.com>, David Alexander <opensource@thelonelyghost.com>
" Description: Primary code path for the plugin
" Manages execution of linters when requested by autocommands
@@ -85,7 +85,8 @@ function! ale#Lint(...) abort
" Check if we previously requested checking the file.
if has_key(s:should_lint_file_for_buffer, l:buffer)
unlet s:should_lint_file_for_buffer[l:buffer]
let l:should_lint_file = 1
" Lint files if they exist.
let l:should_lint_file = filereadable(expand('#' . l:buffer . ':p'))
endif
" Initialise the buffer information if needed.