From f49f615ef647fdd33d82dc6d2646cd70367f7426 Mon Sep 17 00:00:00 2001 From: Bjorn Neergaard Date: Fri, 21 Oct 2016 21:02:20 -0500 Subject: Add support for dot-seperate linters, improve linter tests This PR first and formost implements support for dot-seperate filetypes, a very trivial change. This closes #132 But more importantly, this PR vastly improves the test quality for `ale#linter#Get`. It enables us to reset the state of ale's internal linter cache, to facilitate better testing, as well as making use of mocked linters instead of depending on linters on disk (which may change). In addition, a dummy linter is defined to test the autoloading behavior. Header guards were removed from all linters as: * A: ale won't try and load linters if they already exist in memory * B: we can't reset state for testing if they can't be loaded again --- ale_linters/ansible/ansible-lint.vim | 6 ------ ale_linters/c/cppcheck.vim | 6 ------ ale_linters/c/gcc.vim | 6 ------ ale_linters/coffee/coffee.vim | 7 ------- ale_linters/coffee/coffeelint.vim | 6 ------ ale_linters/cpp/cppcheck.vim | 6 ------ ale_linters/cpp/gcc.vim | 6 ------ ale_linters/css/csslint.vim | 6 ------ ale_linters/d/dmd.vim | 6 ------ ale_linters/elixir/credo.vim | 6 ------ ale_linters/fortran/gcc.vim | 6 ------ ale_linters/go/gofmt.vim | 7 ------- ale_linters/go/golint.vim | 6 ------ ale_linters/go/govet.vim | 7 ------- ale_linters/haskell/ghc.vim | 6 ------ ale_linters/haskell/hlint.vim | 6 ------ ale_linters/html/htmlhint.vim | 6 ------ ale_linters/html/tidy.vim | 6 ------ ale_linters/javascript/eslint.vim | 6 ------ ale_linters/javascript/jscs.vim | 6 ------ ale_linters/javascript/jshint.vim | 6 ------ ale_linters/json/jsonlint.vim | 6 ------ ale_linters/lua/luacheck.vim | 6 ------ ale_linters/perl/perl.vim | 5 ----- ale_linters/perl/perlcritic.vim | 5 ----- ale_linters/php/php.vim | 6 ------ ale_linters/php/phpcs.vim | 6 ------ ale_linters/pug/puglint.vim | 6 ------ ale_linters/python/flake8.vim | 6 ------ ale_linters/ruby/rubocop.vim | 6 ------ ale_linters/sass/sasslint.vim | 6 ------ ale_linters/scala/scalac.vim | 6 ------ ale_linters/scss/sasslint.vim | 6 ------ ale_linters/scss/scsslint.vim | 6 ------ ale_linters/sh/shell.vim | 6 ------ ale_linters/sh/shellcheck.vim | 6 ------ ale_linters/testft/testlinter.vim | 10 ++++++++++ ale_linters/typescript/tslint.vim | 6 ------ ale_linters/verilog/iverilog.vim | 6 ------ ale_linters/verilog/verilator.vim | 6 ------ ale_linters/vim/vint.vim | 6 ------ ale_linters/yaml/yamllint.vim | 6 ------ 42 files changed, 10 insertions(+), 247 deletions(-) create mode 100644 ale_linters/testft/testlinter.vim (limited to 'ale_linters') diff --git a/ale_linters/ansible/ansible-lint.vim b/ale_linters/ansible/ansible-lint.vim index a947d9e7..af1e28b2 100644 --- a/ale_linters/ansible/ansible-lint.vim +++ b/ale_linters/ansible/ansible-lint.vim @@ -1,12 +1,6 @@ " Author: Bjorn Neergaard " Description: ansible-lint for ansible-yaml files -if exists('g:loaded_ale_linters_ansible_ansiblelint') - finish -endif - -let g:loaded_ale_linters_ansible_ansiblelint = 1 - call ale#linter#Define('ansible', { \ 'name': 'ansible', \ 'executable': 'ansible', diff --git a/ale_linters/c/cppcheck.vim b/ale_linters/c/cppcheck.vim index 891b4ffb..d4362cc0 100644 --- a/ale_linters/c/cppcheck.vim +++ b/ale_linters/c/cppcheck.vim @@ -1,12 +1,6 @@ " Author: Bart Libert " Description: cppcheck linter for c files -if exists('g:loaded_ale_linters_c_cppcheck') - finish -endif - -let g:loaded_ale_linters_c_cppcheck = 1 - " Set this option to change the cppcheck options if !exists('g:ale_c_cppcheck_options') let g:ale_c_cppcheck_options = '--enable=style' diff --git a/ale_linters/c/gcc.vim b/ale_linters/c/gcc.vim index 06bcff22..3c18964a 100644 --- a/ale_linters/c/gcc.vim +++ b/ale_linters/c/gcc.vim @@ -1,12 +1,6 @@ " Author: w0rp " Description: gcc linter for c files -if exists('g:loaded_ale_linters_c_gcc') - finish -endif - -let g:loaded_ale_linters_c_gcc = 1 - " Set this option to change the GCC options for warnings for C. if !exists('g:ale_c_gcc_options') " let g:ale_c_gcc_options = '-Wall' diff --git a/ale_linters/coffee/coffee.vim b/ale_linters/coffee/coffee.vim index b2ad32b1..243fec6b 100644 --- a/ale_linters/coffee/coffee.vim +++ b/ale_linters/coffee/coffee.vim @@ -1,12 +1,6 @@ " Author: KabbAmine - https://github.com/KabbAmine " Description: Coffee for checking coffee files -if exists('g:loaded_ale_linters_coffee_coffee') - finish -endif - -let g:loaded_ale_linters_coffee_coffee = 1 - call ale#linter#Define('coffee', { \ 'name': 'coffee', \ 'executable': 'coffee', @@ -14,4 +8,3 @@ call ale#linter#Define('coffee', { \ 'output_stream': 'stderr', \ 'callback': 'ale#handlers#HandleGCCFormat', \}) - diff --git a/ale_linters/coffee/coffeelint.vim b/ale_linters/coffee/coffeelint.vim index 83053be7..e1215132 100644 --- a/ale_linters/coffee/coffeelint.vim +++ b/ale_linters/coffee/coffeelint.vim @@ -1,12 +1,6 @@ " Author: Prashanth Chandra https://github.com/prashcr " Description: coffeelint linter for coffeescript files -if exists('g:loaded_ale_linters_coffee_coffeelint') - finish -endif - -let g:loaded_ale_linters_coffee_coffeelint = 1 - function! ale_linters#coffee#coffeelint#Handle(buffer, lines) " Matches patterns like the following: " diff --git a/ale_linters/cpp/cppcheck.vim b/ale_linters/cpp/cppcheck.vim index d8057901..9576b092 100644 --- a/ale_linters/cpp/cppcheck.vim +++ b/ale_linters/cpp/cppcheck.vim @@ -1,12 +1,6 @@ " Author: Bart Libert " Description: cppcheck linter for cpp files -if exists('g:loaded_ale_linters_cpp_cppcheck') - finish -endif - -let g:loaded_ale_linters_cpp_cppcheck = 1 - " Set this option to change the cppcheck options if !exists('g:ale_cpp_cppcheck_options') let g:ale_cpp_cppcheck_options = '--enable=style' diff --git a/ale_linters/cpp/gcc.vim b/ale_linters/cpp/gcc.vim index b868828a..084c0602 100644 --- a/ale_linters/cpp/gcc.vim +++ b/ale_linters/cpp/gcc.vim @@ -1,12 +1,6 @@ " Author: geam " Description: gcc linter for cpp files -if exists('g:loaded_ale_linters_cpp_gcc') - finish -endif - -let g:loaded_ale_linters_cpp_gcc = 1 - " Set this option to change the GCC options for warnings for C. if !exists('g:ale_cpp_gcc_options') " added c++14 standard support diff --git a/ale_linters/css/csslint.vim b/ale_linters/css/csslint.vim index dbaed15b..d967f83b 100644 --- a/ale_linters/css/csslint.vim +++ b/ale_linters/css/csslint.vim @@ -1,12 +1,6 @@ " Author: w0rp " Description: This file adds support for checking CSS code with csslint. -if exists('g:loaded_ale_linters_css_csslint') - finish -endif - -let g:loaded_ale_linters_css_csslint = 1 - call ale#linter#Define('css', { \ 'name': 'csslint', \ 'executable': 'csslint', diff --git a/ale_linters/d/dmd.vim b/ale_linters/d/dmd.vim index a0cbeb49..8619eba2 100644 --- a/ale_linters/d/dmd.vim +++ b/ale_linters/d/dmd.vim @@ -1,12 +1,6 @@ " Author: w0rp " Description: "dmd for D files" -if exists('g:loaded_ale_linters_d_dmd') - finish -endif - -let g:loaded_ale_linters_d_dmd = 1 - " A function for finding the dmd-wrapper script in the Vim runtime paths function! s:FindWrapperScript() for l:parent in split(&runtimepath, ',') diff --git a/ale_linters/elixir/credo.vim b/ale_linters/elixir/credo.vim index 0d84fcd9..fe34abc6 100644 --- a/ale_linters/elixir/credo.vim +++ b/ale_linters/elixir/credo.vim @@ -1,11 +1,5 @@ " Author: hauleth - https://github.com/haulethe -if exists('g:loaded_ale_linters_elixir_credo') - finish -endif - -let g:loaded_ale_linters_elixir_credo = 1 - function! ale_linters#elixir#credo#Handle(buffer, lines) " Matches patterns line the following: " diff --git a/ale_linters/fortran/gcc.vim b/ale_linters/fortran/gcc.vim index c0a8974a..4129eca8 100644 --- a/ale_linters/fortran/gcc.vim +++ b/ale_linters/fortran/gcc.vim @@ -1,12 +1,6 @@ " Author: w0rp " Description: gcc for Fortran files -if exists('g:loaded_ale_linters_fortran_gcc') - finish -endif - -let g:loaded_ale_linters_fortran_gcc = 1 - " Set this option to change the GCC options for warnings for Fortran. if !exists('g:ale_fortran_gcc_options') let g:ale_fortran_gcc_options = '-Wall' diff --git a/ale_linters/go/gofmt.vim b/ale_linters/go/gofmt.vim index 83c4d811..50d25086 100644 --- a/ale_linters/go/gofmt.vim +++ b/ale_linters/go/gofmt.vim @@ -1,12 +1,6 @@ " Author: neersighted " Description: gofmt for Go files -if exists('g:loaded_ale_linters_go_gofmt') - finish -endif - -let g:loaded_ale_linters_go_gofmt = 1 - call ale#linter#Define('go', { \ 'name': 'gofmt', \ 'output_stream': 'stderr', @@ -14,4 +8,3 @@ call ale#linter#Define('go', { \ 'command': g:ale#util#stdin_wrapper . ' .go gofmt -e', \ 'callback': 'ale#handlers#HandleUnixFormatAsError', \}) - diff --git a/ale_linters/go/golint.vim b/ale_linters/go/golint.vim index 25787e0e..5329e334 100644 --- a/ale_linters/go/golint.vim +++ b/ale_linters/go/golint.vim @@ -1,12 +1,6 @@ " Author: neersighted " Description: golint for Go files -if exists('g:loaded_ale_linters_go_golint') - finish -endif - -let g:loaded_ale_linters_go_golint = 1 - call ale#linter#Define('go', { \ 'name': 'golint', \ 'executable': 'golint', diff --git a/ale_linters/go/govet.vim b/ale_linters/go/govet.vim index 9db39ead..6153caa8 100644 --- a/ale_linters/go/govet.vim +++ b/ale_linters/go/govet.vim @@ -1,12 +1,6 @@ " Author: neersighted " Description: go vet for Go files -if exists('g:loaded_ale_linters_go_govet') - finish -endif - -let g:loaded_ale_linters_go_govet = 1 - call ale#linter#Define('go', { \ 'name': 'go vet', \ 'output_stream': 'stderr', @@ -14,4 +8,3 @@ call ale#linter#Define('go', { \ 'command': g:ale#util#stdin_wrapper . ' .go go vet', \ 'callback': 'ale#handlers#HandleUnixFormatAsError', \}) - diff --git a/ale_linters/haskell/ghc.vim b/ale_linters/haskell/ghc.vim index 29aef123..82bf061b 100644 --- a/ale_linters/haskell/ghc.vim +++ b/ale_linters/haskell/ghc.vim @@ -1,12 +1,6 @@ " Author: w0rp " Description: ghc for Haskell files -if exists('g:loaded_ale_linters_haskell_ghc') - finish -endif - -let g:loaded_ale_linters_haskell_ghc = 1 - call ale#linter#Define('haskell', { \ 'name': 'ghc', \ 'output_stream': 'stderr', diff --git a/ale_linters/haskell/hlint.vim b/ale_linters/haskell/hlint.vim index a12f75f1..f698d5b4 100644 --- a/ale_linters/haskell/hlint.vim +++ b/ale_linters/haskell/hlint.vim @@ -1,12 +1,6 @@ " Author: jparoz " Description: hlint for Haskell files -if exists('g:loaded_ale_linters_haskell_hlint') - finish -endif - -let g:loaded_ale_linters_haskell_hlint = 1 - function! ale_linters#haskell#hlint#Handle(buffer, lines) let l:errors = json_decode(join(a:lines, '')) diff --git a/ale_linters/html/htmlhint.vim b/ale_linters/html/htmlhint.vim index dedf606e..649c523a 100644 --- a/ale_linters/html/htmlhint.vim +++ b/ale_linters/html/htmlhint.vim @@ -1,12 +1,6 @@ " Author: KabbAmine " Description: HTMLHint for checking html files -if exists('g:loaded_ale_linters_html_htmlhint') - finish -endif - -let g:loaded_ale_linters_html_htmlhint = 1 - call ale#linter#Define('html', { \ 'name': 'htmlhint', \ 'executable': 'htmlhint', diff --git a/ale_linters/html/tidy.vim b/ale_linters/html/tidy.vim index a4e12aec..53520347 100644 --- a/ale_linters/html/tidy.vim +++ b/ale_linters/html/tidy.vim @@ -1,12 +1,6 @@ " Author: KabbAmine " Description: This file adds support for checking HTML code with tidy. -if exists('g:loaded_ale_linters_html_tidy') - finish -endif - -let g:loaded_ale_linters_html_tidy = 1 - " CLI options let g:ale_html_tidy_executable = get(g:, 'ale_html_tidy_executable', 'tidy') let g:ale_html_tidy_args = get(g:, 'ale_html_tidy_args', '-q -e -language en') diff --git a/ale_linters/javascript/eslint.vim b/ale_linters/javascript/eslint.vim index d57b84ad..e93113d4 100644 --- a/ale_linters/javascript/eslint.vim +++ b/ale_linters/javascript/eslint.vim @@ -1,12 +1,6 @@ " Author: w0rp " Description: eslint for JavaScript files -if exists('g:loaded_ale_linters_javascript_eslint') - finish -endif - -let g:loaded_ale_linters_javascript_eslint = 1 - let g:ale_javascript_eslint_executable = \ get(g:, 'ale_javascript_eslint_executable', 'eslint') diff --git a/ale_linters/javascript/jscs.vim b/ale_linters/javascript/jscs.vim index bddee240..52710bac 100644 --- a/ale_linters/javascript/jscs.vim +++ b/ale_linters/javascript/jscs.vim @@ -1,12 +1,6 @@ " Author: Chris Kyrouac - https://github.com/fijshion " Description: jscs for JavaScript files -if exists('g:loaded_ale_linters_javascript_jscs') - finish -endif - -let g:loaded_ale_linters_javascript_jscs = 1 - call ale#linter#Define('javascript', { \ 'name': 'jscs', \ 'executable': 'jscs', diff --git a/ale_linters/javascript/jshint.vim b/ale_linters/javascript/jshint.vim index a2ef5ae2..327158a8 100644 --- a/ale_linters/javascript/jshint.vim +++ b/ale_linters/javascript/jshint.vim @@ -1,12 +1,6 @@ " Author: Chris Kyrouac - https://github.com/fijshion " Description: JSHint for Javascript files -if exists('g:loaded_ale_linters_javascript_jshint') - finish -endif - -let g:loaded_ale_linters_javascript_jshint = 1 - let g:ale_javascript_jshint_executable = \ get(g:, 'ale_javascript_jshint_executable', 'jshint') diff --git a/ale_linters/json/jsonlint.vim b/ale_linters/json/jsonlint.vim index cfbe9c7d..ca9a06c4 100644 --- a/ale_linters/json/jsonlint.vim +++ b/ale_linters/json/jsonlint.vim @@ -1,11 +1,5 @@ " Author: KabbAmine -if exists('g:loaded_ale_linters_json_jsonlint') - finish -endif - -let g:loaded_ale_linters_json_jsonlint = 1 - function! ale_linters#json#jsonlint#Handle(buffer, lines) " Matches patterns like the following: " line 2, col 15, found: 'STRING' - expected: 'EOF', '}', ',', ']'. diff --git a/ale_linters/lua/luacheck.vim b/ale_linters/lua/luacheck.vim index 11638ad3..9036c317 100644 --- a/ale_linters/lua/luacheck.vim +++ b/ale_linters/lua/luacheck.vim @@ -1,12 +1,6 @@ " Author: Sol Bekic https://github.com/s-ol " Description: luacheck linter for lua files -if exists('g:loaded_ale_linters_lua_luacheck') - finish -endif - -let g:loaded_ale_linters_lua_luacheck = 1 - let g:ale_lua_luacheck_executable = \ get(g:, 'ale_lua_luacheck_executable', 'luacheck') diff --git a/ale_linters/perl/perl.vim b/ale_linters/perl/perl.vim index 5b35803c..28cf787e 100644 --- a/ale_linters/perl/perl.vim +++ b/ale_linters/perl/perl.vim @@ -1,11 +1,6 @@ " Author: Vincent Lequertier " Description: This file adds support for checking perl syntax -if exists('g:loaded_ale_linters_perl_perlcritic') - finish -endif - -let g:loaded_ale_linters_perl_perl = 1 function! ale_linters#perl#perl#Handle(buffer, lines) let l:pattern = '\(.\+\) at \(.\+\) line \(\d\+\)' let l:output = [] diff --git a/ale_linters/perl/perlcritic.vim b/ale_linters/perl/perlcritic.vim index 8e29a574..eae8b14d 100644 --- a/ale_linters/perl/perlcritic.vim +++ b/ale_linters/perl/perlcritic.vim @@ -1,11 +1,6 @@ " Author: Vincent Lequertier " Description: This file adds support for checking perl with perl critic -if exists('g:loaded_ale_linters_perl_perlcritic') - finish -endif - -let g:loaded_ale_linters_perl_perlcritic = 1 function! ale_linters#perl#perlcritic#Handle(buffer, lines) let l:pattern = '\(.\+\) at \(.\+\) line \(\d\+\)' let l:output = [] diff --git a/ale_linters/php/php.vim b/ale_linters/php/php.vim index 21288428..cbbd088d 100644 --- a/ale_linters/php/php.vim +++ b/ale_linters/php/php.vim @@ -1,12 +1,6 @@ " Author: Spencer Wood " Description: This file adds support for checking PHP with php-cli -if exists('g:loaded_ale_linters_php_php') - finish -endif - -let g:loaded_ale_linters_php_php = 1 - function! ale_linters#php#php#Handle(buffer, lines) " Matches patterns like the following: " diff --git a/ale_linters/php/phpcs.vim b/ale_linters/php/phpcs.vim index a028964d..6e64d30e 100644 --- a/ale_linters/php/phpcs.vim +++ b/ale_linters/php/phpcs.vim @@ -1,12 +1,6 @@ " Author: jwilliams108 " Description: phpcs for PHP files -if exists('g:loaded_ale_linters_php_phpcs') - finish -endif - -let g:loaded_ale_linters_php_phpcs = 1 - function! ale_linters#php#phpcs#GetCommand(buffer) let l:command = 'phpcs -s --report=emacs --stdin-path=%s' diff --git a/ale_linters/pug/puglint.vim b/ale_linters/pug/puglint.vim index be1be190..338cb05f 100644 --- a/ale_linters/pug/puglint.vim +++ b/ale_linters/pug/puglint.vim @@ -1,12 +1,6 @@ " Author: w0rp - " Description: pug-lint for checking Pug/Jade files. -if exists('g:loaded_ale_linters_pug_puglint') - finish -endif - -let g:loaded_ale_linters_pug_puglint = 1 - call ale#linter#Define('pug', { \ 'name': 'puglint', \ 'executable': 'pug-lint', diff --git a/ale_linters/python/flake8.vim b/ale_linters/python/flake8.vim index bf7c1a16..abee9691 100644 --- a/ale_linters/python/flake8.vim +++ b/ale_linters/python/flake8.vim @@ -1,12 +1,6 @@ " Author: w0rp " Description: flake8 for python files -if exists('g:loaded_ale_linters_python_flake8') - finish -endif - -let g:loaded_ale_linters_python_flake8 = 1 - call ale#linter#Define('python', { \ 'name': 'flake8', \ 'executable': 'flake8', diff --git a/ale_linters/ruby/rubocop.vim b/ale_linters/ruby/rubocop.vim index 7c90cdf5..fcc6f8bd 100644 --- a/ale_linters/ruby/rubocop.vim +++ b/ale_linters/ruby/rubocop.vim @@ -1,12 +1,6 @@ " Author: ynonp - https://github.com/ynonp " Description: rubocop for Ruby files -if exists('g:loaded_ale_linters_ruby_rubocop') - finish -endif - -let g:loaded_ale_linters_ruby_rubocop = 1 - function! ale_linters#ruby#rubocop#Handle(buffer, lines) " Matches patterns line the following: " diff --git a/ale_linters/sass/sasslint.vim b/ale_linters/sass/sasslint.vim index eb14ba9c..8c497edf 100644 --- a/ale_linters/sass/sasslint.vim +++ b/ale_linters/sass/sasslint.vim @@ -1,11 +1,5 @@ " Author: KabbAmine - https://github.com/KabbAmine -if exists('g:loaded_ale_linters_sass_sasslint') - finish -endif - -let g:loaded_ale_linters_sass_sasslint = 1 - call ale#linter#Define('sass', { \ 'name': 'sasslint', \ 'executable': 'sass-lint', diff --git a/ale_linters/scala/scalac.vim b/ale_linters/scala/scalac.vim index 648e3460..ea13bbd6 100644 --- a/ale_linters/scala/scalac.vim +++ b/ale_linters/scala/scalac.vim @@ -2,12 +2,6 @@ " Author: Zoltan Kalmar - https://github.com/kalmiz " Description: Basic scala support using scalac -if exists('g:loaded_ale_linters_scala_scalac') - finish -endif - -let g:loaded_ale_linters_scala_scalac = 1 - function! ale_linters#scala#scalac#Handle(buffer, lines) " Matches patterns line the following: " diff --git a/ale_linters/scss/sasslint.vim b/ale_linters/scss/sasslint.vim index c0dd09c8..0b78f3b0 100644 --- a/ale_linters/scss/sasslint.vim +++ b/ale_linters/scss/sasslint.vim @@ -1,11 +1,5 @@ " Author: KabbAmine - https://github.com/KabbAmine -if exists('g:loaded_ale_linters_scss_sasslint') - finish -endif - -let g:loaded_ale_linters_scss_sasslint = 1 - call ale#linter#Define('scss', { \ 'name': 'sasslint', \ 'executable': 'sass-lint', diff --git a/ale_linters/scss/scsslint.vim b/ale_linters/scss/scsslint.vim index e7541bb2..399082fa 100644 --- a/ale_linters/scss/scsslint.vim +++ b/ale_linters/scss/scsslint.vim @@ -1,12 +1,6 @@ " Author: w0rp " Description: This file add scsslint support for SCSS support -if exists('g:loaded_ale_linters_scss_scsslint') - finish -endif - -let g:loaded_ale_linters_scss_scsslint = 1 - function! ale_linters#scss#scsslint#Handle(buffer, lines) " Matches patterns like the following: " diff --git a/ale_linters/sh/shell.vim b/ale_linters/sh/shell.vim index 9866309e..f996f7e1 100644 --- a/ale_linters/sh/shell.vim +++ b/ale_linters/sh/shell.vim @@ -1,12 +1,6 @@ " Author: w0rp " Description: Lints sh files using bash -n -if exists('g:loaded_ale_linters_sh_shell') - finish -endif - -let g:loaded_ale_linters_sh_shell = 1 - " This option can be changed to change the default shell when the shell " cannot be taken from the hashbang line. if !exists('g:ale_linters_sh_shell_default_shell') diff --git a/ale_linters/sh/shellcheck.vim b/ale_linters/sh/shellcheck.vim index 82ca5947..3fdad5f2 100644 --- a/ale_linters/sh/shellcheck.vim +++ b/ale_linters/sh/shellcheck.vim @@ -2,12 +2,6 @@ " Description: This file adds support for using the shellcheck linter with " shell scripts. -if exists('g:loaded_ale_linters_sh_shellcheck') - finish -endif - -let g:loaded_ale_linters_sh_shellcheck = 1 - " This global variable can be set with a string of comma-seperated error " codes to exclude from shellcheck. For example: " diff --git a/ale_linters/testft/testlinter.vim b/ale_linters/testft/testlinter.vim new file mode 100644 index 00000000..65e0b205 --- /dev/null +++ b/ale_linters/testft/testlinter.vim @@ -0,0 +1,10 @@ +" Author: neersighted +" Description: dummy linter to use in tests + +call ale#linter#Define('testft', { +\ 'name': 'testlinter', +\ 'output_stream': 'stdout', +\ 'executable': 'testlinter', +\ 'command': 'testlinter', +\ 'callback': 'testCB', +\}) diff --git a/ale_linters/typescript/tslint.vim b/ale_linters/typescript/tslint.vim index d0e5ee0b..04863e20 100644 --- a/ale_linters/typescript/tslint.vim +++ b/ale_linters/typescript/tslint.vim @@ -1,12 +1,6 @@ " Author: Prashanth Chandra https://github.com/prashcr " Description: tslint for TypeScript files -if exists('g:loaded_ale_linters_typescript_tslint') - finish -endif - -let g:loaded_ale_linters_typescript_tslint = 1 - function! ale_linters#typescript#tslint#Handle(buffer, lines) " Matches patterns like the following: " diff --git a/ale_linters/verilog/iverilog.vim b/ale_linters/verilog/iverilog.vim index ec37df14..97d4a1f1 100644 --- a/ale_linters/verilog/iverilog.vim +++ b/ale_linters/verilog/iverilog.vim @@ -1,12 +1,6 @@ " Author: Masahiro H https://github.com/mshr-h " Description: iverilog for verilog files -if exists('g:loaded_ale_linters_verilog_iverilog') - finish -endif - -let g:loaded_ale_linters_verilog_iverilog = 1 - function! ale_linters#verilog#iverilog#Handle(buffer, lines) " Look for lines like the following. " diff --git a/ale_linters/verilog/verilator.vim b/ale_linters/verilog/verilator.vim index 4fd0a295..440edeca 100644 --- a/ale_linters/verilog/verilator.vim +++ b/ale_linters/verilog/verilator.vim @@ -1,12 +1,6 @@ " Author: Masahiro H https://github.com/mshr-h " Description: verilator for verilog files -if exists('g:loaded_ale_linters_verilog_verilator') - finish -endif - -let g:loaded_ale_linters_verilog_verilator = 1 - function! ale_linters#verilog#verilator#Handle(buffer, lines) " Look for lines like the following. " diff --git a/ale_linters/vim/vint.vim b/ale_linters/vim/vint.vim index c23574ac..c25d899c 100644 --- a/ale_linters/vim/vint.vim +++ b/ale_linters/vim/vint.vim @@ -1,12 +1,6 @@ " Author: w0rp , KabbAmine " Description: This file adds support for checking Vim code with Vint. -if exists('g:loaded_ale_linters_vim_vint') - finish -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) diff --git a/ale_linters/yaml/yamllint.vim b/ale_linters/yaml/yamllint.vim index 694d5115..a541a83d 100644 --- a/ale_linters/yaml/yamllint.vim +++ b/ale_linters/yaml/yamllint.vim @@ -1,11 +1,5 @@ " Author: KabbAmine -if exists('g:loaded_ale_linters_yaml_yamllint') - finish -endif - -let g:loaded_ale_linters_yaml_yamllint = 1 - function! ale_linters#yaml#yamllint#Handle(buffer, lines) " Matches patterns line the following: " something.yaml:1:1: [warning] missing document start "---" (document-start) -- cgit v1.2.3