summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ale_linters/html/htmlhint.vim7
-rw-r--r--ale_linters/python/pylint.vim9
-rw-r--r--autoload/ale/handlers.vim2
-rw-r--r--doc/ale.txt12
4 files changed, 27 insertions, 3 deletions
diff --git a/ale_linters/html/htmlhint.vim b/ale_linters/html/htmlhint.vim
index 649c523a..59c2ed20 100644
--- a/ale_linters/html/htmlhint.vim
+++ b/ale_linters/html/htmlhint.vim
@@ -1,9 +1,12 @@
-" Author: KabbAmine <amine.kabb@gmail.com>
+" Author: KabbAmine <amine.kabb@gmail.com>, deathmaz <00maz1987@gmail.com>
" Description: HTMLHint for checking html files
+" CLI options
+let g:ale_html_htmlhint_options = get(g:, 'ale_html_htmlhint_options', '--format=unix')
+
call ale#linter#Define('html', {
\ 'name': 'htmlhint',
\ 'executable': 'htmlhint',
-\ 'command': 'htmlhint --format=unix stdin',
+\ 'command': 'htmlhint ' . g:ale_html_htmlhint_options . ' stdin',
\ 'callback': 'ale#handlers#HandleUnixFormatAsError',
\})
diff --git a/ale_linters/python/pylint.vim b/ale_linters/python/pylint.vim
new file mode 100644
index 00000000..9e6093c7
--- /dev/null
+++ b/ale_linters/python/pylint.vim
@@ -0,0 +1,9 @@
+" Author: keith <k@keith.so>
+" Description: pylint for python files
+
+call ale#linter#Define('python', {
+\ 'name': 'pylint',
+\ 'executable': 'pylint',
+\ 'command': g:ale#util#stdin_wrapper . ' .py pylint --output-format text --msg-template="{path}:{line}:{column}: {msg_id} {msg}" --reports n',
+\ 'callback': 'ale#handlers#HandlePEP8Format',
+\})
diff --git a/autoload/ale/handlers.vim b/autoload/ale/handlers.vim
index 9ac0c192..177cdc43 100644
--- a/autoload/ale/handlers.vim
+++ b/autoload/ale/handlers.vim
@@ -4,7 +4,7 @@ scriptencoding utf-8
" linter which outputs warnings and errors in a format accepted by one of
" these functions can simply use one of these pre-defined error handlers.
-let s:path_pattern = '[a-zA-Z]\?\\\?:\?[[:alnum:]/\.-]\+'
+let s:path_pattern = '[a-zA-Z]\?\\\?:\?[[:alnum:]/\.\-_]\+'
function! s:HandleUnixFormat(buffer, lines, type) abort
" Matches patterns line the following:
diff --git a/doc/ale.txt b/doc/ale.txt
index d05b570a..40cc2af0 100644
--- a/doc/ale.txt
+++ b/doc/ale.txt
@@ -23,6 +23,7 @@ CONTENTS *ale-contents*
4.11. luacheck..............................|ale-linter-options-luacheck|
4.12. c-cppcheck............................|ale-linter-options-c-cppcheck|
4.13. cpp-cppcheck..........................|ale-linter-options-cpp-cppcheck|
+ 4.14. htmlhint..............................|ale-linter-options-htmlhint|
5. Commands/Keybinds..........................|ale-commands|
6. API........................................|ale-api|
7. Special Thanks.............................|ale-special-thanks|
@@ -549,6 +550,17 @@ g:ale_cpp_cppcheck_options *g:ale_cpp_cppcheck_options
This variable can be changed to modify flags given to cppcheck.
+-------------------------------------------------------------------------------
+4.14. htmlhint *ale-linter-options-htmlhint*
+
+g:ale_html_htmlhint_options *g:ale_html_htmlhint_options*
+
+ Type: |String|
+ Default: `'--format=unix'`
+
+ This variable can be changed to modify flags given to HTMLHint.
+
+
===============================================================================
5. Commands/Keybinds *ale-commands*