summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw0rp <w0rp@users.noreply.github.com>2016-10-11 13:33:18 +0100
committerGitHub <noreply@github.com>2016-10-11 13:33:18 +0100
commit6ee42c9a2d800d41e14081539e38e74ef91b6941 (patch)
tree78e73ed97e71e63703bd3f76be5e336c95b5e087
parent0fa730aecff6481a932e7114bd1653f705991889 (diff)
parent38dcf30045133b7154def9bad6a89a5d7258700d (diff)
downloadale-6ee42c9a2d800d41e14081539e38e74ef91b6941.zip
Merge pull request #91 from w0rp/vint-style-flag
Support Vint style issues, and enabling/disabling them
-rw-r--r--ale_linters/vim/vint.vim11
-rw-r--r--doc/ale.txt34
2 files changed, 34 insertions, 11 deletions
diff --git a/ale_linters/vim/vint.vim b/ale_linters/vim/vint.vim
index e2c156f7..c23574ac 100644
--- a/ale_linters/vim/vint.vim
+++ b/ale_linters/vim/vint.vim
@@ -7,11 +7,20 @@ endif
let g:loaded_ale_linters_vim_vint = 1
+" This flag can be used to change enable/disable style issues.
+let g:ale_vim_vint_show_style_issues =
+\ get(g:, 'ale_vim_vint_show_style_issues', 1)
+
+let s:warning_flag = g:ale_vim_vint_show_style_issues ? '-s' : '-w'
let s:format = '-f "{file_path}:{line_number}:{column_number}: {severity}: {description} (see {reference})"'
call ale#linter#Define('vim', {
\ 'name': 'vint',
\ 'executable': 'vint',
-\ 'command': g:ale#util#stdin_wrapper . ' .vim vint -w --no-color ' . s:format,
+\ 'command': g:ale#util#stdin_wrapper
+\ . ' .vim vint '
+\ . s:warning_flag
+\ . ' --no-color '
+\ . s:format,
\ 'callback': 'ale#handlers#HandleGCCFormat',
\})
diff --git a/doc/ale.txt b/doc/ale.txt
index e27c5af1..cb6d9305 100644
--- a/doc/ale.txt
+++ b/doc/ale.txt
@@ -10,15 +10,16 @@ CONTENTS *ale-contents*
2. Supported Languages & Tools................|ale-support|
3. Global Options.............................|ale-options|
4. Linter Specific Options....................|ale-linter-options|
- 4.1. eslint.................................|ale-linter-options-eslint|
- 4.2. jshint.................................|ale-linter-options-jshint|
- 4.3. phpcs..................................|ale-linter-options-phpcs|
- 4.4. html-tidy..............................|ale-linter-options-html-tidy|
- 4.5. c-gcc..................................|ale-linter-options-c-gcc|
- 4.6. cpp-gcc................................|ale-linter-options-cpp-gcc|
- 4.7. fortran-gcc............................|ale-linter-options-fortran-gcc|
- 4.8. shell..................................|ale-linter-options-shell|
- 4.9. shellcheck.............................|ale-linter-options-shellcheck|
+ 4.1. eslint................................|ale-linter-options-eslint|
+ 4.2. jshint................................|ale-linter-options-jshint|
+ 4.3. phpcs.................................|ale-linter-options-phpcs|
+ 4.4. html-tidy.............................|ale-linter-options-html-tidy|
+ 4.5. c-gcc.................................|ale-linter-options-c-gcc|
+ 4.6. cpp-gcc...............................|ale-linter-options-cpp-gcc|
+ 4.7. fortran-gcc...........................|ale-linter-options-fortran-gcc|
+ 4.8. shell.................................|ale-linter-options-shell|
+ 4.9. shellcheck............................|ale-linter-options-shellcheck|
+ 4.10. vint..................................|ale-linter-options-vint|
5. API........................................|ale-api|
6. Contact....................................|ale-contact|
@@ -432,7 +433,7 @@ g:ale_linters_sh_shell_default_shell *g:ale_linters_sh_shell_default_shell*
-------------------------------------------------------------------------------
-4.9. shellchek *ale-linter-options-shellcheck*
+4.9. shellcheck *ale-linter-options-shellcheck*
g:ale_linters_sh_shellckeck_exclusions *g:ale_linters_sh_shellckeck_exclusions*
@@ -442,6 +443,19 @@ g:ale_linters_sh_shellckeck_exclusions *g:ale_linters_sh_shellckeck_exclusions*
Set this variable to exclude test(s) for shellcheck (-e/--exclude option).
+-------------------------------------------------------------------------------
+4.10. vint *ale-linter-options-vint*
+
+g:ale_vim_vint_show_style_issues *g:ale_vim_vint_show_style_issues*
+
+ Type: |Number|
+ Default: `1`
+
+ This variable will enable/disable style issues for Vint. When this option
+ is disabled, only warnings and errors which are not purely style issues
+ will be reported.
+
+
===============================================================================
5. API *ale-api*