From 2a575ca551929140c59b824c9a4caf120beb225c Mon Sep 17 00:00:00 2001 From: Ty-Lucas Kelley Date: Sat, 3 Mar 2018 19:16:41 -0500 Subject: add basic support for markdownlint --- autoload/ale/handlers/markdownlint.vim | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 autoload/ale/handlers/markdownlint.vim (limited to 'autoload') diff --git a/autoload/ale/handlers/markdownlint.vim b/autoload/ale/handlers/markdownlint.vim new file mode 100644 index 00000000..12fc501c --- /dev/null +++ b/autoload/ale/handlers/markdownlint.vim @@ -0,0 +1,17 @@ +" Author: Ty-Lucas Kelley +" Description: Adds support for markdownlint + +function! ale#handlers#markdownlint#Handle(buffer, lines) abort + let l:pattern=': \(\d*\): \(MD\d\{3}\)\(\/\)\([A-Za-z0-9-]\+\)\(.*\)$' + let l:output=[] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'lnum': l:match[1] + 0, + \ 'text': '(' . l:match[2] . l:match[3] . l:match[4] . ')' . l:match[5], + \ 'type': 'W', + \ }) + endfor + + return l:output +endfunction -- cgit v1.2.3