vim-lint

Lint plugin for vim
git clone https://git.ce9e.org/vim-lint.git

commit
aa817b3c0d0707d97d47356f128e0e213838ebbe
parent
1e912903bb4fb1484df5d5793fd6065c5cf832e0
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2019-03-18 20:26
scope linter to buffer

fixes #1

Diffstat

M README.md 4 ++--
M autoload/lint.vim 4 ++--
M ftplugin/c_clang.vim 4 ++--
M ftplugin/css_stylelint.vim 4 ++--
M ftplugin/javascript_eslint.vim 4 ++--
M ftplugin/javascript_jshint.vim 4 ++--
M ftplugin/php_php.vim 4 ++--
M ftplugin/python_flake8.vim 4 ++--
M ftplugin/sh_shellcheck.vim 4 ++--

9 files changed, 18 insertions, 18 deletions


diff --git a/README.md b/README.md

@@ -21,8 +21,8 @@ first:
   21    21 ```viml
   22    22 " ftplugin/python_lint.vim
   23    23 if executable('flake8')
   24    -1     let g:lint_prg = 'flake8 --ignore=W191,W503'
   25    -1     let g:lint_format = '%f:%l:%c: %m'
   -1    24     let b:lint_prg = 'flake8 --ignore=W191,W503'
   -1    25     let b:lint_format = '%f:%l:%c: %m'
   26    26 endif
   27    27 ```
   28    28 

diff --git a/autoload/lint.vim b/autoload/lint.vim

@@ -23,14 +23,14 @@ function! s:RunLinter(prg, format)
   23    23 endfunction
   24    24 
   25    25 function! lint#Lint()
   26    -1     if !exists('g:lint_prg') || !exists('g:lint_format')
   -1    26     if !exists('b:lint_prg') || !exists('b:lint_format')
   27    27         echon 'No linter configured'
   28    28         return
   29    29     endif
   30    30     if &readonly == 0
   31    31         update
   32    32     endif
   33    -1     let l:results = s:RunLinter(g:lint_prg, g:lint_format)
   -1    33     let l:results = s:RunLinter(b:lint_prg, b:lint_format)
   34    34     call filter(l:results, 'v:val.lnum')
   35    35     if l:results != []
   36    36         copen

diff --git a/ftplugin/c_clang.vim b/ftplugin/c_clang.vim

@@ -1,4 +1,4 @@
    1     1 if executable('clang')
    2    -1     let g:lint_prg = 'clang -x c -fsyntax-only'
    3    -1     let g:lint_format = '%f:%l:%c: %m'
   -1     2     let b:lint_prg = 'clang -x c -fsyntax-only'
   -1     3     let b:lint_format = '%f:%l:%c: %m'
    4     4 endif

diff --git a/ftplugin/css_stylelint.vim b/ftplugin/css_stylelint.vim

@@ -1,4 +1,4 @@
    1     1 if executable('stylelint')
    2    -1     let g:lint_prg = 'stylelint -f unix'
    3    -1     let g:lint_format = '%f:%l:%c: %m'
   -1     2     let b:lint_prg = 'stylelint -f unix'
   -1     3     let b:lint_format = '%f:%l:%c: %m'
    4     4 endif

diff --git a/ftplugin/javascript_eslint.vim b/ftplugin/javascript_eslint.vim

@@ -1,4 +1,4 @@
    1     1 if executable('eslint')
    2    -1     let g:lint_prg = 'eslint'
    3    -1     let g:lint_format = '%f: line %l\, col %c\, %m'
   -1     2     let b:lint_prg = 'eslint'
   -1     3     let b:lint_format = '%f: line %l\, col %c\, %m'
    4     4 endif

diff --git a/ftplugin/javascript_jshint.vim b/ftplugin/javascript_jshint.vim

@@ -1,4 +1,4 @@
    1     1 if executable('jshint')
    2    -1     let g:lint_prg = 'jshint'
    3    -1     let g:lint_format = '%f: line %l\, col %c\, %m'
   -1     2     let b:lint_prg = 'jshint'
   -1     3     let b:lint_format = '%f: line %l\, col %c\, %m'
    4     4 endif

diff --git a/ftplugin/php_php.vim b/ftplugin/php_php.vim

@@ -1,4 +1,4 @@
    1     1 if executable('php')
    2    -1     let g:lint_prg = 'php -l'
    3    -1     let g:lint_format = '%m in %f on line %l'
   -1     2     let b:lint_prg = 'php -l'
   -1     3     let b:lint_format = '%m in %f on line %l'
    4     4 endif

diff --git a/ftplugin/python_flake8.vim b/ftplugin/python_flake8.vim

@@ -1,4 +1,4 @@
    1     1 if executable('flake8')
    2    -1     let g:lint_prg = 'flake8'
    3    -1     let g:lint_format = '%f:%l:%c: %m,%f:%l: %m'
   -1     2     let b:lint_prg = 'flake8'
   -1     3     let b:lint_format = '%f:%l:%c: %m,%f:%l: %m'
    4     4 endif

diff --git a/ftplugin/sh_shellcheck.vim b/ftplugin/sh_shellcheck.vim

@@ -1,4 +1,4 @@
    1     1 if executable('shellcheck')
    2    -1     let g:lint_prg = 'shellcheck -f gcc'
    3    -1     let g:lint_format = '%f:%l:%c: %m'
   -1     2     let b:lint_prg = 'shellcheck -f gcc'
   -1     3     let b:lint_format = '%f:%l:%c: %m'
    4     4 endif