New linter: dls (#1992)

* New linter: dls
This commit is contained in:
Auri
2018-10-17 18:11:41 +03:00
committed by w0rp
parent d999eb1f35
commit be21aa5cda
7 changed files with 72 additions and 17 deletions

16
autoload/ale/d.vim Normal file
View File

@@ -0,0 +1,16 @@
" Author: Auri <me@aurieh.me>
" Description: Functions for integrating with D linters.
function! ale#d#FindDUBConfig(buffer) abort
" Find a DUB configuration file in ancestor paths.
" The most DUB-specific names will be tried first.
for l:possible_filename in ['dub.sdl', 'dub.json', 'package.json']
let l:dub_file = ale#path#FindNearestFile(a:buffer, l:possible_filename)
if !empty(l:dub_file)
return l:dub_file
endif
endfor
return ''
endfunction