Compare commits

..

4 Commits

Author SHA1 Message Date
w0rp
c7a9ffcb9c Fix #1298 - Escape commands for PowerShell 2018-02-25 14:23:08 +00:00
w0rp
af1b881c8b Merge pull request #1322 from datanoise/master
fixed rust errors parsing
2018-01-29 13:55:14 +00:00
w0rp
80e973a29e Merge pull request #1256 from jonatanolofsson/master
Fix #1255: Move extra clang-check args to before user options
2018-01-12 12:10:04 +00:00
w0rp
2381b7afe8 Merge pull request #1254 from bkhl/master
Don't use temporary file for rustfmt fixer
2018-01-02 13:36:59 +00:00
181 changed files with 260 additions and 4010 deletions

View File

@@ -1,4 +1,4 @@
Copyright (c) 2016-2018, w0rp <devw0rp@gmail.com> Copyright (c) 2016-2017, w0rp <devw0rp@gmail.com>
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without

View File

@@ -1,4 +1,4 @@
# Asynchronous Lint Engine [![Travis CI Build Status](https://travis-ci.org/w0rp/ale.svg?branch=master)](https://travis-ci.org/w0rp/ale) [![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/r0ef1xu8xjmik58d/branch/master?svg=true)](https://ci.appveyor.com/project/w0rp/ale) # Asynchronous Lint Engine [![Travis CI Build Status](https://travis-ci.org/w0rp/ale.svg?branch=master)](https://travis-ci.org/w0rp/ale) [![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/w0rp/ale?svg=true)](https://ci.appveyor.com/project/w0rp/ale)
![ALE Logo by Mark Grealish - https://www.bhalash.com/](img/logo.jpg?raw=true) ![ALE Logo by Mark Grealish - https://www.bhalash.com/](img/logo.jpg?raw=true)
@@ -48,7 +48,6 @@ formatting tools, and some Language Server Protocol and `tsserver` features.
13. [Will this plugin eat all of my laptop battery power?](#faq-my-battery-is-sad) 13. [Will this plugin eat all of my laptop battery power?](#faq-my-battery-is-sad)
14. [How can I configure my C or C++ project?](#faq-c-configuration) 14. [How can I configure my C or C++ project?](#faq-c-configuration)
15. [How can I configure ALE differently for different buffers?](#faq-buffer-configuration) 15. [How can I configure ALE differently for different buffers?](#faq-buffer-configuration)
16. [How can I configure the height of the list in which ALE displays errors?](#faq-list-window-height)
<a name="supported-languages"></a> <a name="supported-languages"></a>
@@ -80,8 +79,8 @@ formatting.
| Awk | [gawk](https://www.gnu.org/software/gawk/)| | Awk | [gawk](https://www.gnu.org/software/gawk/)|
| Bash | shell [-n flag](https://www.gnu.org/software/bash/manual/bash.html#index-set), [shellcheck](https://www.shellcheck.net/), [shfmt](https://github.com/mvdan/sh) | | Bash | shell [-n flag](https://www.gnu.org/software/bash/manual/bash.html#index-set), [shellcheck](https://www.shellcheck.net/), [shfmt](https://github.com/mvdan/sh) |
| Bourne Shell | shell [-n flag](http://linux.die.net/man/1/sh), [shellcheck](https://www.shellcheck.net/), [shfmt](https://github.com/mvdan/sh) | | Bourne Shell | shell [-n flag](http://linux.die.net/man/1/sh), [shellcheck](https://www.shellcheck.net/), [shfmt](https://github.com/mvdan/sh) |
| C | [cppcheck](http://cppcheck.sourceforge.net), [cpplint](https://github.com/google/styleguide/tree/gh-pages/cpplint), [clang](http://clang.llvm.org/), [clangtidy](http://clang.llvm.org/extra/clang-tidy/) !!, [clang-format](https://clang.llvm.org/docs/ClangFormat.html), [flawfinder](https://www.dwheeler.com/flawfinder/), [gcc](https://gcc.gnu.org/) | | C | [cppcheck](http://cppcheck.sourceforge.net), [cpplint](https://github.com/google/styleguide/tree/gh-pages/cpplint), [gcc](https://gcc.gnu.org/), [clang](http://clang.llvm.org/), [clangtidy](http://clang.llvm.org/extra/clang-tidy/) !!, [clang-format](https://clang.llvm.org/docs/ClangFormat.html)|
| C++ (filetype cpp) | [clang](http://clang.llvm.org/), [clangcheck](http://clang.llvm.org/docs/ClangCheck.html) !!, [clangtidy](http://clang.llvm.org/extra/clang-tidy/) !!, [clang-format](https://clang.llvm.org/docs/ClangFormat.html), [cppcheck](http://cppcheck.sourceforge.net), [cpplint](https://github.com/google/styleguide/tree/gh-pages/cpplint) !!, [flawfinder](https://www.dwheeler.com/flawfinder/), [gcc](https://gcc.gnu.org/) | | C++ (filetype cpp) | [clang](http://clang.llvm.org/), [clangcheck](http://clang.llvm.org/docs/ClangCheck.html) !!, [clangtidy](http://clang.llvm.org/extra/clang-tidy/) !!, [clang-format](https://clang.llvm.org/docs/ClangFormat.html), [cppcheck](http://cppcheck.sourceforge.net), [cpplint](https://github.com/google/styleguide/tree/gh-pages/cpplint) !!, [gcc](https://gcc.gnu.org/) |
| CUDA | [nvcc](http://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html) | | CUDA | [nvcc](http://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html) |
| C# | [mcs](http://www.mono-project.com/docs/about-mono/languages/csharp/) see:`help ale-cs-mcs` for details, [mcsc](http://www.mono-project.com/docs/about-mono/languages/csharp/) !! see:`help ale-cs-mcsc` for details and configuration| | C# | [mcs](http://www.mono-project.com/docs/about-mono/languages/csharp/) see:`help ale-cs-mcs` for details, [mcsc](http://www.mono-project.com/docs/about-mono/languages/csharp/) !! see:`help ale-cs-mcsc` for details and configuration|
| Chef | [foodcritic](http://www.foodcritic.io/) | | Chef | [foodcritic](http://www.foodcritic.io/) |
@@ -94,19 +93,16 @@ formatting.
| D | [dmd](https://dlang.org/dmd-linux.html) | | D | [dmd](https://dlang.org/dmd-linux.html) |
| Dafny | [dafny](https://rise4fun.com/Dafny) !! | | Dafny | [dafny](https://rise4fun.com/Dafny) !! |
| Dart | [dartanalyzer](https://github.com/dart-lang/sdk/tree/master/pkg/analyzer_cli) !!, [language_server](https://github.com/natebosch/dart_language_server) | | Dart | [dartanalyzer](https://github.com/dart-lang/sdk/tree/master/pkg/analyzer_cli) !!, [language_server](https://github.com/natebosch/dart_language_server) |
| Dockerfile | [hadolint](https://github.com/hadolint/hadolint) | | Dockerfile | [hadolint](https://github.com/lukasmartinelli/hadolint) |
| Elixir | [credo](https://github.com/rrrene/credo), [dialyxir](https://github.com/jeremyjh/dialyxir), [dogma](https://github.com/lpil/dogma) !!| | Elixir | [credo](https://github.com/rrrene/credo), [dogma](https://github.com/lpil/dogma) !! |
| Elm | [elm-format](https://github.com/avh4/elm-format), [elm-make](https://github.com/elm-lang/elm-make) | | Elm | [elm-format](https://github.com/avh4/elm-format), [elm-make](https://github.com/elm-lang/elm-make) |
| Erb | [erb](https://apidock.com/ruby/ERB), [erubi](https://github.com/jeremyevans/erubi), [erubis](https://github.com/kwatch/erubis) | | Erb | [erb](https://github.com/jeremyevans/erubi), [erubis](https://github.com/kwatch/erubis) |
| Erlang | [erlc](http://erlang.org/doc/man/erlc.html), [SyntaxErl](https://github.com/ten0s/syntaxerl) | | Erlang | [erlc](http://erlang.org/doc/man/erlc.html), [SyntaxErl](https://github.com/ten0s/syntaxerl) |
| Fish | fish [-n flag](https://linux.die.net/man/1/fish)
| Fortran | [gcc](https://gcc.gnu.org/) | | Fortran | [gcc](https://gcc.gnu.org/) |
| Fountain | [proselint](http://proselint.com/) |
| FusionScript | [fusion-lint](https://github.com/RyanSquared/fusionscript) | | FusionScript | [fusion-lint](https://github.com/RyanSquared/fusionscript) |
| Git Commit Messages | [gitlint](https://github.com/jorisroovers/gitlint) |
| GLSL | [glslang](https://github.com/KhronosGroup/glslang), [glslls](https://github.com/svenstaro/glsl-language-server) | | GLSL | [glslang](https://github.com/KhronosGroup/glslang), [glslls](https://github.com/svenstaro/glsl-language-server) |
| Go | [gofmt](https://golang.org/cmd/gofmt/), [goimports](https://godoc.org/golang.org/x/tools/cmd/goimports), [go vet](https://golang.org/cmd/vet/) !!, [golint](https://godoc.org/github.com/golang/lint), [gotype](https://godoc.org/golang.org/x/tools/cmd/gotype) !!, [gometalinter](https://github.com/alecthomas/gometalinter) !!, [go build](https://golang.org/cmd/go/) !!, [gosimple](https://github.com/dominikh/go-tools/tree/master/cmd/gosimple) !!, [staticcheck](https://github.com/dominikh/go-tools/tree/master/cmd/staticcheck) !! | | Go | [gofmt](https://golang.org/cmd/gofmt/), [goimports](https://godoc.org/golang.org/x/tools/cmd/goimports), [go vet](https://golang.org/cmd/vet/), [golint](https://godoc.org/github.com/golang/lint), [gometalinter](https://github.com/alecthomas/gometalinter) !!, [go build](https://golang.org/cmd/go/) !!, [gosimple](https://github.com/dominikh/go-tools/tree/master/cmd/gosimple) !!, [staticcheck](https://github.com/dominikh/go-tools/tree/master/cmd/staticcheck) !! |
| GraphQL | [eslint](http://eslint.org/), [gqlint](https://github.com/happylinks/gqlint), [prettier](https://github.com/prettier/prettier) | | GraphQL | [eslint](http://eslint.org/), [gqlint](https://github.com/happylinks/gqlint) |
| Haml | [haml-lint](https://github.com/brigade/haml-lint) | | Haml | [haml-lint](https://github.com/brigade/haml-lint) |
| Handlebars | [ember-template-lint](https://github.com/rwjblue/ember-template-lint) | | Handlebars | [ember-template-lint](https://github.com/rwjblue/ember-template-lint) |
| Haskell | [brittany](https://github.com/lspitzner/brittany), [ghc](https://www.haskell.org/ghc/), [stack-ghc](https://haskellstack.org/), [stack-build](https://haskellstack.org/) !!, [ghc-mod](https://github.com/DanielG/ghc-mod), [stack-ghc-mod](https://github.com/DanielG/ghc-mod), [hlint](https://hackage.haskell.org/package/hlint), [hdevtools](https://hackage.haskell.org/package/hdevtools), [hfmt](https://github.com/danstiner/hfmt) | | Haskell | [brittany](https://github.com/lspitzner/brittany), [ghc](https://www.haskell.org/ghc/), [stack-ghc](https://haskellstack.org/), [stack-build](https://haskellstack.org/) !!, [ghc-mod](https://github.com/DanielG/ghc-mod), [stack-ghc-mod](https://github.com/DanielG/ghc-mod), [hlint](https://hackage.haskell.org/package/hlint), [hdevtools](https://hackage.haskell.org/package/hdevtools), [hfmt](https://github.com/danstiner/hfmt) |
@@ -114,15 +110,15 @@ formatting.
| Idris | [idris](http://www.idris-lang.org/) | | Idris | [idris](http://www.idris-lang.org/) |
| Java | [checkstyle](http://checkstyle.sourceforge.net), [javac](http://www.oracle.com/technetwork/java/javase/downloads/index.html), [google-java-format](https://github.com/google/google-java-format) | | Java | [checkstyle](http://checkstyle.sourceforge.net), [javac](http://www.oracle.com/technetwork/java/javase/downloads/index.html), [google-java-format](https://github.com/google/google-java-format) |
| JavaScript | [eslint](http://eslint.org/), [flow](https://flowtype.org/), [jscs](http://jscs.info/), [jshint](http://jshint.com/), [prettier](https://github.com/prettier/prettier), [prettier-eslint](https://github.com/prettier/prettier-eslint), [prettier-standard](https://github.com/sheerun/prettier-standard), [standard](http://standardjs.com/), [xo](https://github.com/sindresorhus/xo) | JavaScript | [eslint](http://eslint.org/), [flow](https://flowtype.org/), [jscs](http://jscs.info/), [jshint](http://jshint.com/), [prettier](https://github.com/prettier/prettier), [prettier-eslint](https://github.com/prettier/prettier-eslint), [prettier-standard](https://github.com/sheerun/prettier-standard), [standard](http://standardjs.com/), [xo](https://github.com/sindresorhus/xo)
| JSON | [fixjson](https://github.com/rhysd/fixjson), [jsonlint](http://zaa.ch/jsonlint/), [jq](https://stedolan.github.io/jq/), [prettier](https://github.com/prettier/prettier) | | JSON | [jsonlint](http://zaa.ch/jsonlint/), [prettier](https://github.com/prettier/prettier) |
| Kotlin | [kotlinc](https://kotlinlang.org) !!, [ktlint](https://ktlint.github.io) !! see `:help ale-integration-kotlin` for configuration instructions | | Kotlin | [kotlinc](https://kotlinlang.org) !!, [ktlint](https://ktlint.github.io) !! see `:help ale-integration-kotlin` for configuration instructions |
| LaTeX | [alex](https://github.com/wooorm/alex) !!, [chktex](http://www.nongnu.org/chktex/), [lacheck](https://www.ctan.org/pkg/lacheck), [proselint](http://proselint.com/), [redpen](http://redpen.cc/), [vale](https://github.com/ValeLint/vale), [write-good](https://github.com/btford/write-good) | | LaTeX | [alex](https://github.com/wooorm/alex) !!, [chktex](http://www.nongnu.org/chktex/), [lacheck](https://www.ctan.org/pkg/lacheck), [proselint](http://proselint.com/), [redpen](http://redpen.cc/), [vale](https://github.com/ValeLint/vale), [write-good](https://github.com/btford/write-good) |
| Less | [lessc](https://www.npmjs.com/package/less), [prettier](https://github.com/prettier/prettier), [stylelint](https://github.com/stylelint/stylelint) | | Less | [lessc](https://www.npmjs.com/package/less), [prettier](https://github.com/prettier/prettier), [stylelint](https://github.com/stylelint/stylelint) |
| LLVM | [llc](https://llvm.org/docs/CommandGuide/llc.html) | | LLVM | [llc](https://llvm.org/docs/CommandGuide/llc.html) |
| Lua | [luac](https://www.lua.org/manual/5.1/luac.html), [luacheck](https://github.com/mpeterv/luacheck) | | Lua | [luacheck](https://github.com/mpeterv/luacheck) |
| Mail | [alex](https://github.com/wooorm/alex) !!, [proselint](http://proselint.com/), [vale](https://github.com/ValeLint/vale) | | Mail | [alex](https://github.com/wooorm/alex) !!, [proselint](http://proselint.com/), [vale](https://github.com/ValeLint/vale) |
| Make | [checkmake](https://github.com/mrtazz/checkmake) | | Make | [checkmake](https://github.com/mrtazz/checkmake) |
| Markdown | [alex](https://github.com/wooorm/alex) !!, [markdownlint](https://github.com/DavidAnson/markdownlint) !!, [mdl](https://github.com/mivok/markdownlint), [prettier](https://github.com/prettier/prettier), [proselint](http://proselint.com/), [redpen](http://redpen.cc/), [remark-lint](https://github.com/wooorm/remark-lint) !!, [textlint](https://textlint.github.io/), [vale](https://github.com/ValeLint/vale), [write-good](https://github.com/btford/write-good) | | Markdown | [alex](https://github.com/wooorm/alex) !!, [mdl](https://github.com/mivok/markdownlint), [proselint](http://proselint.com/), [redpen](http://redpen.cc/), [remark-lint](https://github.com/wooorm/remark-lint) !!, [vale](https://github.com/ValeLint/vale), [write-good](https://github.com/btford/write-good) |
| MATLAB | [mlint](https://www.mathworks.com/help/matlab/ref/mlint.html) | | MATLAB | [mlint](https://www.mathworks.com/help/matlab/ref/mlint.html) |
| Nim | [nim check](https://nim-lang.org/docs/nimc.html) !! | | Nim | [nim check](https://nim-lang.org/docs/nimc.html) !! |
| nix | [nix-instantiate](http://nixos.org/nix/manual/#sec-nix-instantiate) | | nix | [nix-instantiate](http://nixos.org/nix/manual/#sec-nix-instantiate) |
@@ -131,21 +127,18 @@ formatting.
| Objective-C++ | [clang](http://clang.llvm.org/) | | Objective-C++ | [clang](http://clang.llvm.org/) |
| OCaml | [merlin](https://github.com/the-lambda-church/merlin) see `:help ale-ocaml-merlin` for configuration instructions, [ols](https://github.com/freebroccolo/ocaml-language-server) | | OCaml | [merlin](https://github.com/the-lambda-church/merlin) see `:help ale-ocaml-merlin` for configuration instructions, [ols](https://github.com/freebroccolo/ocaml-language-server) |
| Perl | [perl -c](https://perl.org/), [perl-critic](https://metacpan.org/pod/Perl::Critic) | | Perl | [perl -c](https://perl.org/), [perl-critic](https://metacpan.org/pod/Perl::Critic) |
| PHP | [hack](http://hacklang.org/), [hackfmt](https://github.com/facebook/flow/tree/master/hack/hackfmt), [langserver](https://github.com/felixfbecker/php-language-server), [phan](https://github.com/phan/phan) see `:help ale-php-phan` to instructions, [php -l](https://secure.php.net/), [phpcs](https://github.com/squizlabs/PHP_CodeSniffer), [phpmd](https://phpmd.org), [phpstan](https://github.com/phpstan/phpstan), [phpcbf](https://github.com/squizlabs/PHP_CodeSniffer), [php-cs-fixer](http://cs.sensiolabs.org/) | | PHP | [hack](http://hacklang.org/), [hackfmt](https://github.com/facebook/flow/tree/master/hack/hackfmt), [langserver](https://github.com/felixfbecker/php-language-server), [phan](https://github.com/phan/phan) see `:help ale-php-phan` to instructions, [php -l](https://secure.php.net/), [phpcs](https://github.com/squizlabs/PHP_CodeSniffer), [phpmd](https://phpmd.org), [phpstan](https://github.com/phpstan/phpstan), [phpcbf](https://github.com/squizlabs/PHP_CodeSniffer) |
| PO | [alex](https://github.com/wooorm/alex) !!, [msgfmt](https://www.gnu.org/software/gettext/manual/html_node/msgfmt-Invocation.html), [proselint](http://proselint.com/), [write-good](https://github.com/btford/write-good) |
| Pod | [alex](https://github.com/wooorm/alex) !!, [proselint](http://proselint.com/), [write-good](https://github.com/btford/write-good) | | Pod | [alex](https://github.com/wooorm/alex) !!, [proselint](http://proselint.com/), [write-good](https://github.com/btford/write-good) |
| Pony | [ponyc](https://github.com/ponylang/ponyc) |
| proto | [protoc-gen-lint](https://github.com/ckaznocha/protoc-gen-lint) | | proto | [protoc-gen-lint](https://github.com/ckaznocha/protoc-gen-lint) |
| Pug | [pug-lint](https://github.com/pugjs/pug-lint) | | Pug | [pug-lint](https://github.com/pugjs/pug-lint) |
| Puppet | [puppet](https://puppet.com), [puppet-lint](https://puppet-lint.com) | | Puppet | [puppet](https://puppet.com), [puppet-lint](https://puppet-lint.com) |
| Python | [autopep8](https://github.com/hhatto/autopep8), [flake8](http://flake8.pycqa.org/en/latest/), [isort](https://github.com/timothycrosley/isort), [mypy](http://mypy-lang.org/), [prospector](http://github.com/landscapeio/prospector), [pycodestyle](https://github.com/PyCQA/pycodestyle), [pyls](https://github.com/palantir/python-language-server), [pylint](https://www.pylint.org/) !!, [yapf](https://github.com/google/yapf) | | Python | [autopep8](https://github.com/hhatto/autopep8), [flake8](http://flake8.pycqa.org/en/latest/), [isort](https://github.com/timothycrosley/isort), [mypy](http://mypy-lang.org/), [prospector](http://github.com/landscapeio/prospector), [pycodestyle](https://github.com/PyCQA/pycodestyle), [pyls](https://github.com/palantir/python-language-server), [pylint](https://www.pylint.org/) !!, [yapf](https://github.com/google/yapf) |
| QML | [qmllint](https://github.com/qt/qtdeclarative/tree/5.11/tools/qmllint) |
| R | [lintr](https://github.com/jimhester/lintr) | | R | [lintr](https://github.com/jimhester/lintr) |
| ReasonML | [merlin](https://github.com/the-lambda-church/merlin) see `:help ale-reasonml-ols` for configuration instructions, [ols](https://github.com/freebroccolo/ocaml-language-server), [refmt](https://github.com/reasonml/reason-cli) | | ReasonML | [merlin](https://github.com/the-lambda-church/merlin) see `:help ale-integration-reason-merlin` for configuration instructions, [ols](https://github.com/freebroccolo/ocaml-language-server), [refmt](https://github.com/reasonml/reason-cli) |
| reStructuredText | [alex](https://github.com/wooorm/alex) !!, [proselint](http://proselint.com/), [redpen](http://redpen.cc/), [rstcheck](https://github.com/myint/rstcheck), [vale](https://github.com/ValeLint/vale), [write-good](https://github.com/btford/write-good) | | reStructuredText | [alex](https://github.com/wooorm/alex) !!, [proselint](http://proselint.com/), [redpen](http://redpen.cc/), [rstcheck](https://github.com/myint/rstcheck), [vale](https://github.com/ValeLint/vale), [write-good](https://github.com/btford/write-good) |
| Re:VIEW | [redpen](http://redpen.cc/) | | Re:VIEW | [redpen](http://redpen.cc/) |
| RPM spec | [rpmlint](https://github.com/rpm-software-management/rpmlint) (disabled by default; see `:help ale-integration-spec`) | | RPM spec | [rpmlint](https://github.com/rpm-software-management/rpmlint) (disabled by default; see `:help ale-integration-spec`) |
| Ruby | [brakeman](http://brakemanscanner.org/) !!, [rails_best_practices](https://github.com/flyerhzm/rails_best_practices) !!, [reek](https://github.com/troessner/reek), [rubocop](https://github.com/bbatsov/rubocop), [ruby](https://www.ruby-lang.org), [rufo](https://github.com/ruby-formatter/rufo) | | Ruby | [brakeman](http://brakemanscanner.org/) !!, [rails_best_practices](https://github.com/flyerhzm/rails_best_practices) !!, [reek](https://github.com/troessner/reek), [rubocop](https://github.com/bbatsov/rubocop), [ruby](https://www.ruby-lang.org) |
| Rust | cargo !! (see `:help ale-integration-rust` for configuration instructions), [rls](https://github.com/rust-lang-nursery/rls), [rustc](https://www.rust-lang.org/), [rustfmt](https://github.com/rust-lang-nursery/rustfmt) | | Rust | cargo !! (see `:help ale-integration-rust` for configuration instructions), [rls](https://github.com/rust-lang-nursery/rls), [rustc](https://www.rust-lang.org/), [rustfmt](https://github.com/rust-lang-nursery/rustfmt) |
| SASS | [sass-lint](https://www.npmjs.com/package/sass-lint), [stylelint](https://github.com/stylelint/stylelint) | | SASS | [sass-lint](https://www.npmjs.com/package/sass-lint), [stylelint](https://github.com/stylelint/stylelint) |
| SCSS | [prettier](https://github.com/prettier/prettier), [sass-lint](https://www.npmjs.com/package/sass-lint), [scss-lint](https://github.com/brigade/scss-lint), [stylelint](https://github.com/stylelint/stylelint) | | SCSS | [prettier](https://github.com/prettier/prettier), [sass-lint](https://www.npmjs.com/package/sass-lint), [scss-lint](https://github.com/brigade/scss-lint), [stylelint](https://github.com/stylelint/stylelint) |
@@ -159,13 +152,12 @@ formatting.
| Tcl | [nagelfar](http://nagelfar.sourceforge.net) !! | | Tcl | [nagelfar](http://nagelfar.sourceforge.net) !! |
| Terraform | [tflint](https://github.com/wata727/tflint) | | Terraform | [tflint](https://github.com/wata727/tflint) |
| Texinfo | [alex](https://github.com/wooorm/alex) !!, [proselint](http://proselint.com/), [write-good](https://github.com/btford/write-good)| | Texinfo | [alex](https://github.com/wooorm/alex) !!, [proselint](http://proselint.com/), [write-good](https://github.com/btford/write-good)|
| Text^ | [alex](https://github.com/wooorm/alex) !!, [proselint](http://proselint.com/), [redpen](http://redpen.cc/), [textlint](https://textlint.github.io/), [vale](https://github.com/ValeLint/vale), [write-good](https://github.com/btford/write-good) | | Text^ | [alex](https://github.com/wooorm/alex) !!, [proselint](http://proselint.com/), [vale](https://github.com/ValeLint/vale), [write-good](https://github.com/btford/write-good), [redpen](http://redpen.cc/) |
| Thrift | [thrift](http://thrift.apache.org/) | | Thrift | [thrift](http://thrift.apache.org/) |
| TypeScript | [eslint](http://eslint.org/), [prettier](https://github.com/prettier/prettier), [tslint](https://github.com/palantir/tslint), tsserver, typecheck | | TypeScript | [eslint](http://eslint.org/), [prettier](https://github.com/prettier/prettier), [tslint](https://github.com/palantir/tslint), tsserver, typecheck |
| Verilog | [iverilog](https://github.com/steveicarus/iverilog), [verilator](http://www.veripool.org/projects/verilator/wiki/Intro) | | Verilog | [iverilog](https://github.com/steveicarus/iverilog), [verilator](http://www.veripool.org/projects/verilator/wiki/Intro) |
| Vim | [vint](https://github.com/Kuniwak/vint) | | Vim | [vint](https://github.com/Kuniwak/vint) |
| Vim help^ | [alex](https://github.com/wooorm/alex) !!, [proselint](http://proselint.com/), [write-good](https://github.com/btford/write-good) | | Vim help^ | [alex](https://github.com/wooorm/alex) !!, [proselint](http://proselint.com/), [write-good](https://github.com/btford/write-good) |
| Vue | [prettier](https://github.com/prettier/prettier) |
| XHTML | [alex](https://github.com/wooorm/alex) !!, [proselint](http://proselint.com/), [write-good](https://github.com/btford/write-good) | | XHTML | [alex](https://github.com/wooorm/alex) !!, [proselint](http://proselint.com/), [write-good](https://github.com/btford/write-good) |
| XML | [xmllint](http://xmlsoft.org/xmllint.html) | | XML | [xmllint](http://xmlsoft.org/xmllint.html) |
| YAML | [swaglint](https://github.com/byCedric/swaglint), [yamllint](https://yamllint.readthedocs.io/) | | YAML | [swaglint](https://github.com/byCedric/swaglint), [yamllint](https://yamllint.readthedocs.io/) |
@@ -504,17 +496,15 @@ Will give you:
### 5.viii. How can I execute some code when ALE starts or stops linting? ### 5.viii. How can I execute some code when ALE starts or stops linting?
ALE runs its own [autocmd](http://vimdoc.sourceforge.net/htmldoc/autocmd.html) ALE runs its own [autocmd](http://vimdoc.sourceforge.net/htmldoc/autocmd.html)
events when a lint or fix cycle are started and stopped. These events can be events whenever has a linter is started and has been successfully executed and
used to call arbitrary functions before and after ALE stops linting. processed. These events can be used to call arbitrary functions before and after
ALE stops linting.
```vim ```vim
augroup YourGroup augroup YourGroup
autocmd! autocmd!
autocmd User ALELintPre call YourFunction() autocmd User ALELintPre call YourFunction()
autocmd User ALELintPost call YourFunction() autocmd User ALELintPost call YourFunction()
autocmd User ALEFixPre call YourFunction()
autocmd User ALEFixPost call YourFunction()
augroup END augroup END
``` ```
@@ -581,9 +571,6 @@ let g:ale_open_list = 1
let g:ale_keep_list_window_open = 1 let g:ale_keep_list_window_open = 1
``` ```
You can also set `let g:ale_list_vertical = 1` to open the windows vertically
instead of the default horizontally.
<a name="faq-jsx-stylelint-eslint"></a> <a name="faq-jsx-stylelint-eslint"></a>
### 5.xii. How can I check JSX files with both stylelint and eslint? ### 5.xii. How can I check JSX files with both stylelint and eslint?
@@ -702,14 +689,3 @@ let g:ale_pattern_options_enabled = 1
``` ```
Buffer-local variables for settings always override the global settings. Buffer-local variables for settings always override the global settings.
<a name="faq-list-window-height"></a>
### 5.xvi. How can I configure the height of the list in which ALE displays errors?
To set a default height for the error list, use the `g:ale_list_window_size` variable.
```vim
" Show 5 lines of errors (default: 10)
let g:ale_list_window_size = 5
```

View File

@@ -12,11 +12,7 @@ function! ale_linters#awk#gawk#GetExecutable(buffer) abort
endfunction endfunction
function! ale_linters#awk#gawk#GetCommand(buffer) abort function! ale_linters#awk#gawk#GetCommand(buffer) abort
" note the --source 'BEGIN ...' is to prevent
" gawk from attempting to execute the body of the script
" it is linting.
return ale_linters#awk#gawk#GetExecutable(a:buffer) return ale_linters#awk#gawk#GetExecutable(a:buffer)
\ . " --source 'BEGIN { exit } END { exit 1 }'"
\ . ' ' . ale#Var(a:buffer, 'awk_gawk_options') \ . ' ' . ale#Var(a:buffer, 'awk_gawk_options')
\ . ' ' . '-f %t --lint /dev/null' \ . ' ' . '-f %t --lint /dev/null'
endfunction endfunction
@@ -25,6 +21,6 @@ call ale#linter#Define('awk', {
\ 'name': 'gawk', \ 'name': 'gawk',
\ 'executable_callback': 'ale_linters#awk#gawk#GetExecutable', \ 'executable_callback': 'ale_linters#awk#gawk#GetExecutable',
\ 'command_callback': 'ale_linters#awk#gawk#GetCommand', \ 'command_callback': 'ale_linters#awk#gawk#GetCommand',
\ 'callback': 'ale#handlers#gawk#HandleGawkFormat', \ 'callback': 'ale#handlers#cpplint#HandleCppLintFormat',
\ 'output_stream': 'both' \ 'output_stream': 'both'
\}) \})

View File

@@ -1,31 +0,0 @@
" Author: Christian Gibbons <cgibbons@gmu.edu>
" Description: flawfinder linter for c files
call ale#Set('c_flawfinder_executable', 'flawfinder')
call ale#Set('c_flawfinder_options', '')
call ale#Set('c_flawfinder_minlevel', 1)
call ale#Set('c_flawfinder_error_severity', 6)
function! ale_linters#c#flawfinder#GetExecutable(buffer) abort
return ale#Var(a:buffer, 'c_flawfinder_executable')
endfunction
function! ale_linters#c#flawfinder#GetCommand(buffer) abort
" Set the minimum vulnerability level for flawfinder to bother with
let l:minlevel = ' --minlevel=' . ale#Var(a:buffer, 'c_flawfinder_minlevel')
return ale#Escape(ale_linters#c#flawfinder#GetExecutable(a:buffer))
\ . ' -CDQS'
\ . ale#Var(a:buffer, 'c_flawfinder_options')
\ . l:minlevel
\ . ' %t'
endfunction
call ale#linter#Define('c', {
\ 'name': 'flawfinder',
\ 'output_stream': 'stdout',
\ 'executable_callback': 'ale_linters#c#flawfinder#GetExecutable',
\ 'command_callback': 'ale_linters#c#flawfinder#GetCommand',
\ 'callback': 'ale#handlers#flawfinder#HandleFlawfinderFormat',
\})

View File

@@ -1,31 +0,0 @@
" Author: Christian Gibbons <cgibbons@gmu.edu>
" Description: flawfinder linter for c++ files
call ale#Set('cpp_flawfinder_executable', 'flawfinder')
call ale#Set('cpp_flawfinder_options', '')
call ale#Set('cpp_flawfinder_minlevel', 1)
call ale#Set('c_flawfinder_error_severity', 6)
function! ale_linters#cpp#flawfinder#GetExecutable(buffer) abort
return ale#Var(a:buffer, 'cpp_flawfinder_executable')
endfunction
function! ale_linters#cpp#flawfinder#GetCommand(buffer) abort
" Set the minimum vulnerability level for flawfinder to bother with
let l:minlevel = ' --minlevel=' . ale#Var(a:buffer, 'cpp_flawfinder_minlevel')
return ale#Escape(ale_linters#cpp#flawfinder#GetExecutable(a:buffer))
\ . ' -CDQS'
\ . ale#Var(a:buffer, 'cpp_flawfinder_options')
\ . l:minlevel
\ . ' %t'
endfunction
call ale#linter#Define('cpp', {
\ 'name': 'flawfinder',
\ 'output_stream': 'stdout',
\ 'executable_callback': 'ale_linters#cpp#flawfinder#GetExecutable',
\ 'command_callback': 'ale_linters#cpp#flawfinder#GetCommand',
\ 'callback': 'ale#handlers#flawfinder#HandleFlawfinderFormat',
\})

View File

@@ -10,7 +10,7 @@ function! s:GetWorkingDirectory(buffer) abort
return l:working_directory return l:working_directory
endif endif
return expand('#' . a:buffer . ':p:h') return fnamemodify(bufname(a:buffer), ':p:h')
endfunction endfunction
function! ale_linters#cs#mcsc#GetCommand(buffer) abort function! ale_linters#cs#mcsc#GetCommand(buffer) abort

View File

@@ -2,51 +2,31 @@
" always, yes, never " always, yes, never
call ale#Set('dockerfile_hadolint_use_docker', 'never') call ale#Set('dockerfile_hadolint_use_docker', 'never')
call ale#Set('dockerfile_hadolint_docker_image', 'hadolint/hadolint') call ale#Set('dockerfile_hadolint_docker_image', 'lukasmartinelli/hadolint')
function! ale_linters#dockerfile#hadolint#Handle(buffer, lines) abort function! ale_linters#dockerfile#hadolint#Handle(buffer, lines) abort
" Matches patterns line the following: " Matches patterns line the following:
" "
" /dev/stdin:19 DL3001 Pipe chain should start with a raw value. " stdin:19: F: Pipe chain should start with a raw value.
" /dev/stdin:19:3 unexpected thing let l:pattern = '\v^/dev/stdin:?(\d+)? (\S+) (.+)$'
let l:pattern = '\v^/dev/stdin:(\d+):?(\d+)? ((DL|SC)(\d+) )?(.+)$'
let l:output = [] let l:output = []
for l:match in ale#util#GetMatches(a:lines, l:pattern) for l:match in ale#util#GetMatches(a:lines, l:pattern)
let l:lnum = 0 let l:lnum = 0
let l:colnum = 0
if l:match[1] isnot# '' if l:match[1] isnot# ''
let l:lnum = l:match[1] + 0 let l:lnum = l:match[1] + 0
endif endif
if l:match[2] isnot# ''
let l:colnum = l:match[2] + 0
endif
let l:type = 'W' let l:type = 'W'
let l:text = l:match[6] let l:text = l:match[3]
let l:detail = l:match[6]
let l:domain = 'https://github.com/hadolint/hadolint/wiki/'
if l:match[4] is# 'SC'
let l:domain = 'https://github.com/koalaman/shellcheck/wiki/'
endif
if l:match[5] isnot# ''
let l:code = l:match[4] . l:match[5]
let l:link = ' ( ' . l:domain . l:code . ' )'
let l:detail = l:code . l:link . "\n\n" . l:detail
else
let l:type = 'E'
endif
call add(l:output, { call add(l:output, {
\ 'lnum': l:lnum, \ 'lnum': l:lnum,
\ 'col': l:colnum, \ 'col': 0,
\ 'type': l:type, \ 'type': l:type,
\ 'text': l:text, \ 'text': l:text,
\ 'detail': l:detail \ 'nr': l:match[2],
\}) \})
endfor endfor

View File

@@ -32,6 +32,6 @@ endfunction
call ale#linter#Define('elixir', { call ale#linter#Define('elixir', {
\ 'name': 'credo', \ 'name': 'credo',
\ 'executable': 'mix', \ 'executable': 'mix',
\ 'command': 'mix help credo && mix credo suggest --format=flycheck --read-from-stdin %s', \ 'command': 'mix credo suggest --format=flycheck --read-from-stdin %s',
\ 'callback': 'ale_linters#elixir#credo#Handle', \ 'callback': 'ale_linters#elixir#credo#Handle',
\}) \})

View File

@@ -1,34 +0,0 @@
" Author: Fran C. - https://github.com/franciscoj
" Description: Add dialyzer support for elixir through dialyxir
" https://github.com/jeremyjh/dialyxir
function! ale_linters#elixir#dialyxir#Handle(buffer, lines) abort
" Matches patterns line the following:
"
" lib/filename.ex:19: Function fname/1 has no local return
let l:pattern = '\v(.+):(\d+): (.+)$'
let l:output = []
let l:type = 'W'
for l:match in ale#util#GetMatches(a:lines, l:pattern)
if bufname(a:buffer) == l:match[1]
call add(l:output, {
\ 'bufnr': a:buffer,
\ 'lnum': l:match[2] + 0,
\ 'col': 0,
\ 'type': l:type,
\ 'text': l:match[3],
\})
endif
endfor
return l:output
endfunction
call ale#linter#Define('elixir', {
\ 'name': 'dialyxir',
\ 'executable': 'mix',
\ 'command': 'mix dialyzer',
\ 'callback': 'ale_linters#elixir#dialyxir#Handle',
\})

View File

@@ -32,7 +32,7 @@ endfunction
call ale#linter#Define('elixir', { call ale#linter#Define('elixir', {
\ 'name': 'dogma', \ 'name': 'dogma',
\ 'executable': 'mix', \ 'executable': 'mix',
\ 'command': 'mix help dogma && mix dogma %s --format=flycheck', \ 'command': 'mix dogma %s --format=flycheck',
\ 'lint_file': 1, \ 'lint_file': 1,
\ 'callback': 'ale_linters#elixir#dogma#Handle', \ 'callback': 'ale_linters#elixir#dogma#Handle',
\}) \})

View File

@@ -1,35 +0,0 @@
" Author: Eddie Lebow https://github.com/elebow
" Description: eruby checker using `erubi`
function! ale_linters#eruby#erubi#CheckErubi(buffer) abort
return 'ruby -r erubi/capture_end -e ' . ale#Escape('""')
endfunction
function! ale_linters#eruby#erubi#GetCommand(buffer, check_erubi_output) abort
let l:rails_root = ale#ruby#FindRailsRoot(a:buffer)
if (!empty(a:check_erubi_output))
" The empty command in CheckErubi returns nothing if erubi runs and
" emits an error if erubi is not present
return ''
endif
if empty(l:rails_root)
return 'ruby -r erubi/capture_end -e ' . ale#Escape('puts Erubi::CaptureEndEngine.new($stdin.read).src') . '< %t | ruby -c'
endif
" Rails-flavored eRuby does not comply with the standard as understood by
" Erubi, so we'll have to do some substitution. This does not reduce the
" effectiveness of the linter---the translated code is still evaluated.
return 'ruby -r erubi/capture_end -e ' . ale#Escape('puts Erubi::CaptureEndEngine.new($stdin.read.gsub(%{<%=},%{<%}), nil, %{-}).src') . '< %t | ruby -c'
endfunction
call ale#linter#Define('eruby', {
\ 'name': 'erubi',
\ 'executable': 'ruby',
\ 'command_chain': [
\ {'callback': 'ale_linters#eruby#erubi#CheckErubi'},
\ {'callback': 'ale_linters#eruby#erubi#GetCommand', 'output_stream': 'stderr'},
\ ],
\ 'callback': 'ale#handlers#ruby#HandleSyntaxErrors',
\})

View File

@@ -1,67 +0,0 @@
" Author: Niraj Thapaliya - https://github.com/nthapaliya
" Description: Lints fish files using fish -n
function! ale_linters#fish#fish#Handle(buffer, lines) abort
" Matches patterns such as:
"
" home/.config/fish/functions/foo.fish (line 1): Missing end to balance this function definition
" function foo
" ^
"
" OR, patterns such as:
"
" Unsupported use of '||'. In fish, please use 'COMMAND; or COMMAND'.
" /tmp/vLz620o/258/test.fish (line 2): if set -q SSH_CLIENT || set -q SSH_TTY
" ^
"
" fish -n can return errors in either format.
let l:pattern = '^\(.* (line \(\d\+\)): \)\(.*\)$'
let l:column_pattern = '^ *\^'
let l:output = []
let l:column_offset = 0
let l:last_line_with_message = ''
for l:line in a:lines
" Look for error lines first.
let l:match = matchlist(l:line, l:pattern)
if !empty(l:match)
if !empty(l:last_line_with_message)
let l:text = l:last_line_with_message
else
let l:text = l:match[3]
endif
let l:column_offset = len(l:match[1])
let l:last_line_with_message = ''
call add(l:output, {
\ 'col': 0,
\ 'lnum': str2nr(l:match[2]),
\ 'text': l:text,
\})
else
" Look for column markers like ' ^' second.
" The column index will be set according to how long the line is.
let l:column_match = matchstr(l:line, l:column_pattern)
if !empty(l:column_match) && !empty(l:output)
let l:output[-1].col = len(l:column_match) - l:column_offset
let l:last_line_with_message = ''
else
let l:last_line_with_message = l:line
let l:column_offset = 0
endif
endif
endfor
return l:output
endfunction
call ale#linter#Define('fish', {
\ 'name': 'fish',
\ 'output_stream': 'stderr',
\ 'executable': 'fish',
\ 'command': 'fish -n %t',
\ 'callback': 'ale_linters#fish#fish#Handle',
\})

View File

@@ -1,9 +0,0 @@
" Author: Jansen Mitchell https://github.com/JansenMitchell
" Description: proselint for Fountain files
call ale#linter#Define('fountain', {
\ 'name': 'proselint',
\ 'executable': 'proselint',
\ 'command': 'proselint %t',
\ 'callback': 'ale#handlers#unix#HandleAsWarning',
\})

View File

@@ -1,52 +0,0 @@
" Author: Nick Yamane <nick.diego@gmail.com>
" Description: gitlint for git commit message files
let g:ale_gitcommit_gitlint_executable =
\ get(g:, 'ale_gitcommit_gitlint_executable', 'gitlint')
let g:ale_gitcommit_gitlint_options = get(g:, 'ale_gitcommit_gitlint_options', '')
let g:ale_gitcommit_gitlint_use_global = get(g:, 'ale_gitcommit_gitlint_use_global', 0)
function! ale_linters#gitcommit#gitlint#GetExecutable(buffer) abort
return ale#python#FindExecutable(a:buffer, 'gitcommit_gitlint', ['gitlint'])
endfunction
function! ale_linters#gitcommit#gitlint#GetCommand(buffer) abort
let l:options = ale#Var(a:buffer, 'gitcommit_gitlint_options')
let l:executable = ale_linters#gitcommit#gitlint#GetExecutable(a:buffer)
return ale#Escape(l:executable)
\ . (!empty(l:options) ? ' ' . l:options : '')
\ . ' lint'
endfunction
function! ale_linters#gitcommit#gitlint#Handle(buffer, lines) abort
" Matches patterns line the following:
let l:pattern = '\v^(\d+): (\w+) (.*)$'
let l:output = []
for l:match in ale#util#GetMatches(a:lines, l:pattern)
let l:code = l:match[2]
let l:item = {
\ 'lnum': l:match[1] + 0,
\ 'text': l:match[3],
\ 'code': l:code,
\ 'type': 'E',
\}
call add(l:output, l:item)
endfor
return l:output
endfunction
call ale#linter#Define('gitcommit', {
\ 'name': 'gitlint',
\ 'output_stream': 'stderr',
\ 'executable_callback': 'ale_linters#gitcommit#gitlint#GetExecutable',
\ 'command_callback': 'ale_linters#gitcommit#gitlint#GetCommand',
\ 'callback': 'ale_linters#gitcommit#gitlint#Handle',
\})

View File

@@ -1,14 +1,9 @@
" Author: Joshua Rubin <joshua@rubixconsulting.com>, Ben Reedy <https://github.com/breed808>, " Author: Joshua Rubin <joshua@rubixconsulting.com>, Ben Reedy <https://github.com/breed808>,
" Jeff Willette <jrwillette88@gmail.com> " Jeff Willette <jrwillette88@gmail.com>
" Description: go build for Go files " Description: go build for Go files
" inspired by work from dzhou121 <dzhou121@gmail.com> " inspired by work from dzhou121 <dzhou121@gmail.com>
call ale#Set('go_gobuild_options', '')
function! ale_linters#go#gobuild#ResetEnv() abort
unlet! s:go_env
endfunction
function! ale_linters#go#gobuild#GoEnv(buffer) abort function! ale_linters#go#gobuild#GoEnv(buffer) abort
if exists('s:go_env') if exists('s:go_env')
return '' return ''
@@ -18,8 +13,6 @@ function! ale_linters#go#gobuild#GoEnv(buffer) abort
endfunction endfunction
function! ale_linters#go#gobuild#GetCommand(buffer, goenv_output) abort function! ale_linters#go#gobuild#GetCommand(buffer, goenv_output) abort
let l:options = ale#Var(a:buffer, 'go_gobuild_options')
if !exists('s:go_env') if !exists('s:go_env')
let s:go_env = { let s:go_env = {
\ 'GOPATH': a:goenv_output[0], \ 'GOPATH': a:goenv_output[0],
@@ -27,16 +20,10 @@ function! ale_linters#go#gobuild#GetCommand(buffer, goenv_output) abort
\} \}
endif endif
let l:gopath_env_command = has('win32')
\ ? 'set GOPATH=' . ale#Escape(s:go_env.GOPATH) . ' && '
\ : 'GOPATH=' . ale#Escape(s:go_env.GOPATH) . ' '
" Run go test in local directory with relative path " Run go test in local directory with relative path
return l:gopath_env_command return 'GOPATH=' . s:go_env.GOPATH
\ . ale#path#BufferCdString(a:buffer) \ . ' cd ' . fnamemodify(bufname(a:buffer), ':.:h')
\ . 'go test' \ . ' && go test -c -o /dev/null ./'
\ . (!empty(l:options) ? ' ' . l:options : '')
\ . ' -c -o /dev/null ./'
endfunction endfunction
function! ale_linters#go#gobuild#GetMatches(lines) abort function! ale_linters#go#gobuild#GetMatches(lines) abort

View File

@@ -1,15 +1,11 @@
" Author: Ben Reedy <https://github.com/breed808> " Author: Ben Reedy <https://github.com/breed808>
" Description: gosimple for Go files " Description: gosimple for Go files
function! ale_linters#go#gosimple#GetCommand(buffer) abort
return ale#path#BufferCdString(a:buffer) . ' gosimple .'
endfunction
call ale#linter#Define('go', { call ale#linter#Define('go', {
\ 'name': 'gosimple', \ 'name': 'gosimple',
\ 'executable': 'gosimple', \ 'executable': 'gosimple',
\ 'command_callback': 'ale_linters#go#gosimple#GetCommand', \ 'command': 'gosimple %s',
\ 'callback': 'ale#handlers#go#Handler', \ 'callback': 'ale#handlers#unix#HandleAsWarning',
\ 'output_stream': 'both', \ 'output_stream': 'both',
\ 'lint_file': 1, \ 'lint_file': 1,
\}) \})

View File

@@ -1,20 +0,0 @@
" Author: Jelte Fennema <github-public@jeltef.nl>
" Description: gotype for Go files
function! ale_linters#go#gotype#GetCommand(buffer) abort
if expand('#' . a:buffer . ':p') =~# '_test\.go$'
return
endif
return ale#path#BufferCdString(a:buffer) . ' gotype .'
endfunction
call ale#linter#Define('go', {
\ 'name': 'gotype',
\ 'output_stream': 'stderr',
\ 'executable': 'gotype',
\ 'command_callback': 'ale_linters#go#gotype#GetCommand',
\ 'callback': 'ale#handlers#go#Handler',
\ 'lint_file': 1,
\})

View File

@@ -1,18 +1,10 @@
" Author: neersighted <bjorn@neersighted.com> " Author: neersighted <bjorn@neersighted.com>
" Description: go vet for Go files " Description: go vet for Go files
"
" Author: John Eikenberry <jae@zhar.net>
" Description: updated to work with go1.10
function! ale_linters#go#govet#GetCommand(buffer) abort
return ale#path#BufferCdString(a:buffer) . ' go vet .'
endfunction
call ale#linter#Define('go', { call ale#linter#Define('go', {
\ 'name': 'go vet', \ 'name': 'go vet',
\ 'output_stream': 'stderr', \ 'output_stream': 'stderr',
\ 'executable': 'go', \ 'executable': 'go',
\ 'command_callback': 'ale_linters#go#govet#GetCommand', \ 'command': 'go vet %t',
\ 'callback': 'ale#handlers#go#Handler', \ 'callback': 'ale#handlers#unix#HandleAsError',
\ 'lint_file': 1,
\}) \})

View File

@@ -1,33 +1,11 @@
" Author: Ben Reedy <https://github.com/breed808> " Author: Ben Reedy <https://github.com/breed808>
" Description: staticcheck for Go files " Description: staticcheck for Go files
call ale#Set('go_staticcheck_options', '')
call ale#Set('go_staticcheck_lint_package', 0)
function! ale_linters#go#staticcheck#GetCommand(buffer) abort
let l:filename = expand('#' . a:buffer . ':t')
let l:options = ale#Var(a:buffer, 'go_staticcheck_options')
let l:lint_package = ale#Var(a:buffer, 'go_staticcheck_lint_package')
" BufferCdString is used so that we can be sure the paths output from
" staticcheck can be calculated to absolute paths in the Handler
if l:lint_package
return ale#path#BufferCdString(a:buffer)
\ . 'staticcheck'
\ . (!empty(l:options) ? ' ' . l:options : '') . ' .'
endif
return ale#path#BufferCdString(a:buffer)
\ . 'staticcheck'
\ . (!empty(l:options) ? ' ' . l:options : '')
\ . ' ' . ale#Escape(l:filename)
endfunction
call ale#linter#Define('go', { call ale#linter#Define('go', {
\ 'name': 'staticcheck', \ 'name': 'staticcheck',
\ 'executable': 'staticcheck', \ 'executable': 'staticcheck',
\ 'command_callback': 'ale_linters#go#staticcheck#GetCommand', \ 'command': 'staticcheck %s',
\ 'callback': 'ale#handlers#go#Handler', \ 'callback': 'ale#handlers#unix#HandleAsWarning',
\ 'output_stream': 'both', \ 'output_stream': 'both',
\ 'lint_file': 1, \ 'lint_file': 1,
\}) \})

View File

@@ -1,18 +1,10 @@
" Author: w0rp <devw0rp@gmail.com> " Author: w0rp <devw0rp@gmail.com>
" Description: ghc for Haskell files " Description: ghc for Haskell files
call ale#Set('haskell_ghc_options', '-fno-code -v0')
function! ale_linters#haskell#ghc#GetCommand(buffer) abort
return 'ghc '
\ . ale#Var(a:buffer, 'haskell_ghc_options')
\ . ' %t'
endfunction
call ale#linter#Define('haskell', { call ale#linter#Define('haskell', {
\ 'name': 'ghc', \ 'name': 'ghc',
\ 'output_stream': 'stderr', \ 'output_stream': 'stderr',
\ 'executable': 'ghc', \ 'executable': 'ghc',
\ 'command_callback': 'ale_linters#haskell#ghc#GetCommand', \ 'command': 'ghc -fno-code -v0 %t',
\ 'callback': 'ale#handlers#haskell#HandleGHCFormat', \ 'callback': 'ale#handlers#haskell#HandleGHCFormat',
\}) \})

View File

@@ -1,7 +1,7 @@
" Author: KabbAmine <amine.kabb@gmail.com>, deathmaz <00maz1987@gmail.com>, diartyz <diartyz@gmail.com> " Author: KabbAmine <amine.kabb@gmail.com>, deathmaz <00maz1987@gmail.com>, diartyz <diartyz@gmail.com>
" Description: HTMLHint for checking html files " Description: HTMLHint for checking html files
call ale#Set('html_htmlhint_options', '') call ale#Set('html_htmlhint_options', '--format=unix')
call ale#Set('html_htmlhint_executable', 'htmlhint') call ale#Set('html_htmlhint_executable', 'htmlhint')
call ale#Set('html_htmlhint_use_global', 0) call ale#Set('html_htmlhint_use_global', 0)
@@ -12,22 +12,9 @@ function! ale_linters#html#htmlhint#GetExecutable(buffer) abort
endfunction endfunction
function! ale_linters#html#htmlhint#GetCommand(buffer) abort function! ale_linters#html#htmlhint#GetCommand(buffer) abort
let l:options = ale#Var(a:buffer, 'html_htmlhint_options') return ale_linters#html#htmlhint#GetExecutable(a:buffer)
let l:config = l:options !~# '--config' \ . ' ' . ale#Var(a:buffer, 'html_htmlhint_options')
\ ? ale#path#FindNearestFile(a:buffer, '.htmlhintrc') \ . ' %t'
\ : ''
if !empty(l:config)
let l:options .= ' --config ' . ale#Escape(l:config)
endif
if !empty(l:options)
let l:options = substitute(l:options, '--format=unix', '', '')
endif
return ale#Escape(ale_linters#html#htmlhint#GetExecutable(a:buffer))
\ . (!empty(l:options) ? ' ' . l:options : '')
\ . ' --format=unix %t'
endfunction endfunction
call ale#linter#Define('html', { call ale#linter#Define('html', {

View File

@@ -25,16 +25,8 @@ function! ale_linters#html#tidy#GetCommand(buffer) abort
\ 'utf-8': '-utf8', \ 'utf-8': '-utf8',
\ }, &fileencoding, '-utf8') \ }, &fileencoding, '-utf8')
" On macOS, old tidy (released on 31 Oct 2006) is installed. It does not
" consider HTML5 so we should avoid it.
let l:executable = ale#Var(a:buffer, 'html_tidy_executable')
if has('mac') && l:executable is# 'tidy' && exists('*exepath')
\ && exepath(l:executable) is# '/usr/bin/tidy'
return ''
endif
return printf('%s %s %s -', return printf('%s %s %s -',
\ l:executable, \ ale#Var(a:buffer, 'html_tidy_executable'),
\ ale#Var(a:buffer, 'html_tidy_options'), \ ale#Var(a:buffer, 'html_tidy_options'),
\ l:file_encoding \ l:file_encoding
\) \)

View File

@@ -3,7 +3,6 @@
call ale#linter#Define('javascript', { call ale#linter#Define('javascript', {
\ 'name': 'eslint', \ 'name': 'eslint',
\ 'output_stream': 'both',
\ 'executable_callback': 'ale#handlers#eslint#GetExecutable', \ 'executable_callback': 'ale#handlers#eslint#GetExecutable',
\ 'command_callback': 'ale#handlers#eslint#GetCommand', \ 'command_callback': 'ale#handlers#eslint#GetCommand',
\ 'callback': 'ale#handlers#eslint#Handle', \ 'callback': 'ale#handlers#eslint#Handle',

View File

@@ -1,40 +0,0 @@
" Author: Jon Xie https://github.com/xiejiangzhi
" Description: luac linter for lua files
call ale#Set('lua_luac_executable', 'luac')
function! ale_linters#lua#luac#GetExecutable(buffer) abort
return ale#Var(a:buffer, 'lua_luac_executable')
endfunction
function! ale_linters#lua#luac#GetCommand(buffer) abort
let l:executable = ale_linters#lua#luac#GetExecutable(a:buffer)
return ale#Escape(l:executable) . ' -p - '
endfunction
function! ale_linters#lua#luac#Handle(buffer, lines) abort
" Matches patterns line the following:
"
" luac: stdin:5: '=' expected near ')'
" luac: stdin:8: ')' expected (to close '(' at line 6) near '123'
let l:pattern = '\v^.*:(\d+): (.+)$'
let l:output = []
for l:match in ale#util#GetMatches(a:lines, l:pattern)
call add(l:output, {
\ 'lnum': l:match[1] + 0,
\ 'type': 'E',
\ 'text': l:match[2],
\})
endfor
return l:output
endfunction
call ale#linter#Define('lua', {
\ 'name': 'luac',
\ 'executable_callback': 'ale_linters#lua#luac#GetExecutable',
\ 'command_callback': 'ale_linters#lua#luac#GetCommand',
\ 'output_stream': 'stderr',
\ 'callback': 'ale_linters#lua#luac#Handle',
\})

View File

@@ -1,11 +0,0 @@
" Author: Ty-Lucas Kelley <tylucaskelley@gmail.com>
" Description: Adds support for markdownlint
call ale#linter#Define('markdown', {
\ 'name': 'markdownlint',
\ 'executable': 'markdownlint',
\ 'lint_file': 1,
\ 'output_stream': 'both',
\ 'command': 'markdownlint %s',
\ 'callback': 'ale#handlers#markdownlint#Handle'
\ })

View File

@@ -1,20 +1,5 @@
" Author: Steve Dignam <steve@dignam.xyz>, Josh Leeb-du Toit <joshleeb.com> " Author: Steve Dignam <steve@dignam.xyz>
" Description: Support for mdl, a markdown linter. " Description: Support for mdl, a markdown linter
call ale#Set('markdown_mdl_executable', 'mdl')
call ale#Set('markdown_mdl_options', '')
function! ale_linters#markdown#mdl#GetExecutable(buffer) abort
return ale#Var(a:buffer, 'markdown_mdl_executable')
endfunction
function! ale_linters#markdown#mdl#GetCommand(buffer) abort
let l:executable = ale_linters#markdown#mdl#GetExecutable(a:buffer)
let l:options = ale#Var(a:buffer, 'markdown_mdl_options')
return ale#Escape(l:executable)
\ . (!empty(l:options) ? ' ' . l:options : '')
endfunction
function! ale_linters#markdown#mdl#Handle(buffer, lines) abort function! ale_linters#markdown#mdl#Handle(buffer, lines) abort
" matches: '(stdin):173: MD004 Unordered list style' " matches: '(stdin):173: MD004 Unordered list style'
@@ -34,7 +19,7 @@ endfunction
call ale#linter#Define('markdown', { call ale#linter#Define('markdown', {
\ 'name': 'mdl', \ 'name': 'mdl',
\ 'executable_callback': 'ale_linters#markdown#mdl#GetExecutable', \ 'executable': 'mdl',
\ 'command_callback': 'ale_linters#markdown#mdl#GetCommand', \ 'command': 'mdl',
\ 'callback': 'ale_linters#markdown#mdl#Handle' \ 'callback': 'ale_linters#markdown#mdl#Handle'
\}) \})

View File

@@ -1,24 +1,18 @@
" Author rhysd https://rhysd.github.io/, Dirk Roorda (dirkroorda), Adrián González Rus (@adrigzr) " Author rhysd https://rhysd.github.io/
" Description: remark-lint for Markdown files " Description: remark-lint for Markdown files
function! ale_linters#markdown#remark_lint#Handle(buffer, lines) abort function! ale_linters#markdown#remark_lint#Handle(buffer, lines) abort
" matches: ' 1:4 warning Incorrect list-item indent: add 1 space list-item-indent remark-lint' " matches: ' 1:4 warning Incorrect list-item indent: add 1 space list-item-indent remark-lint'
" matches: ' 18:71-19:1 error Missing new line after list item list-item-spacing remark-lint', let l:pattern = '^ \+\(\d\+\):\(\d\+\) \(warning\|error\) \(.\+\)$'
let l:pattern = '^ \+\(\d\+\):\(\d\+\)\(-\(\d\+\):\(\d\+\)\)\? \(warning\|error\) \(.\+\)$'
let l:output = [] let l:output = []
for l:match in ale#util#GetMatches(a:lines, l:pattern) for l:match in ale#util#GetMatches(a:lines, l:pattern)
let l:item = { call add(l:output, {
\ 'lnum': l:match[1] + 0, \ 'lnum': l:match[1] + 0,
\ 'col': l:match[2] + 0, \ 'col': l:match[2] + 0,
\ 'type': l:match[6] is# 'error' ? 'E' : 'W', \ 'type': l:match[3] is# 'error' ? 'E' : 'W',
\ 'text': l:match[7], \ 'text': l:match[4],
\} \})
if l:match[3] isnot# ''
let l:item.end_lnum = l:match[4] + 0
let l:item.end_col = l:match[5] + 0
endif
call add(l:output, l:item)
endfor endfor
return l:output return l:output

View File

@@ -1,9 +0,0 @@
" Author: tokida https://rouger.info, Yasuhiro Kiyota <yasuhiroki.duck@gmail.com>
" Description: textlint, a proofreading tool (https://textlint.github.io/)
call ale#linter#Define('markdown', {
\ 'name': 'textlint',
\ 'executable_callback': 'ale#handlers#textlint#GetExecutable',
\ 'command_callback': 'ale#handlers#textlint#GetCommand',
\ 'callback': 'ale#handlers#textlint#HandleTextlintOutput',
\})

View File

@@ -27,20 +27,12 @@ function! ale_linters#perl#perl#Handle(buffer, lines) abort
let l:output = [] let l:output = []
let l:basename = expand('#' . a:buffer . ':t') let l:basename = expand('#' . a:buffer . ':t')
let l:type = 'E'
if a:lines[-1] =~# 'syntax OK'
let l:type = 'W'
endif
let l:seen = {}
for l:match in ale#util#GetMatches(a:lines, l:pattern) for l:match in ale#util#GetMatches(a:lines, l:pattern)
let l:line = l:match[3] let l:line = l:match[3]
let l:file = l:match[2]
let l:text = l:match[1] let l:text = l:match[1]
let l:type = 'E'
if ale#path#IsBufferPath(a:buffer, l:file) if ale#path#IsBufferPath(a:buffer, l:match[2])
\ && !has_key(l:seen,l:line)
\ && ( \ && (
\ l:text isnot# 'BEGIN failed--compilation aborted' \ l:text isnot# 'BEGIN failed--compilation aborted'
\ || empty(l:output) \ || empty(l:output)
@@ -51,8 +43,6 @@ function! ale_linters#perl#perl#Handle(buffer, lines) abort
\ 'text': l:text, \ 'text': l:text,
\ 'type': l:type, \ 'type': l:type,
\}) \})
let l:seen[l:line] = 1
endif endif
endfor endfor

View File

@@ -1,11 +0,0 @@
" Author: Cian Butler https://github.com/butlerx
" Description: alex for PO files
call ale#linter#Define('po', {
\ 'name': 'alex',
\ 'executable': 'alex',
\ 'command': 'alex %s -t',
\ 'output_stream': 'stderr',
\ 'callback': 'ale#handlers#alex#Handle',
\ 'lint_file': 1,
\})

View File

@@ -1,10 +0,0 @@
" Author: Cian Butler https://github.com/butlerx
" Description: msgfmt for PO files
call ale#linter#Define('po', {
\ 'name': 'msgfmt',
\ 'executable': 'msgfmt',
\ 'output_stream': 'stderr',
\ 'command': 'msgfmt --statistics --output-file=- %t',
\ 'callback': 'ale#handlers#unix#HandleAsWarning',
\})

View File

@@ -1,9 +0,0 @@
" Author: Cian Butler https://github.com/butlerx
" Description: proselint for PO files
call ale#linter#Define('po', {
\ 'name': 'proselint',
\ 'executable': 'proselint',
\ 'command': 'proselint %t',
\ 'callback': 'ale#handlers#unix#HandleAsWarning',
\})

View File

@@ -1,9 +0,0 @@
" Author: Cian Butler https://github.com/butlerx
" Description: write-good for PO files
call ale#linter#Define('po', {
\ 'name': 'write-good',
\ 'executable_callback': 'ale#handlers#writegood#GetExecutable',
\ 'command_callback': 'ale#handlers#writegood#GetCommand',
\ 'callback': 'ale#handlers#writegood#Handle',
\})

View File

@@ -1,21 +0,0 @@
" Description: ponyc linter for pony files
call ale#Set('pony_ponyc_executable', 'ponyc')
call ale#Set('pony_ponyc_options', '--pass paint')
function! ale_linters#pony#ponyc#GetExecutable(buffer) abort
return ale#Var(a:buffer, 'pony_ponyc_executable')
endfunction
function! ale_linters#pony#ponyc#GetCommand(buffer) abort
return ale#Escape(ale_linters#pony#ponyc#GetExecutable(a:buffer))
\ . ' ' . ale#Var(a:buffer, 'pony_ponyc_options')
endfunction
call ale#linter#Define('pony', {
\ 'name': 'ponyc',
\ 'output_stream': 'stderr',
\ 'executable_callback': 'ale_linters#pony#ponyc#GetExecutable',
\ 'command_callback': 'ale_linters#pony#ponyc#GetCommand',
\ 'callback': 'ale#handlers#pony#HandlePonycFormat',
\})

View File

@@ -1,20 +1,12 @@
" Author: Jeff Willette <jrwillette88@gmail.com> " Author: Jeff Willette <jrwillette88@gmail.com>
" Description: run the protoc-gen-lint plugin for the protoc binary " Description: run the protoc-gen-lint plugin for the protoc binary
call ale#Set('proto_protoc_gen_lint_options', '')
function! ale_linters#proto#protoc_gen_lint#GetCommand(buffer) abort function! ale_linters#proto#protoc_gen_lint#GetCommand(buffer) abort
let l:dirname = expand('#' . a:buffer . ':p:h') let l:dirname = expand('#' . a:buffer . ':p:h')
let l:options = ['-I ' . ale#Escape(l:dirname)] return 'protoc'
\ . ' -I ' . ale#Escape(l:dirname)
if !empty(ale#Var(a:buffer, 'proto_protoc_gen_lint_options')) \ . ' --lint_out=. ' . '%s'
let l:options += [ale#Var(a:buffer, 'proto_protoc_gen_lint_options')]
endif
let l:options += ['--lint_out=. ' . '%s']
return 'protoc' . ' ' . join(l:options)
endfunction endfunction
call ale#linter#Define('proto', { call ale#linter#Define('proto', {

View File

@@ -105,16 +105,11 @@ function! ale_linters#python#flake8#Handle(buffer, lines) abort
\ 'type': 'W', \ 'type': 'W',
\} \}
if l:code[:0] is# 'F' if l:code[:0] is# 'F' || l:code is# 'E999'
if l:code isnot# 'F401' let l:item.type = 'E'
let l:item.type = 'E'
endif
elseif l:code[:0] is# 'E' elseif l:code[:0] is# 'E'
let l:item.type = 'E' let l:item.type = 'E'
let l:item.sub_type = 'style'
if l:code isnot# 'E999' && l:code isnot# 'E112'
let l:item.sub_type = 'style'
endif
elseif l:code[:0] is# 'W' elseif l:code[:0] is# 'W'
let l:item.sub_type = 'style' let l:item.sub_type = 'style'
endif endif

View File

@@ -1,10 +1,10 @@
" Author: Keith Smiley <k@keith.so>, w0rp <devw0rp@gmail.com> " Author: Keith Smiley <k@keith.so>, w0rp <devw0rp@gmail.com>
" Description: mypy support for optional python typechecking " Description: mypy support for optional python typechecking
call ale#Set('python_mypy_executable', 'mypy') let g:ale_python_mypy_executable =
call ale#Set('python_mypy_ignore_invalid_syntax', 0) \ get(g:, 'ale_python_mypy_executable', 'mypy')
call ale#Set('python_mypy_options', '') let g:ale_python_mypy_options = get(g:, 'ale_python_mypy_options', '')
call ale#Set('python_mypy_use_global', 0) let g:ale_python_mypy_use_global = get(g:, 'ale_python_mypy_use_global', 0)
function! ale_linters#python#mypy#GetExecutable(buffer) abort function! ale_linters#python#mypy#GetExecutable(buffer) abort
return ale#python#FindExecutable(a:buffer, 'python_mypy', ['mypy']) return ale#python#FindExecutable(a:buffer, 'python_mypy', ['mypy'])
@@ -45,12 +45,6 @@ function! ale_linters#python#mypy#Handle(buffer, lines) abort
let l:output = [] let l:output = []
for l:match in ale#util#GetMatches(a:lines, l:pattern) for l:match in ale#util#GetMatches(a:lines, l:pattern)
" Skip invalid syntax errors if the option is on.
if l:match[5] is# 'invalid syntax'
\&& ale#Var(a:buffer, 'python_mypy_ignore_invalid_syntax')
continue
endif
call add(l:output, { call add(l:output, {
\ 'filename': ale#path#GetAbsPath(l:dir, l:match[1]), \ 'filename': ale#path#GetAbsPath(l:dir, l:match[1]),
\ 'lnum': l:match[2] + 0, \ 'lnum': l:match[2] + 0,

View File

@@ -44,8 +44,8 @@ function! ale_linters#python#pycodestyle#Handle(buffer, lines) abort
\ 'code': l:match[4], \ 'code': l:match[4],
\} \}
" E999 and E112 are syntax errors. " E999 is not a style error, it's a syntax error.
if l:match[4] is# 'E999' || l:match[4] is# 'E112' if l:match[4] is# 'E999'
unlet l:item.sub_type unlet l:item.sub_type
endif endif

View File

@@ -24,7 +24,7 @@ function! ale_linters#python#pylint#Handle(buffer, lines) abort
" Matches patterns like the following: " Matches patterns like the following:
" "
" test.py:4:4: W0101 (unreachable) Unreachable code " test.py:4:4: W0101 (unreachable) Unreachable code
let l:pattern = '\v^[a-zA-Z]?:?[^:]+:(\d+):(\d+): ([[:alnum:]]+) \(([^(]*)\) (.*)$' let l:pattern = '\v^[^:]+:(\d+):(\d+): ([[:alnum:]]+) \(([^(]*)\) (.*)$'
let l:output = [] let l:output = []
for l:match in ale#util#GetMatches(a:lines, l:pattern) for l:match in ale#util#GetMatches(a:lines, l:pattern)

View File

@@ -1,29 +0,0 @@
" Author: pylipp (www.github.com/pylipp)
" Description: qmllint for QML files
" Find lines like
" /home/foo_user42/code-base/qml/Screen.qml:11 : Expected token `}'
function! ale_linters#qml#qmllint#Handle(buffer, lines) abort
let l:pattern = '\v^[/_-a-zA-z0-9\. ]+:(\d+) : (.*)$'
let l:output = []
for l:match in ale#util#GetMatches(a:lines, l:pattern)
let l:item = {
\ 'lnum': l:match[1] + 0,
\ 'col': 0,
\ 'text': l:match[2],
\ 'type': 'E',
\}
call add(l:output, l:item)
endfor
return l:output
endfunction
call ale#linter#Define('qml', {
\ 'name': 'qmllint',
\ 'output_stream': 'stderr',
\ 'executable': 'qmllint',
\ 'command': 'qmllint %t',
\ 'callback': 'ale_linters#qml#qmllint#Handle',
\})

View File

@@ -1,29 +1,14 @@
" Author: Michel Lang <michellang@gmail.com>, w0rp <devw0rp@gmail.com>, " Author: Michel Lang <michellang@gmail.com>, w0rp <devw0rp@gmail.com>
" Fenner Macrae <fmacrae.dev@gmail.com>
" Description: This file adds support for checking R code with lintr. " Description: This file adds support for checking R code with lintr.
let g:ale_r_lintr_options = get(g:, 'ale_r_lintr_options', 'with_defaults()') let g:ale_r_lintr_options =
\ get(g:, 'ale_r_lintr_options', 'lintr::with_defaults()')
" A reasonable alternative default: " A reasonable alternative default:
" get(g:, 'ale_r_lintr_options', 'with_defaults(object_usage_linter = NULL)') " \ get(g:, 'ale_r_lintr_options', 'lintr::with_defaults(object_usage_linter = NULL)')
let g:ale_r_lintr_lint_package = get(g:, 'ale_r_lintr_lint_package', 0)
function! ale_linters#r#lintr#GetCommand(buffer) abort function! ale_linters#r#lintr#GetCommand(buffer) abort
if ale#Var(a:buffer, 'r_lintr_lint_package')
let l:lint_cmd = 'lint_package(cache = FALSE, linters = '
\ . ale#Var(a:buffer, 'r_lintr_options') . ')'
else
let l:lint_cmd = 'lint(cache = FALSE, commandArgs(TRUE), '
\ . ale#Var(a:buffer, 'r_lintr_options') . ')'
endif
let l:cmd_string = 'suppressPackageStartupMessages(library(lintr));'
\ . l:lint_cmd
return ale#path#BufferCdString(a:buffer) return ale#path#BufferCdString(a:buffer)
\ . 'Rscript -e ' \ . 'Rscript -e ' . ale#Escape('lintr::lint(commandArgs(TRUE)[1], eval(parse(text = commandArgs(TRUE)[2])))') . ' %t' . ' ' . ale#Escape(ale#Var(a:buffer, 'r_lintr_options'))
\ . ale#Escape(l:cmd_string) . ' %t'
endfunction endfunction
call ale#linter#Define('r', { call ale#linter#Define('r', {

View File

@@ -1,11 +1,8 @@
" Author: Daniel Schemala <istjanichtzufassen@gmail.com>, " Author: Daniel Schemala <istjanichtzufassen@gmail.com>
" Ivan Petkov <ivanppetkov@gmail.com>
" Description: rustc invoked by cargo for rust files " Description: rustc invoked by cargo for rust files
call ale#Set('rust_cargo_use_check', 1) call ale#Set('rust_cargo_use_check', 1)
call ale#Set('rust_cargo_check_all_targets', 0) call ale#Set('rust_cargo_check_all_targets', 0)
call ale#Set('rust_cargo_default_feature_behavior', 'default')
call ale#Set('rust_cargo_include_features', '')
function! ale_linters#rust#cargo#GetCargoExecutable(bufnr) abort function! ale_linters#rust#cargo#GetCargoExecutable(bufnr) abort
if ale#path#FindNearestFile(a:bufnr, 'Cargo.toml') isnot# '' if ale#path#FindNearestFile(a:bufnr, 'Cargo.toml') isnot# ''
@@ -32,27 +29,10 @@ function! ale_linters#rust#cargo#GetCommand(buffer, version_output) abort
\ && ale#Var(a:buffer, 'rust_cargo_check_all_targets') \ && ale#Var(a:buffer, 'rust_cargo_check_all_targets')
\ && ale#semver#GTE(l:version, [0, 22, 0]) \ && ale#semver#GTE(l:version, [0, 22, 0])
let l:include_features = ale#Var(a:buffer, 'rust_cargo_include_features')
if !empty(l:include_features)
let l:include_features = ' --features ' . ale#Escape(l:include_features)
endif
let l:default_feature_behavior = ale#Var(a:buffer, 'rust_cargo_default_feature_behavior')
if l:default_feature_behavior is# 'all'
let l:include_features = ''
let l:default_feature = ' --all-features'
elseif l:default_feature_behavior is# 'none'
let l:default_feature = ' --no-default-features'
else
let l:default_feature = ''
endif
return 'cargo ' return 'cargo '
\ . (l:use_check ? 'check' : 'build') \ . (l:use_check ? 'check' : 'build')
\ . (l:use_all_targets ? ' --all-targets' : '') \ . (l:use_all_targets ? ' --all-targets' : '')
\ . ' --frozen --message-format=json -q' \ . ' --frozen --message-format=json -q'
\ . l:default_feature
\ . l:include_features
endfunction endfunction
call ale#linter#Define('rust', { call ale#linter#Define('rust', {

View File

@@ -1,9 +0,0 @@
" Author: Yasuhiro Kiyota <yasuhiroki.duck@gmail.com>
" Description: textlint, a proofreading tool (https://textlint.github.io/)
call ale#linter#Define('text', {
\ 'name': 'textlint',
\ 'executable_callback': 'ale#handlers#textlint#GetExecutable',
\ 'command_callback': 'ale#handlers#textlint#GetCommand',
\ 'callback': 'ale#handlers#textlint#HandleTextlintOutput',
\})

View File

@@ -70,7 +70,7 @@ function! ale_linters#typescript#tslint#GetCommand(buffer) abort
\ : '' \ : ''
return ale#path#BufferCdString(a:buffer) return ale#path#BufferCdString(a:buffer)
\ . ale#Escape(ale_linters#typescript#tslint#GetExecutable(a:buffer)) \ . ale_linters#typescript#tslint#GetExecutable(a:buffer)
\ . ' --format json' \ . ' --format json'
\ . l:tslint_config_option \ . l:tslint_config_option
\ . l:tslint_rules_option \ . l:tslint_rules_option

View File

@@ -33,10 +33,6 @@ endfunction
" Return 1 if a file is too large for ALE to handle. " Return 1 if a file is too large for ALE to handle.
function! ale#FileTooLarge() abort function! ale#FileTooLarge() abort
if !exists('g:ale_maximum_file_size')
return 0
endif
let l:max = ale#Var(bufnr(''), 'maximum_file_size') let l:max = ale#Var(bufnr(''), 'maximum_file_size')
return l:max > 0 ? (line2byte(line('$') + 1) > l:max) : 0 return l:max > 0 ? (line2byte(line('$') + 1) > l:max) : 0
@@ -50,18 +46,13 @@ function! ale#ShouldDoNothing(buffer) abort
" The checks are split into separate if statements to make it possible to " The checks are split into separate if statements to make it possible to
" profile each check individually with Vim's profiling tools. " profile each check individually with Vim's profiling tools.
" Do nothing if ALE is disabled.
if !getbufvar(a:buffer, 'ale_enabled', get(g:, 'ale_enabled', 0))
return 1
endif
" Don't perform any checks when newer NeoVim versions are exiting. " Don't perform any checks when newer NeoVim versions are exiting.
if get(v:, 'exiting', v:null) isnot v:null if get(v:, 'exiting', v:null) isnot v:null
return 1 return 1
endif endif
" Do nothing for blacklisted files " Do nothing for blacklisted files
if index(get(g:, 'ale_filetype_blacklist', []), getbufvar(a:buffer, '&filetype')) >= 0 if index(g:ale_filetype_blacklist, getbufvar(a:buffer, '&filetype')) >= 0
return 1 return 1
endif endif
@@ -81,6 +72,11 @@ function! ale#ShouldDoNothing(buffer) abort
return 1 return 1
endif endif
" Do nothing if ALE is disabled.
if !ale#Var(a:buffer, 'enabled')
return 1
endif
" Do nothing if the file is too large. " Do nothing if the file is too large.
if ale#FileTooLarge() if ale#FileTooLarge()
return 1 return 1

View File

@@ -2,13 +2,6 @@
" Description: balloonexpr support for ALE. " Description: balloonexpr support for ALE.
function! ale#balloon#MessageForPos(bufnr, lnum, col) abort function! ale#balloon#MessageForPos(bufnr, lnum, col) abort
" Don't show balloons if they are disabled, or linting is disabled.
if !ale#Var(a:bufnr, 'set_balloons')
\|| !g:ale_enabled
\|| !getbufvar(a:bufnr, 'ale_enabled', 1)
return ''
endif
let l:loclist = get(g:ale_buffer_info, a:bufnr, {'loclist': []}).loclist let l:loclist = get(g:ale_buffer_info, a:bufnr, {'loclist': []}).loclist
let l:index = ale#util#BinarySearch(l:loclist, a:bufnr, a:lnum, a:col) let l:index = ale#util#BinarySearch(l:loclist, a:bufnr, a:lnum, a:col)
@@ -20,7 +13,7 @@ function! ale#balloon#Expr() abort
endfunction endfunction
function! ale#balloon#Disable() abort function! ale#balloon#Disable() abort
set noballooneval balloonexpr= set noballooneval
endfunction endfunction
function! ale#balloon#Enable() abort function! ale#balloon#Enable() abort

View File

@@ -2,56 +2,30 @@
" Description: This file implements debugging information for ALE " Description: This file implements debugging information for ALE
let s:global_variable_list = [ let s:global_variable_list = [
\ 'ale_cache_executable_check_failures',
\ 'ale_change_sign_column_color',
\ 'ale_command_wrapper',
\ 'ale_completion_delay',
\ 'ale_completion_enabled',
\ 'ale_completion_max_suggestions',
\ 'ale_echo_cursor', \ 'ale_echo_cursor',
\ 'ale_echo_msg_error_str', \ 'ale_echo_msg_error_str',
\ 'ale_echo_msg_format', \ 'ale_echo_msg_format',
\ 'ale_echo_msg_info_str',
\ 'ale_echo_msg_warning_str', \ 'ale_echo_msg_warning_str',
\ 'ale_enabled', \ 'ale_enabled',
\ 'ale_fix_on_save', \ 'ale_fix_on_save',
\ 'ale_fixers', \ 'ale_fixers',
\ 'ale_history_enabled',
\ 'ale_history_log_output',
\ 'ale_keep_list_window_open', \ 'ale_keep_list_window_open',
\ 'ale_lint_delay', \ 'ale_lint_delay',
\ 'ale_lint_on_enter', \ 'ale_lint_on_enter',
\ 'ale_lint_on_filetype_changed',
\ 'ale_lint_on_save', \ 'ale_lint_on_save',
\ 'ale_lint_on_text_changed', \ 'ale_lint_on_text_changed',
\ 'ale_lint_on_insert_leave',
\ 'ale_linter_aliases', \ 'ale_linter_aliases',
\ 'ale_linters', \ 'ale_linters',
\ 'ale_linters_explicit',
\ 'ale_list_window_size',
\ 'ale_list_vertical',
\ 'ale_loclist_msg_format',
\ 'ale_max_buffer_history_size',
\ 'ale_max_signs',
\ 'ale_maximum_file_size',
\ 'ale_open_list', \ 'ale_open_list',
\ 'ale_pattern_options',
\ 'ale_pattern_options_enabled',
\ 'ale_set_balloons',
\ 'ale_set_highlights', \ 'ale_set_highlights',
\ 'ale_set_loclist', \ 'ale_set_loclist',
\ 'ale_set_quickfix', \ 'ale_set_quickfix',
\ 'ale_set_signs', \ 'ale_set_signs',
\ 'ale_sign_column_always', \ 'ale_sign_column_always',
\ 'ale_sign_error', \ 'ale_sign_error',
\ 'ale_sign_info',
\ 'ale_sign_offset', \ 'ale_sign_offset',
\ 'ale_sign_style_error',
\ 'ale_sign_style_warning',
\ 'ale_sign_warning', \ 'ale_sign_warning',
\ 'ale_statusline_format', \ 'ale_statusline_format',
\ 'ale_type_map',
\ 'ale_warn_about_trailing_blank_lines',
\ 'ale_warn_about_trailing_whitespace', \ 'ale_warn_about_trailing_whitespace',
\] \]

View File

@@ -19,10 +19,6 @@ function! ale#definition#Execute(expr) abort
execute a:expr execute a:expr
endfunction endfunction
function! ale#definition#ClearLSPData() abort
let s:go_to_definition_map = {}
endfunction
function! ale#definition#Open(options, filename, line, column) abort function! ale#definition#Open(options, filename, line, column) abort
if a:options.open_in_tab if a:options.open_in_tab
call ale#definition#Execute('tabedit ' . fnameescape(a:filename)) call ale#definition#Execute('tabedit ' . fnameescape(a:filename))

View File

@@ -76,13 +76,6 @@ function! ale#engine#InitBufferInfo(buffer) abort
return 0 return 0
endfunction endfunction
" Clear LSP linter data for the linting engine.
function! ale#engine#ClearLSPData() abort
let s:lsp_linter_map = {}
endfunction
" This function is documented and part of the public API.
"
" Return 1 if ALE is busy checking a given buffer " Return 1 if ALE is busy checking a given buffer
function! ale#engine#IsCheckingBuffer(buffer) abort function! ale#engine#IsCheckingBuffer(buffer) abort
let l:info = get(g:ale_buffer_info, a:buffer, {}) let l:info = get(g:ale_buffer_info, a:buffer, {})
@@ -149,40 +142,36 @@ function! s:GatherOutput(job_id, line) abort
endif endif
endfunction endfunction
function! ale#engine#HandleLoclist(linter_name, buffer, loclist) abort function! s:HandleLoclist(linter_name, buffer, loclist) abort
let l:info = get(g:ale_buffer_info, a:buffer, {}) let l:buffer_info = get(g:ale_buffer_info, a:buffer, {})
if empty(l:info) if empty(l:buffer_info)
return return
endif endif
" Remove this linter from the list of active linters. " Remove this linter from the list of active linters.
" This may have already been done when the job exits. " This may have already been done when the job exits.
call filter(l:info.active_linter_list, 'v:val isnot# a:linter_name') call filter(l:buffer_info.active_linter_list, 'v:val isnot# a:linter_name')
" Make some adjustments to the loclists to fix common problems, and also " Make some adjustments to the loclists to fix common problems, and also
" to set default values for loclist items. " to set default values for loclist items.
let l:linter_loclist = ale#engine#FixLocList(a:buffer, a:linter_name, a:loclist) let l:linter_loclist = ale#engine#FixLocList(a:buffer, a:linter_name, a:loclist)
" Remove previous items for this linter. " Remove previous items for this linter.
call filter(l:info.loclist, 'v:val.linter_name isnot# a:linter_name') call filter(g:ale_buffer_info[a:buffer].loclist, 'v:val.linter_name isnot# a:linter_name')
" Add the new items.
call extend(g:ale_buffer_info[a:buffer].loclist, l:linter_loclist)
" We don't need to add items or sort the list when this list is empty. " Sort the loclist again.
if !empty(l:linter_loclist) " We need a sorted list so we can run a binary search against it
" Add the new items. " for efficient lookup of the messages in the cursor handler.
call extend(l:info.loclist, l:linter_loclist) call sort(g:ale_buffer_info[a:buffer].loclist, 'ale#util#LocItemCompare')
" Sort the loclist again.
" We need a sorted list so we can run a binary search against it
" for efficient lookup of the messages in the cursor handler.
call sort(l:info.loclist, 'ale#util#LocItemCompare')
endif
if ale#ShouldDoNothing(a:buffer) if ale#ShouldDoNothing(a:buffer)
return return
endif endif
call ale#engine#SetResults(a:buffer, l:info.loclist) call ale#engine#SetResults(a:buffer, g:ale_buffer_info[a:buffer].loclist)
endfunction endfunction
function! s:HandleExit(job_id, exit_code) abort function! s:HandleExit(job_id, exit_code) abort
@@ -228,7 +217,7 @@ function! s:HandleExit(job_id, exit_code) abort
let l:loclist = ale#util#GetFunction(l:linter.callback)(l:buffer, l:output) let l:loclist = ale#util#GetFunction(l:linter.callback)(l:buffer, l:output)
call ale#engine#HandleLoclist(l:linter.name, l:buffer, l:loclist) call s:HandleLoclist(l:linter.name, l:buffer, l:loclist)
endfunction endfunction
function! s:HandleLSPDiagnostics(conn_id, response) abort function! s:HandleLSPDiagnostics(conn_id, response) abort
@@ -242,7 +231,7 @@ function! s:HandleLSPDiagnostics(conn_id, response) abort
let l:loclist = ale#lsp#response#ReadDiagnostics(a:response) let l:loclist = ale#lsp#response#ReadDiagnostics(a:response)
call ale#engine#HandleLoclist(l:linter_name, l:buffer, l:loclist) call s:HandleLoclist(l:linter_name, l:buffer, l:loclist)
endfunction endfunction
function! s:HandleTSServerDiagnostics(response, error_type) abort function! s:HandleTSServerDiagnostics(response, error_type) abort
@@ -267,7 +256,7 @@ function! s:HandleTSServerDiagnostics(response, error_type) abort
let l:loclist = get(l:info, 'semantic_loclist', []) let l:loclist = get(l:info, 'semantic_loclist', [])
\ + get(l:info, 'syntax_loclist', []) \ + get(l:info, 'syntax_loclist', [])
call ale#engine#HandleLoclist('tsserver', l:buffer, l:loclist) call s:HandleLoclist('tsserver', l:buffer, l:loclist)
endfunction endfunction
function! s:HandleLSPErrorMessage(error_message) abort function! s:HandleLSPErrorMessage(error_message) abort
@@ -326,12 +315,6 @@ function! ale#engine#SetResults(buffer, loclist) abort
" Reset the save event marker, used for opening windows, etc. " Reset the save event marker, used for opening windows, etc.
call setbufvar(a:buffer, 'ale_save_event_fired', 0) call setbufvar(a:buffer, 'ale_save_event_fired', 0)
" Set a marker showing how many times a buffer has been checked.
call setbufvar(
\ a:buffer,
\ 'ale_linted',
\ getbufvar(a:buffer, 'ale_linted', 0) + 1
\)
" Automatically remove all managed temporary files and directories " Automatically remove all managed temporary files and directories
" now that all jobs have completed. " now that all jobs have completed.
@@ -366,6 +349,9 @@ function! s:RemapItemTypes(type_map, loclist) abort
endfor endfor
endfunction endfunction
" Save the temporary directory so we can figure out if files are in it.
let s:temp_dir = fnamemodify(tempname(), ':h')
function! ale#engine#FixLocList(buffer, linter_name, loclist) abort function! ale#engine#FixLocList(buffer, linter_name, loclist) abort
let l:bufnr_map = {} let l:bufnr_map = {}
let l:new_loclist = [] let l:new_loclist = []
@@ -526,7 +512,7 @@ function! s:RunJob(options) abort
endif endif
endif endif
let l:command = ale#job#PrepareCommand(l:buffer, l:command) let l:command = ale#job#PrepareCommand(l:command)
let l:job_options = { let l:job_options = {
\ 'mode': 'nl', \ 'mode': 'nl',
\ 'exit_cb': function('s:HandleExit'), \ 'exit_cb': function('s:HandleExit'),
@@ -717,13 +703,6 @@ function! s:CheckWithLSP(buffer, linter) abort
\ : ale#lsp#message#DidChange(a:buffer) \ : ale#lsp#message#DidChange(a:buffer)
let l:request_id = ale#lsp#Send(l:id, l:change_message, l:root) let l:request_id = ale#lsp#Send(l:id, l:change_message, l:root)
" If this was a file save event, also notify the server of that.
if a:linter.lsp isnot# 'tsserver'
\&& getbufvar(a:buffer, 'ale_save_event_fired', 0)
let l:save_message = ale#lsp#message#DidSave(a:buffer)
let l:request_id = ale#lsp#Send(l:id, l:save_message, l:root)
endif
if l:request_id != 0 if l:request_id != 0
if index(l:info.active_linter_list, a:linter.name) < 0 if index(l:info.active_linter_list, a:linter.name) < 0
call add(l:info.active_linter_list, a:linter.name) call add(l:info.active_linter_list, a:linter.name)

View File

@@ -54,8 +54,6 @@ function! ale#fix#ApplyQueuedFixes() abort
let l:should_lint = l:data.changes_made let l:should_lint = l:data.changes_made
endif endif
silent doautocmd <nomodeline> User ALEFixPost
" If ALE linting is enabled, check for problems with the file again after " If ALE linting is enabled, check for problems with the file again after
" fixing problems. " fixing problems.
if g:ale_enabled if g:ale_enabled
@@ -224,7 +222,7 @@ function! s:RunJob(options) abort
\) \)
call s:CreateTemporaryFileForJob(l:buffer, l:temporary_file, l:input) call s:CreateTemporaryFileForJob(l:buffer, l:temporary_file, l:input)
let l:command = ale#job#PrepareCommand(l:buffer, l:command) let l:command = ale#job#PrepareCommand(l:command)
let l:job_options = { let l:job_options = {
\ 'mode': 'nl', \ 'mode': 'nl',
\ 'exit_cb': function('s:HandleExit'), \ 'exit_cb': function('s:HandleExit'),
@@ -394,13 +392,7 @@ function! s:GetCallbacks() abort
endif endif
endif endif
try call add(l:corrected_list, ale#util#GetFunction(l:Item))
call add(l:corrected_list, ale#util#GetFunction(l:Item))
catch /E475/
" Rethrow exceptions for failing to get a function so we can print
" a friendly message about it.
throw 'BADNAME ' . v:exception
endtry
endfor endfor
return l:corrected_list return l:corrected_list
@@ -435,7 +427,7 @@ function! ale#fix#Fix(...) abort
try try
let l:callback_list = s:GetCallbacks() let l:callback_list = s:GetCallbacks()
catch /E700\|BADNAME/ catch /E700/
let l:function_name = join(split(split(v:exception, ':')[3])) let l:function_name = join(split(split(v:exception, ':')[3]))
let l:echo_message = printf( let l:echo_message = printf(
\ 'There is no fixer named `%s`. Check :ALEFixSuggest', \ 'There is no fixer named `%s`. Check :ALEFixSuggest',
@@ -465,8 +457,6 @@ function! ale#fix#Fix(...) abort
call ale#fix#RemoveManagedFiles(l:buffer) call ale#fix#RemoveManagedFiles(l:buffer)
call ale#fix#InitBufferData(l:buffer, l:fixing_flag) call ale#fix#InitBufferData(l:buffer, l:fixing_flag)
silent doautocmd <nomodeline> User ALEFixPre
call s:RunFixer({ call s:RunFixer({
\ 'buffer': l:buffer, \ 'buffer': l:buffer,
\ 'input': g:ale_fix_buffer_data[l:buffer].lines_before, \ 'input': g:ale_fix_buffer_data[l:buffer].lines_before,

View File

@@ -23,12 +23,6 @@ let s:default_registry = {
\ 'description': 'Apply prettier-standard to a file.', \ 'description': 'Apply prettier-standard to a file.',
\ 'aliases': ['prettier-standard'], \ 'aliases': ['prettier-standard'],
\ }, \ },
\ 'elm-format': {
\ 'function': 'ale#fixers#elm_format#Fix',
\ 'suggested_filetypes': ['elm'],
\ 'description': 'Apply elm-format to a file.',
\ 'aliases': ['format'],
\ },
\ 'eslint': { \ 'eslint': {
\ 'function': 'ale#fixers#eslint#Fix', \ 'function': 'ale#fixers#eslint#Fix',
\ 'suggested_filetypes': ['javascript', 'typescript'], \ 'suggested_filetypes': ['javascript', 'typescript'],
@@ -39,6 +33,11 @@ let s:default_registry = {
\ 'suggested_filetypes': ['elixir'], \ 'suggested_filetypes': ['elixir'],
\ 'description': 'Apply mix format to a file.', \ 'description': 'Apply mix format to a file.',
\ }, \ },
\ 'format': {
\ 'function': 'ale#fixers#format#Fix',
\ 'suggested_filetypes': ['elm'],
\ 'description': 'Apply elm-format to a file.',
\ },
\ 'isort': { \ 'isort': {
\ 'function': 'ale#fixers#isort#Fix', \ 'function': 'ale#fixers#isort#Fix',
\ 'suggested_filetypes': ['python'], \ 'suggested_filetypes': ['python'],
@@ -46,7 +45,7 @@ let s:default_registry = {
\ }, \ },
\ 'prettier': { \ 'prettier': {
\ 'function': 'ale#fixers#prettier#Fix', \ 'function': 'ale#fixers#prettier#Fix',
\ 'suggested_filetypes': ['javascript', 'typescript', 'json', 'css', 'scss', 'less', 'markdown', 'graphql', 'vue'], \ 'suggested_filetypes': ['javascript', 'typescript', 'json', 'css', 'scss', 'less'],
\ 'description': 'Apply prettier to a file.', \ 'description': 'Apply prettier to a file.',
\ }, \ },
\ 'prettier_eslint': { \ 'prettier_eslint': {
@@ -85,11 +84,6 @@ let s:default_registry = {
\ 'suggested_filetypes': ['ruby'], \ 'suggested_filetypes': ['ruby'],
\ 'description': 'Fix ruby files with rubocop --auto-correct.', \ 'description': 'Fix ruby files with rubocop --auto-correct.',
\ }, \ },
\ 'rufo': {
\ 'function': 'ale#fixers#rufo#Fix',
\ 'suggested_filetypes': ['ruby'],
\ 'description': 'Fix ruby files with rufo',
\ },
\ 'standard': { \ 'standard': {
\ 'function': 'ale#fixers#standard#Fix', \ 'function': 'ale#fixers#standard#Fix',
\ 'suggested_filetypes': ['javascript'], \ 'suggested_filetypes': ['javascript'],
@@ -110,11 +104,6 @@ let s:default_registry = {
\ 'suggested_filetypes': ['php'], \ 'suggested_filetypes': ['php'],
\ 'description': 'Fix PHP files with phpcbf.', \ 'description': 'Fix PHP files with phpcbf.',
\ }, \ },
\ 'php_cs_fixer': {
\ 'function': 'ale#fixers#php_cs_fixer#Fix',
\ 'suggested_filetypes': ['php'],
\ 'description': 'Fix PHP files with php-cs-fixer.',
\ },
\ 'clang-format': { \ 'clang-format': {
\ 'function': 'ale#fixers#clangformat#Fix', \ 'function': 'ale#fixers#clangformat#Fix',
\ 'suggested_filetypes': ['c', 'cpp'], \ 'suggested_filetypes': ['c', 'cpp'],
@@ -170,16 +159,6 @@ let s:default_registry = {
\ 'suggested_filetypes': ['java'], \ 'suggested_filetypes': ['java'],
\ 'description': 'Fix Java files with google-java-format.', \ 'description': 'Fix Java files with google-java-format.',
\ }, \ },
\ 'fixjson': {
\ 'function': 'ale#fixers#fixjson#Fix',
\ 'suggested_filetypes': ['json'],
\ 'description': 'Fix JSON files with fixjson.',
\ },
\ 'jq': {
\ 'function': 'ale#fixers#jq#Fix',
\ 'suggested_filetypes': ['json'],
\ 'description': 'Fix JSON files with jq.',
\ },
\} \}
" Reset the function registry to the default entries. " Reset the function registry to the default entries.

View File

@@ -1,4 +1,4 @@
" Author: eborden <evan@evan-borden.com>, ifyouseewendy <ifyouseewendy@gmail.com>, aspidiets <emarshall85@gmail.com> " Author: eborden <evan@evan-borden.com>
" Description: Integration of brittany with ALE. " Description: Integration of brittany with ALE.
call ale#Set('haskell_brittany_executable', 'brittany') call ale#Set('haskell_brittany_executable', 'brittany')
@@ -8,7 +8,6 @@ function! ale#fixers#brittany#Fix(buffer) abort
return { return {
\ 'command': ale#Escape(l:executable) \ 'command': ale#Escape(l:executable)
\ . ' --write-mode inplace'
\ . ' %t', \ . ' %t',
\ 'read_temporary_file': 1, \ 'read_temporary_file': 1,
\} \}

View File

@@ -1,27 +0,0 @@
" Author: rhysd <https://rhysd.github.io>
" Description: Integration of fixjson with ALE.
call ale#Set('json_fixjson_executable', 'fixjson')
call ale#Set('json_fixjson_options', '')
call ale#Set('json_fixjson_use_global', 0)
function! ale#fixers#fixjson#GetExecutable(buffer) abort
return ale#node#FindExecutable(a:buffer, 'json_fixjson', [
\ 'node_modules/.bin/fixjson',
\])
endfunction
function! ale#fixers#fixjson#Fix(buffer) abort
let l:executable = ale#Escape(ale#fixers#fixjson#GetExecutable(a:buffer))
let l:filename = ale#Escape(bufname(a:buffer))
let l:command = l:executable . ' --stdin-filename ' . l:filename
let l:options = ale#Var(a:buffer, 'json_fixjson_options')
if l:options isnot# ''
let l:command .= ' ' . l:options
endif
return {
\ 'command': l:command
\}
endfunction

View File

@@ -5,17 +5,17 @@ call ale#Set('elm_format_executable', 'elm-format')
call ale#Set('elm_format_use_global', 0) call ale#Set('elm_format_use_global', 0)
call ale#Set('elm_format_options', '--yes') call ale#Set('elm_format_options', '--yes')
function! ale#fixers#elm_format#GetExecutable(buffer) abort function! ale#fixers#format#GetExecutable(buffer) abort
return ale#node#FindExecutable(a:buffer, 'elm_format', [ return ale#node#FindExecutable(a:buffer, 'elm_format', [
\ 'node_modules/.bin/elm-format', \ 'node_modules/.bin/elm-format',
\]) \])
endfunction endfunction
function! ale#fixers#elm_format#Fix(buffer) abort function! ale#fixers#format#Fix(buffer) abort
let l:options = ale#Var(a:buffer, 'elm_format_options') let l:options = ale#Var(a:buffer, 'elm_format_options')
return { return {
\ 'command': ale#Escape(ale#fixers#elm_format#GetExecutable(a:buffer)) \ 'command': ale#Escape(ale#fixers#format#GetExecutable(a:buffer))
\ . ' %t' \ . ' %t'
\ . (empty(l:options) ? '' : ' ' . l:options), \ . (empty(l:options) ? '' : ' ' . l:options),
\ 'read_temporary_file': 1, \ 'read_temporary_file': 1,

View File

@@ -15,8 +15,12 @@ function! ale#fixers#isort#Fix(buffer) abort
return 0 return 0
endif endif
let l:config = ale#path#FindNearestFile(a:buffer, '.isort.cfg')
let l:config_options = !empty(l:config)
\ ? ' --settings-path ' . ale#Escape(l:config)
\ : ''
return { return {
\ 'command': ale#path#BufferCdString(a:buffer) \ 'command': ale#Escape(l:executable) . l:config_options . ' -',
\ . ale#Escape(l:executable) . ' -',
\} \}
endfunction endfunction

View File

@@ -1,15 +0,0 @@
call ale#Set('json_jq_executable', 'jq')
call ale#Set('json_jq_options', '')
function! ale#fixers#jq#GetExecutable(buffer) abort
return ale#Var(a:buffer, 'json_jq_executable')
endfunction
function! ale#fixers#jq#Fix(buffer) abort
let l:options = ale#Var(a:buffer, 'json_jq_options')
return {
\ 'command': ale#Escape(ale#fixers#jq#GetExecutable(a:buffer))
\ . ' . ' . l:options,
\}
endfunction

View File

@@ -1,25 +1,16 @@
" Author: carakan <carakan@gmail.com>, Fernando Mendes <fernando@mendes.codes> " Author: carakan <carakan@gmail.com>
" Description: Fixing files with elixir formatter 'mix format'. " Description: Fixing files with elixir formatter 'mix format'.
call ale#Set('elixir_mix_executable', 'mix') call ale#Set('elixir_mix_executable', 'mix')
call ale#Set('elixir_mix_format_options', '')
function! ale#fixers#mix_format#GetExecutable(buffer) abort function! ale#fixers#mix_format#GetExecutable(buffer) abort
return ale#Var(a:buffer, 'elixir_mix_executable') return ale#Var(a:buffer, 'elixir_mix_executable')
endfunction endfunction
function! ale#fixers#mix_format#GetCommand(buffer) abort
let l:executable = ale#Escape(ale#fixers#mix_format#GetExecutable(a:buffer))
let l:options = ale#Var(a:buffer, 'elixir_mix_format_options')
return l:executable . ' format'
\ . (!empty(l:options) ? ' ' . l:options : '')
\ . ' %t'
endfunction
function! ale#fixers#mix_format#Fix(buffer) abort function! ale#fixers#mix_format#Fix(buffer) abort
return { return {
\ 'command': ale#fixers#mix_format#GetCommand(a:buffer), \ 'command': ale#Escape(ale#fixers#mix_format#GetExecutable(a:buffer))
\ . ' format %t',
\ 'read_temporary_file': 1, \ 'read_temporary_file': 1,
\} \}
endfunction endfunction

View File

@@ -1,23 +0,0 @@
" Author: Julien Deniau <julien.deniau@gmail.com>
" Description: Fixing files with php-cs-fixer.
call ale#Set('php_cs_fixer_executable', 'php-cs-fixer')
call ale#Set('php_cs_fixer_use_global', 0)
function! ale#fixers#php_cs_fixer#GetExecutable(buffer) abort
return ale#node#FindExecutable(a:buffer, 'php_cs_fixer', [
\ 'vendor/bin/php-cs-fixer',
\ 'php-cs-fixer'
\])
endfunction
function! ale#fixers#php_cs_fixer#Fix(buffer) abort
let l:executable = ale#fixers#php_cs_fixer#GetExecutable(a:buffer)
return {
\ 'command': ale#Escape(l:executable) . ' fix %t',
\ 'read_temporary_file': 1,
\}
endfunction

View File

@@ -1,20 +0,0 @@
" Author: Fohte (Hayato Kawai) https://github.com/fohte
" Description: Integration of Rufo with ALE.
call ale#Set('ruby_rufo_executable', 'rufo')
function! ale#fixers#rufo#GetCommand(buffer) abort
let l:executable = ale#Var(a:buffer, 'ruby_rufo_executable')
let l:exec_args = l:executable =~? 'bundle$'
\ ? ' exec rufo'
\ : ''
return ale#Escape(l:executable) . l:exec_args . ' %t'
endfunction
function! ale#fixers#rufo#Fix(buffer) abort
return {
\ 'command': ale#fixers#rufo#GetCommand(a:buffer),
\ 'read_temporary_file': 1,
\}
endfunction

View File

@@ -1,47 +0,0 @@
" Author: Christian Gibbons <cgibbons@gmu.edu>
" Description: This file defines a handler function that should work for the
" flawfinder format with the -CDQS flags.
" Swiped this function from the GCC handler. Not sure if needed, but doesn't
" hurt to have it.
function! s:RemoveUnicodeQuotes(text) abort
let l:text = a:text
let l:text = substitute(l:text, '[`´]', '''', 'g')
let l:text = substitute(l:text, '\v\\u2018([^\\]+)\\u2019', '''\1''', 'g')
let l:text = substitute(l:text, '[“”]', '"', 'g')
return l:text
endfunction
function! ale#handlers#flawfinder#HandleFlawfinderFormat(buffer, lines) abort
" Look for lines like the following.
"
" <stdin>:12:4: [2] (buffer) char:Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length.
" <stdin>:31:4: [1] (buffer) strncpy:Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120).
let l:pattern = '\v^([a-zA-Z]?:?[^:]+):(\d+):(\d+)?:? ( \[[0-5]\] [^:]+):(.+)$'
let l:output = []
for l:match in ale#util#GetMatches(a:lines, l:pattern)
" Use severity level to determine if it should be considered a warning
" or error.
let l:severity = str2nr(matchstr(split(l:match[4])[0], '[0-5]'))
let l:item = {
\ 'lnum': str2nr(l:match[2]),
\ 'col': str2nr(l:match[3]),
\ 'type': (l:severity < ale#Var(a:buffer, 'c_flawfinder_error_severity'))
\ ? 'W' : 'E',
\ 'text': s:RemoveUnicodeQuotes(join(split(l:match[4])[1:]) . ': ' . l:match[5]),
\}
" If the filename is something like <stdin>, <nofile> or -, then
" this is an error for the file we checked.
if l:match[1] isnot# '-' && l:match[1][0] isnot# '<'
let l:item['filename'] = l:match[1]
endif
call add(l:output, l:item)
endfor
return l:output
endfunction

View File

@@ -1,25 +0,0 @@
" Author: Anthony DeDominic <adedomin@gmail.com>
" Description: Handle output from gawk's --lint option
function! ale#handlers#gawk#HandleGawkFormat(buffer, lines) abort
" Look for lines like the following:
" gawk: /tmp/v0fddXz/1/something.awk:1: ^ invalid char ''' in expression
let l:pattern = '^.\{-}:\(\d\+\):\s\+\(warning:\|\^\)\s*\(.*\)'
let l:output = []
for l:match in ale#util#GetMatches(a:lines, l:pattern)
let l:ecode = 'E'
if l:match[2] is? 'warning:'
let l:ecode = 'W'
endif
call add(l:output, {
\ 'lnum': l:match[1] + 0,
\ 'col': 0,
\ 'text': l:match[3],
\ 'code': 0,
\ 'type': l:ecode,
\})
endfor
return l:output
endfunction

View File

@@ -1,25 +0,0 @@
" Author: neersighted <bjorn@neersighted.com>
" Description: go vet for Go files
"
" Author: John Eikenberry <jae@zhar.net>
" Description: updated to work with go1.10
"
" Author: Ben Paxton <ben@gn32.uk>
" Description: moved to generic Golang file from govet
function! ale#handlers#go#Handler(buffer, lines) abort
let l:pattern = '\v^([a-zA-Z]?:?[^:]+):(\d+):?(\d+)?:? ?(.+)$'
let l:output = []
let l:dir = expand('#' . a:buffer . ':p:h')
for l:match in ale#util#GetMatches(a:lines, l:pattern)
call add(l:output, {
\ 'filename': ale#path#GetAbsPath(l:dir, l:match[1]),
\ 'lnum': l:match[2] + 0,
\ 'col': l:match[3] + 0,
\ 'text': l:match[4],
\ 'type': 'E',
\})
endfor
return l:output
endfunction

View File

@@ -1,17 +0,0 @@
" Author: Ty-Lucas Kelley <tylucaskelley@gmail.com>
" 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

View File

@@ -1,34 +0,0 @@
scriptencoding utf-8
" Description: This file defines a handler function which ought to work for
" any program which outputs errors in the format that ponyc uses.
function! s:RemoveUnicodeQuotes(text) abort
let l:text = a:text
let l:text = substitute(l:text, '[`´]', '''', 'g')
let l:text = substitute(l:text, '\v\\u2018([^\\]+)\\u2019', '''\1''', 'g')
let l:text = substitute(l:text, '[“”]', '"', 'g')
return l:text
endfunction
function! ale#handlers#pony#HandlePonycFormat(buffer, lines) abort
" Look for lines like the following.
" /home/code/pony/classes/Wombat.pony:22:30: can't lookup private fields from outside the type
let l:pattern = '\v^([^:]+):(\d+):(\d+)?:? (.+)$'
let l:output = []
for l:match in ale#util#GetMatches(a:lines, l:pattern)
let l:item = {
\ 'filename': l:match[1],
\ 'lnum': str2nr(l:match[2]),
\ 'col': str2nr(l:match[3]),
\ 'type': 'E',
\ 'text': s:RemoveUnicodeQuotes(l:match[4]),
\}
call add(l:output, l:item)
endfor
return l:output
endfunction

View File

@@ -25,30 +25,6 @@ function! ale#handlers#redpen#HandleRedpenOutput(buffer, lines) abort
let l:item.lnum = l:err.lineNum let l:item.lnum = l:err.lineNum
let l:item.col = l:err.sentenceStartColumnNum + 1 let l:item.col = l:err.sentenceStartColumnNum + 1
endif endif
" Adjust column number for multibyte string
let l:line = getline(l:item.lnum)
if l:line is# ''
let l:line = l:err.sentence
endif
let l:line = split(l:line, '\zs')
if l:item.col >= 2
let l:col = 0
for l:strlen in map(l:line[0:(l:item.col - 2)], 'strlen(v:val)')
let l:col = l:col + l:strlen
endfor
let l:item.col = l:col + 1
endif
if has_key(l:item, 'end_col')
let l:col = 0
for l:strlen in map(l:line[0:(l:item.end_col - 1)], 'strlen(v:val)')
let l:col = l:col + l:strlen
endfor
let l:item.end_col = l:col
endif
call add(l:output, l:item) call add(l:output, l:item)
endfor endfor
return l:output return l:output

View File

@@ -1,39 +0,0 @@
" Author: tokida https://rouger.info, Yasuhiro Kiyota <yasuhiroki.duck@gmail.com>
" Description: textlint, a proofreading tool (https://textlint.github.io/)
call ale#Set('textlint_executable', 'textlint')
call ale#Set('textlint_use_global', 0)
call ale#Set('textlint_options', '')
function! ale#handlers#textlint#GetExecutable(buffer) abort
return ale#node#FindExecutable(a:buffer, 'textlint', [
\ 'node_modules/.bin/textlint',
\ 'node_modules/textlint/bin/textlint.js',
\])
endfunction
function! ale#handlers#textlint#GetCommand(buffer) abort
let l:executable = ale#handlers#textlint#GetExecutable(a:buffer)
let l:options = ale#Var(a:buffer, 'textlint_options')
return ale#node#Executable(a:buffer, l:executable)
\ . (!empty(l:options) ? ' ' . l:options : '')
\ . ' -f json --stdin --stdin-filename %s'
endfunction
function! ale#handlers#textlint#HandleTextlintOutput(buffer, lines) abort
let l:res = get(ale#util#FuzzyJSONDecode(a:lines, []), 0, {'messages': []})
let l:output = []
for l:err in l:res.messages
call add(l:output, {
\ 'text': l:err.message,
\ 'type': 'W',
\ 'code': l:err.ruleId,
\ 'lnum': l:err.line,
\ 'col' : l:err.column
\})
endfor
return l:output
endfunction

View File

@@ -36,7 +36,7 @@ function! ale#job#JoinNeovimOutput(job, last_line, data, mode, callback) abort
let l:lines[0] = a:last_line . l:lines[0] let l:lines[0] = a:last_line . l:lines[0]
let l:new_last_line = a:data[-1] let l:new_last_line = a:data[-1]
else else
let l:new_last_line = a:last_line . get(a:data, 0, '') let l:new_last_line = a:last_line . a:data[0]
endif endif
for l:line in l:lines for l:line in l:lines
@@ -165,54 +165,23 @@ function! ale#job#ValidateArguments(command, options) abort
endif endif
endfunction endfunction
function! s:PrepareWrappedCommand(original_wrapper, command) abort function! ale#job#PrepareCommand(command) abort
let l:match = matchlist(a:command, '\v^(.*(\&\&|;)) *(.*)$')
let l:prefix = ''
let l:command = a:command
if !empty(l:match)
let l:prefix = l:match[1] . ' '
let l:command = l:match[3]
endif
let l:format = a:original_wrapper
if l:format =~# '%@'
let l:wrapped = substitute(l:format, '%@', ale#Escape(l:command), '')
else
if l:format !~# '%\*'
let l:format .= ' %*'
endif
let l:wrapped = substitute(l:format, '%\*', l:command, '')
endif
return l:prefix . l:wrapped
endfunction
function! ale#job#PrepareCommand(buffer, command) abort
let l:wrapper = ale#Var(a:buffer, 'command_wrapper')
let l:command = !empty(l:wrapper)
\ ? s:PrepareWrappedCommand(l:wrapper, a:command)
\ : a:command
" The command will be executed in a subshell. This fixes a number of " The command will be executed in a subshell. This fixes a number of
" issues, including reading the PATH variables correctly, %PATHEXT% " issues, including reading the PATH variables correctly, %PATHEXT%
" expansion on Windows, etc. " expansion on Windows, etc.
" "
" NeoVim handles this issue automatically if the command is a String, " NeoVim handles this issue automatically if the command is a String,
" but we'll do this explicitly, so we use the same exact command for both " but we'll do this explicitly, so we use thes same exact command for both
" versions. " versions.
if has('win32') if ale#Has('win32')
return 'cmd /s/c "' . l:command . '"' return 'cmd /s/c "' . a:command . '"'
endif endif
if &shell =~? 'fish$\|pwsh$' if &shell =~? 'fish$'
return ['/bin/sh', '-c', l:command] return ['/bin/sh', '-c', a:command]
endif endif
return split(&shell) + split(&shellcmdflag) + [l:command] return split(&shell) + split(&shellcmdflag) + [a:command]
endfunction endfunction
" Start a job with options which are agnostic to Vim and NeoVim. " Start a job with options which are agnostic to Vim and NeoVim.

View File

@@ -1,4 +1,3 @@
call ale#Set('wrap_command_as_one_argument', 0)
" Author: w0rp <devw0rp@gmail.com> " Author: w0rp <devw0rp@gmail.com>
" Description: Linter registration and lazy-loading " Description: Linter registration and lazy-loading
" Retrieves linters as requested by the engine, loading them if needed. " Retrieves linters as requested by the engine, loading them if needed.
@@ -433,7 +432,6 @@ function! ale#linter#StartLSP(buffer, linter, callback) abort
endif endif
let l:command = ale#job#PrepareCommand( let l:command = ale#job#PrepareCommand(
\ a:buffer,
\ ale#linter#GetCommand(a:buffer, a:linter), \ ale#linter#GetCommand(a:buffer, a:linter),
\) \)
let l:conn_id = ale#lsp#StartProgram( let l:conn_id = ale#lsp#StartProgram(

View File

@@ -97,17 +97,12 @@ function! s:SetListsImpl(timer_id, buffer, loclist) abort
let l:reset_visual_selection = l:mode is? 'v' || l:mode is# "\<c-v>" let l:reset_visual_selection = l:mode is? 'v' || l:mode is# "\<c-v>"
let l:reset_character_selection = l:mode is? 's' || l:mode is# "\<c-s>" let l:reset_character_selection = l:mode is? 's' || l:mode is# "\<c-s>"
" open windows vertically instead of default horizontally
let l:open_type = ''
if ale#Var(a:buffer, 'list_vertical') == 1
let l:open_type = 'vert '
endif
if g:ale_set_quickfix if g:ale_set_quickfix
if !ale#list#IsQuickfixOpen() if !ale#list#IsQuickfixOpen()
silent! execute l:open_type . 'copen ' . str2nr(ale#Var(a:buffer, 'list_window_size')) silent! execute 'copen ' . str2nr(ale#Var(a:buffer, 'list_window_size'))
endif endif
elseif g:ale_set_loclist elseif g:ale_set_loclist
silent! execute l:open_type . 'lopen ' . str2nr(ale#Var(a:buffer, 'list_window_size')) silent! execute 'lopen ' . str2nr(ale#Var(a:buffer, 'list_window_size'))
endif endif
" If focus changed, restore it (jump to the last window). " If focus changed, restore it (jump to the last window).

View File

@@ -325,20 +325,6 @@ function! ale#lsp#ConnectToAddress(address, project_root, callback) abort
return 1 return 1
endfunction endfunction
" Stop all LSP connections, closing all jobs and channels, and removing any
" queued messages.
function! ale#lsp#StopAll() abort
for l:conn in s:connections
if has_key(l:conn, 'channel')
call ch_close(l:conn.channel)
else
call ale#job#Stop(l:conn.id)
endif
endfor
let s:connections = []
endfunction
function! s:SendMessageData(conn, data) abort function! s:SendMessageData(conn, data) abort
if has_key(a:conn, 'executable') if has_key(a:conn, 'executable')
call ale#job#SendRaw(a:conn.id, a:data) call ale#job#SendRaw(a:conn.id, a:data)

View File

@@ -1,25 +0,0 @@
" Stop all LSPs and remove all of the data for them.
function! ale#lsp#reset#StopAllLSPs() abort
call ale#lsp#StopAll()
if exists('*ale#definition#ClearLSPData')
" Clear the mapping for connections, etc.
call ale#definition#ClearLSPData()
endif
if exists('*ale#engine#ClearLSPData')
" Clear the mapping for connections, etc.
call ale#engine#ClearLSPData()
" Remove the problems for all of the LSP linters in every buffer.
for l:buffer_string in keys(g:ale_buffer_info)
let l:buffer = str2nr(l:buffer_string)
for l:linter in ale#linter#Get(getbufvar(l:buffer, '&filetype'))
if !empty(l:linter.lsp)
call ale#engine#HandleLoclist(l:linter.name, l:buffer, [])
endif
endfor
endfor
endif
endfunction

View File

@@ -59,14 +59,6 @@ function! ale#lsp#response#ReadTSServerDiagnostics(response) abort
let l:loclist_item.nr = l:diagnostic.code let l:loclist_item.nr = l:diagnostic.code
endif endif
if get(l:diagnostic, 'category') is# 'warning'
let l:loclist_item.type = 'W'
endif
if get(l:diagnostic, 'category') is# 'suggestion'
let l:loclist_item.type = 'I'
endif
call add(l:loclist, l:loclist_item) call add(l:loclist, l:loclist_item)
endfor endfor

View File

@@ -84,12 +84,12 @@ function! ale#path#IsAbsolute(filename) abort
return a:filename[:0] is# '/' || a:filename[1:2] is# ':\' return a:filename[:0] is# '/' || a:filename[1:2] is# ':\'
endfunction endfunction
let s:temp_dir = ale#path#Simplify(fnamemodify(tempname(), ':h')) let s:temp_dir = fnamemodify(tempname(), ':h')
" Given a filename, return 1 if the file represents some temporary file " Given a filename, return 1 if the file represents some temporary file
" created by Vim. " created by Vim.
function! ale#path#IsTempName(filename) abort function! ale#path#IsTempName(filename) abort
return ale#path#Simplify(a:filename)[:len(s:temp_dir) - 1] is# s:temp_dir return a:filename[:len(s:temp_dir) - 1] is# s:temp_dir
endfunction endfunction
" Given a base directory, which must not have a trailing slash, and a " Given a base directory, which must not have a trailing slash, and a

View File

@@ -95,11 +95,6 @@ endfunction
" This function is deprecated, and should not be used. Use the airline plugin " This function is deprecated, and should not be used. Use the airline plugin
" instead, or write your own status function with ale#statusline#Count() " instead, or write your own status function with ale#statusline#Count()
function! ale#statusline#Status() abort function! ale#statusline#Status() abort
if !get(g:, 'ale_deprecation_ale_statusline_status', 0)
execute 'echom ''ale#statusline#Status() is deprecated, use ale#statusline#Count() to write your own function.'''
let g:ale_deprecation_ale_statusline_status = 1
endif
if !exists('g:ale_statusline_format') if !exists('g:ale_statusline_format')
return 'OK' return 'OK'
endif endif

View File

@@ -84,6 +84,10 @@ function! s:EnablePreamble() abort
" Lint immediately, including running linters against the file. " Lint immediately, including running linters against the file.
call ale#Queue(0, 'lint_file') call ale#Queue(0, 'lint_file')
if g:ale_set_balloons
call ale#balloon#Enable()
endif
endfunction endfunction
function! s:DisablePostamble() abort function! s:DisablePostamble() abort
@@ -91,6 +95,10 @@ function! s:DisablePostamble() abort
if g:ale_set_highlights if g:ale_set_highlights
call ale#highlight#UpdateHighlights() call ale#highlight#UpdateHighlights()
endif endif
if g:ale_set_balloons
call ale#balloon#Disable()
endif
endfunction endfunction
function! s:CleanupEveryBuffer() abort function! s:CleanupEveryBuffer() abort
@@ -113,17 +121,9 @@ function! ale#toggle#Toggle() abort
if g:ale_enabled if g:ale_enabled
call s:EnablePreamble() call s:EnablePreamble()
if g:ale_set_balloons
call ale#balloon#Enable()
endif
else else
call s:CleanupEveryBuffer() call s:CleanupEveryBuffer()
call s:DisablePostamble() call s:DisablePostamble()
if has('balloon_eval')
call ale#balloon#Disable()
endif
endif endif
call ale#toggle#InitAuGroups() call ale#toggle#InitAuGroups()

View File

@@ -236,13 +236,6 @@ function! ale#util#EscapePCRE(unsafe_string) abort
return substitute(a:unsafe_string, '\([\-\[\]{}()*+?.^$|]\)', '\\\1', 'g') return substitute(a:unsafe_string, '\([\-\[\]{}()*+?.^$|]\)', '\\\1', 'g')
endfunction endfunction
" Escape a string so that it can be used as a literal string inside an evaled
" vim command.
function! ale#util#EscapeVim(unsafe_string) abort
return "'" . substitute(a:unsafe_string, "'", "''", 'g') . "'"
endfunction
" Given a String or a List of String values, try and decode the string(s) " Given a String or a List of String values, try and decode the string(s)
" as a JSON value which can be decoded with json_decode. If the JSON string " as a JSON value which can be decoded with json_decode. If the JSON string
" is invalid, the default argument value will be returned instead. " is invalid, the default argument value will be returned instead.

View File

@@ -143,41 +143,6 @@ g:ale_c_cppcheck_options *g:ale_c_cppcheck_options*
This variable can be changed to modify flags given to cppcheck. This variable can be changed to modify flags given to cppcheck.
===============================================================================
flawfinder *ale-c-flawfinder*
g:ale_c_flawfinder_executable *g:ale_c_flawfinder_executable*
*b:ale_c_flawfinder_executable*
Type: |String|
Default: `'flawfinder'`
This variable can be changed to use a different executable for flawfinder.
g:ale_c_flawfinder_minlevel *g:ale_c_flawfinder_minlevel*
*b:ale_c_flawfinder_minlevel*
Type: |Number|
Default: `1`
This variable can be changed to ignore risks under the given risk threshold.
g:ale_c_flawfinder_options *g:ale-c-flawfinder*
*b:ale-c-flawfinder*
Type: |String|
Default: `''`
This variable can be used to pass extra options into the flawfinder command.
g:ale_c_flawfinder_error_severity *g:ale_c_flawfinder_error_severity*
*b:ale_c_flawfinder_error_severity*
Type: |Number|
Default: `6`
This variable can be changed to set the minimum severity to be treated as an
error. This setting also applies to flawfinder for c++.
=============================================================================== ===============================================================================
gcc *ale-c-gcc* gcc *ale-c-gcc*

View File

@@ -153,33 +153,6 @@ g:ale_cpp_cpplint_options *g:ale_cpp_cpplint_options*
This variable can be changed to modify flags given to cpplint. This variable can be changed to modify flags given to cpplint.
===============================================================================
flawfinder *ale-cpp-flawfinder*
g:ale_cpp_flawfinder_executable *g:ale_cpp_flawfinder_executable*
*b:ale_cpp_flawfinder_executable*
Type: |String|
Default: `'flawfinder'`
This variable can be changed to use a different executable for flawfinder.
g:ale_cpp_flawfinder_minlevel *g:ale_cpp_flawfinder_minlevel*
*b:ale_cpp_flawfinder_minlevel*
Type: |Number|
Default: `1`
This variable can be changed to ignore risks under the given risk threshold.
g:ale_cpp_flawfinder_options *g:ale-cpp-flawfinder*
*b:ale-cpp-flawfinder*
Type: |String|
Default: `''`
This variable can be used to pass extra options into the flawfinder command.
=============================================================================== ===============================================================================
gcc *ale-cpp-gcc* gcc *ale-cpp-gcc*

View File

@@ -38,8 +38,8 @@ mcsc *ale-cs-mcsc*
The paths to search for additional assembly files can be specified using the The paths to search for additional assembly files can be specified using the
|g:ale_cs_mcsc_assembly_path| or |b:ale_cs_mcsc_assembly_path| variables. |g:ale_cs_mcsc_assembly_path| or |b:ale_cs_mcsc_assembly_path| variables.
NOTE: ALE will not find any errors in files apart from syntax errors if any NOTE: ALE will not any errors in files apart from syntax errors if any one
one of the source files contains a syntax error. Syntax errors must be fixed of the source files contains a syntax error. Syntax errors must be fixed
first before other errors will be shown. first before other errors will be shown.
@@ -92,9 +92,8 @@ g:ale_cs_mcsc_assemblies *g:ale_cs_mcsc_assemblies*
For example: > For example: >
" Compile C# programs with the Unity engine DLL file on Mac. " Compile C# programs with the Unity engine DLL file on Mac.
let g:ale_cs_mcsc_assemblies = [ let g:ale_cs_mcss_assemblies = [
\ '/Applications/Unity/Unity.app/Contents/Frameworks/Managed/UnityEngine.dll', \ '/Applications/Unity/Unity.app/Contents/Frameworks/Managed/UnityEngine.dll',
\ 'path-to-unityproject/obj/Debug',
\] \]
< <

View File

@@ -5,7 +5,7 @@ ALE Dockerfile Integration *ale-dockerfile-options*
=============================================================================== ===============================================================================
hadolint *ale-dockerfile-hadolint* hadolint *ale-dockerfile-hadolint*
hadolint can be found at: https://github.com/hadolint/hadolint hadolint can be found at: https://github.com/lukasmartinelli/hadolint
g:ale_dockerfile_hadolint_use_docker *g:ale_dockerfile_hadolint_use_docker* g:ale_dockerfile_hadolint_use_docker *g:ale_dockerfile_hadolint_use_docker*
@@ -25,12 +25,12 @@ g:ale_dockerfile_hadolint_use_docker *g:ale_dockerfile_hadolint_use_docker*
g:ale_dockerfile_hadolint_image *g:ale_dockerfile_hadolint_image* g:ale_dockerfile_hadolint_image *g:ale_dockerfile_hadolint_image*
*b:ale_dockerfile_hadolint_image* *b:ale_dockerfile_hadolint_image*
Type: |String| Type: |String|
Default: `'hadolint/hadolint'` Default: `'lukasmartinelli/hadolint'`
This variable controls the docker image used to run hadolint. The default This variable controls the docker image used to run hadolint. The default
is hadolint's author's build, and can be found at: is hadolint's author's build, and can be found at:
https://hub.docker.com/r/hadolint/hadolint/ https://hub.docker.com/r/lukasmartinelli/hadolint/
=============================================================================== ===============================================================================

View File

@@ -13,32 +13,5 @@ g:ale_elixir_mix_options *g:ale_elixir_mix_options*
This variable can be changed to specify the mix executable. This variable can be changed to specify the mix executable.
===============================================================================
mix_format *ale-elixir-mix-format*
g:ale_elixir_mix_format_options *g:ale_elixir_mix_format_options*
*b:ale_elixir_mix_format_options*
Type: |String|
Default: `''`
This variable can be changed to specify the mix options passed to the
mix_format fixer
===============================================================================
dialyxir *ale-elixir-dialyxir*
Dialyzer, a DIscrepancy AnaLYZer for ERlang programs.
http://erlang.org/doc/man/dialyzer.html
It can be used with elixir through dialyxir
https://github.com/jeremyjh/dialyxir
Options for dialyzer are not configurable by ale, but they are instead
configured on your project's `mix.exs`.
See https://github.com/jeremyjh/dialyxir#with-explaining-stuff for more
information.
=============================================================================== ===============================================================================
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:

View File

@@ -1,15 +1,17 @@
=============================================================================== ===============================================================================
ALE Eruby Integration *ale-eruby-options* ALE Eruby Integration *ale-eruby-options*
There are three linters for `eruby` files: There are two linters for `eruby` files:
- `erb` - `erb`
- `erubis` - `erubis`
- `erubi`
`erb` is in the Ruby standard library and is mostly universal. `erubis` is the If you don't know which one your project uses, it's probably `erb`.
default parser in Rails between 3.0 and 5.1. `erubi` is the default in Rails To selectively enable one or the other, see |g:ale_linters|.
5.1 and later. To selectively enable a subset, see |g:ale_linters|.
(Note that ALE already disables linters if the executable for that linter is
not found; thus, there's probably no need to disable one of these if you're
using the other one.)
=============================================================================== ===============================================================================
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:

View File

@@ -1,14 +0,0 @@
===============================================================================
ALE Fish Integration *ale-fish-options*
Lints fish files using `fish -n`.
Note that `fish -n` is not foolproof: it sometimes gives false positives or
errors that are difficult to parse without more context. This integration skips
displaying errors if an error message is not found.
If ALE is not showing any errors but your file does not run as expected, run
`fish -n <file.fish>` from the command line.
===============================================================================
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:

View File

@@ -1,6 +0,0 @@
===============================================================================
ALE Fountain Integration *ale-fountain-options*
===============================================================================
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:

View File

@@ -1,42 +0,0 @@
===============================================================================
ALE Git Commit Integration *ale-gitcommit-options*
===============================================================================
gitlint *ale-gitcommit-gitlint*
g:ale_gitcommit_gitlint_executable *g:ale_gitcommit_gitlint_executable*
*b:ale_gitcommit_gitlint_executable*
Type: |String|
Default: `'gitlint'`
This variable can be changed to modify the executable used for gitlint.
g:ale_gitcommit_gitlint_options *g:ale_gitcommit_gitlint_options*
*b:ale_gitcommit_gitlint_options*
Type: |String|
Default: `''`
This variable can be changed to add command-line arguments to the gitlint
invocation.
For example, to dinamically set the gitlint configuration file path, you
may want to set >
let g:ale_gitcommit_gitlint_options = '-C /home/user/.config/gitlint.ini'
<
g:ale_gitcommit_gitlint_use_global *g:ale_gitcommit_gitlint_use_global*
*b:ale_gitcommit_gitlint_use_global*
Type: |Number|
Default: `0`
This variable controls whether or not ALE will search for gitlint in a
virtualenv directory first. If this variable is set to `1`, then ALE will
always use |g:ale_gitcommit_gitlint_executable| for the executable path.
Both variables can be set with `b:` buffer variables instead.
===============================================================================
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:

View File

@@ -20,19 +20,6 @@ the benefit of running a number of linters, more than ALE would by default,
while ensuring it doesn't run any linters known to be slow or resource while ensuring it doesn't run any linters known to be slow or resource
intensive. intensive.
===============================================================================
gobuild *ale-go-gobuild*
g:ale_go_gobuild_options *g:ale_go_gobuild_options*
*b:ale_go_gobuild_options*
Type: |String|
Default: `''`
This variable can be set to pass additional options to the gobuild linter.
They are injected directly after "go test".
=============================================================================== ===============================================================================
gofmt *ale-go-gofmt* gofmt *ale-go-gofmt*
@@ -43,7 +30,6 @@ g:ale_go_gofmt_options *g:ale_go_gofmt_options*
This variable can be set to pass additional options to the gofmt fixer. This variable can be set to pass additional options to the gofmt fixer.
=============================================================================== ===============================================================================
gometalinter *ale-go-gometalinter* gometalinter *ale-go-gometalinter*
@@ -73,35 +59,5 @@ g:ale_go_gometalinter_options *g:ale_go_gometalinter_options*
number of linters known to be slow or consume a lot of resources. number of linters known to be slow or consume a lot of resources.
g:ale_go_gometalinter_package *g:ale_go_gometalinter_package*
*b:ale_go_gometalinter_package*
Type: |Number|
Default: `0`
When set to `1`, the whole Go package will be checked instead of only the
current file.
===============================================================================
staticcheck *ale-go-staticcheck*
g:ale_go_staticcheck_options *g:ale_go_staticcheck_options*
*b:ale_go_staticcheck_options*
Type: |String|
Default: `''`
This variable can be set to pass additional options to the staticcheck
linter.
g:ale_go_staticcheck_package *g:ale_go_staticcheck_package*
*b:ale_go_staticcheck_package*
Type: |Number|
Default: `0`
When set to `1`, the whole Go package will be checked instead of only the
current file.
=============================================================================== ===============================================================================
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:

View File

@@ -13,10 +13,5 @@ You will need the GraphQL ESLint plugin installed for this to work.
=============================================================================== ===============================================================================
gqlint *ale-graphql-gqlint* gqlint *ale-graphql-gqlint*
===============================================================================
prettier *ale-graphql-prettier*
See |ale-javascript-prettier| for information about the available options.
=============================================================================== ===============================================================================
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:

View File

@@ -12,16 +12,6 @@ g:ale_haskell_brittany_executable *g:ale_haskell_brittany_executable*
This variable can be changed to use a different executable for brittany. This variable can be changed to use a different executable for brittany.
===============================================================================
ghc *ale-haskell-ghc*
g:ale_haskell_ghc_options *g:ale_haskell_ghc_options*
*b:ale_haskell_ghc_options*
Type: |String|
Default: `'-fno-code -v0'`
This variable can be changed to modify flags given to ghc.
=============================================================================== ===============================================================================
hdevtools *ale-haskell-hdevtools* hdevtools *ale-haskell-hdevtools*

View File

@@ -16,7 +16,7 @@ g:ale_html_htmlhint_executable *g:ale_html_htmlhint_executable*
g:ale_html_htmlhint_options *g:ale_html_htmlhint_options* g:ale_html_htmlhint_options *g:ale_html_htmlhint_options*
*b:ale_html_htmlhint_options* *b:ale_html_htmlhint_options*
Type: |String| Type: |String|
Default: `''` Default: `'--format=unix'`
This variable can be changed to modify flags given to HTMLHint. This variable can be changed to modify flags given to HTMLHint.
@@ -32,21 +32,6 @@ g:ale_html_htmlhint_use_global *g:ale_html_htmlhint_use_global*
=============================================================================== ===============================================================================
tidy *ale-html-tidy* tidy *ale-html-tidy*
`tidy` is a console application which corrects and cleans up HTML and XML
documents by fixing markup errors and upgrading legacy code to modern
standards.
Note:
`/usr/bin/tidy` on macOS (installed by default) is too old. It was released
on 31 Oct 2006. It does not consider modern HTML specs (HTML5) and shows
outdated warnings. So |ale| ignores `/usr/bin/tidy` on macOS.
To use `tidy` on macOS, please install the latest version with Homebrew:
>
$ brew install tidy-html5
<
`/usr/local/bin/tidy` is installed.
g:ale_html_tidy_executable *g:ale_html_tidy_executable* g:ale_html_tidy_executable *g:ale_html_tidy_executable*
*b:ale_html_tidy_executable* *b:ale_html_tidy_executable*
Type: |String| Type: |String|

View File

@@ -2,78 +2,12 @@
ALE JSON Integration *ale-json-options* ALE JSON Integration *ale-json-options*
===============================================================================
fixjson *ale-json-fixjson*
fixjson is a JSON file fixer/formatter for humans using (relaxed) JSON5.
It provides:
- Pretty-prints JSON input
- Fixes various failures while humans writing JSON
- Fixes trailing commas objects or arrays
- Fixes missing commas for elements of objects or arrays
- Adds quotes to keys in objects
- Newlines in strings
- Hex numbers
- Fixes single quotes to double quotes
You can install it using npm:
>
$ npm install -g fixjson
<
ALE provides fixjson integration as a fixer. See |ale-fix|.
g:ale_json_fixjson_executable *g:ale_json_fixjson_executable*
*b:ale_json_fixjson_executable*
Type: |String|
Default: `'fixjson'`
The executable that will be run for fixjson.
g:ale_json_fixjson_options *g:ale_json_fixjson_options*
*b:ale_json_fixjson_options*
Type: |String|
Default: `''`
This variable can add extra options to the command executed for running
fixjson.
g:ale_json_fixjson_use_global *g:ale_json_fixjson_use_global*
*b:ale_json_fixjson_use_global*
Type: |Number|
Default: `0`
See |ale-integrations-local-executables|
=============================================================================== ===============================================================================
jsonlint *ale-json-jsonlint* jsonlint *ale-json-jsonlint*
There are no options available. There are no options available.
===============================================================================
jq *ale-json-jq*
g:ale_json_jq_executable *g:ale_json_jq_executable*
*b:ale_json_jq_executable*
Type: |String|
Default: `'jq'`
This option can be changed to change the path for `jq`.
g:ale_json_jq_options *g:ale_json_jq_options*
*b:ale_json_jq_options*
Type: |String|
Default: `''`
This option can be changed to pass extra options to `jq`.
=============================================================================== ===============================================================================
prettier *ale-json-prettier* prettier *ale-json-prettier*

View File

@@ -1,15 +1,6 @@
=============================================================================== ===============================================================================
ALE Lua Integration *ale-lua-options* ALE Lua Integration *ale-lua-options*
===============================================================================
luac *ale-lua-luac*
g:ale_lua_luac_executable *g:ale_lua_luac_executable*
*b:ale_lua_luac_executable*
Type: |String|
Default: `'luac'`
This variable can be changed to change the path to luac.
=============================================================================== ===============================================================================
luacheck *ale-lua-luacheck* luacheck *ale-lua-luacheck*

View File

@@ -2,37 +2,6 @@
ALE Markdown Integration *ale-markdown-options* ALE Markdown Integration *ale-markdown-options*
===============================================================================
mdl *ale-markdown-mdl*
g:ale_markdown_mdl_executable *g:ale_markdown_mdl_executable*
*b:ale_markdown_mdl_executable*
Type: |String|
Default: `'mdl'`
See |ale-integrations-local-executables|
g:ale_markdown_mdl_options *g:ale_markdown_mdl_options*
*b:ale_markdown_mdl_options*
Type: |String|
Default: `''`
This variable can be set to pass additional options to mdl.
===============================================================================
prettier *ale-markdown-prettier*
See |ale-javascript-prettier| for information about the available options.
===============================================================================
textlint *ale-markdown-textlint*
See |ale-text-textlint|
=============================================================================== ===============================================================================
write-good *ale-markdown-write-good* write-good *ale-markdown-write-good*

View File

@@ -3,9 +3,6 @@ ALE Perl Integration *ale-perl-options*
ALE offers a few ways to check Perl code. Checking code with `perl` is ALE offers a few ways to check Perl code. Checking code with `perl` is
disabled by default, as `perl` code cannot be checked without executing it. disabled by default, as `perl` code cannot be checked without executing it.
Specifically, we use the `-c` flag to see if `perl` code compiles. This does
not execute all of the code in a file, but it does run `BEGIN` and `CHECK`
blocks. See `perl --help` and https://stackoverflow.com/a/12908487/406224
See |g:ale_linters|. See |g:ale_linters|.

View File

@@ -166,22 +166,5 @@ g:ale_php_phpstan_configuration *g:ale_php_phpstan_configuration*
This variable sets path to phpstan configuration file. This variable sets path to phpstan configuration file.
===============================================================================
php-cs-fixer *ale-php-php-cs-fixer*
g:ale_php_cs_fixer_executable *g:ale_php_cs_fixer_executable*
*b:ale_php_cs_fixer_executable*
Type: |String|
Default: `'php-cs-fixer'`
This variable sets executable used for php-cs-fixer.
g:ale_php_cs_fixer_use_global *g:ale_php_cs_fixer_use_global*
*b:ale_php_cs_fixer_use_global*
Type: |Boolean|
Default: `0`
This variable force globally installed fixer.
=============================================================================== ===============================================================================
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:

View File

@@ -1,12 +0,0 @@
===============================================================================
ALE PO Integration *ale-po-options*
===============================================================================
write-good *ale-po-write-good*
See |ale-write-good-options|
===============================================================================
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:

View File

@@ -1,25 +0,0 @@
===============================================================================
ALE Pony Integration *ale-pony-options*
===============================================================================
ponyc *ale-pony-ponyc*
g:ale_pony_ponyc_executable *g:ale_pony_ponyc_executable*
*b:ale_pony_ponyc_executable*
Type: |String|
Default: `'ponyc'`
See |ale-integrations-local-executables|
g:ale_pony_ponyc_options *g:ale_pony_ponyc_options*
*b:ale_pony_ponyc_options*
Type: |String|
Default: `'--pass paint'`
This variable can be set to pass options to ponyc.
===============================================================================
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:

View File

@@ -20,14 +20,5 @@ protoc-gen-lint *ale-proto-protoc-gen-lint*
The linter is a plugin for the `protoc` binary. As long as the binary resides The linter is a plugin for the `protoc` binary. As long as the binary resides
in the system path, `protoc` will find it. in the system path, `protoc` will find it.
g:ale_proto_protoc_gen_lint_options *g:ale_proto_protoc_gen_lint_options*
Type: |String|
Default: `''`
This variable can be changed to modify flags given to protoc. Note that the
directory of the linted file is always passed as an include path with '-I'
before any user-supplied options.
=============================================================================== ===============================================================================
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:

View File

@@ -104,16 +104,6 @@ g:ale_python_mypy_executable *g:ale_python_mypy_executable*
See |ale-integrations-local-executables| See |ale-integrations-local-executables|
g:ale_python_mypy_ignore_invalid_syntax
*g:ale_python_mypy_ignore_invalid_syntax*
*b:ale_python_mypy_ignore_invalid_syntax*
Type: |Number|
Default: `0`
When set to `1`, syntax error messages for mypy will be ignored. This option
can be used when running other Python linters which check for syntax errors,
as mypy can take a while to finish executing.
g:ale_python_mypy_options *g:ale_python_mypy_options* g:ale_python_mypy_options *g:ale_python_mypy_options*
*b:ale_python_mypy_options* *b:ale_python_mypy_options*
@@ -135,16 +125,16 @@ g:ale_python_mypy_use_global *g:ale_python_mypy_use_global*
=============================================================================== ===============================================================================
prospector *ale-python-prospector* prospector *ale-python-prospector*
g:ale_python_prospector_executable *g:ale_python_prospector_executable* g:ale_python_prospector_executable *g:ale_python_prospector_executable*
*b:ale_python_prospector_executable* *b:ale_python_prospector_executable*
Type: |String| Type: |String|
Default: `'prospector'` Default: `'prospector'`
See |ale-integrations-local-executables| See |ale-integrations-local-executables|
g:ale_python_prospector_options *g:ale_python_prospector_options* g:ale_python_prospector_options *g:ale_python_prospector_options*
*b:ale_python_prospector_options* *b:ale_python_prospector_options*
Type: |String| Type: |String|
Default: `''` Default: `''`
@@ -164,8 +154,8 @@ g:ale_python_prospector_options *g:ale_python_prospector_options*
`python3 -m pip install --user prospector`). `python3 -m pip install --user prospector`).
g:ale_python_prospector_use_global *g:ale_python_prospector_use_global* g:ale_python_prospector_use_global *g:ale_python_prospector_use_global*
*b:ale_python_prospector_use_global* *b:ale_python_prospector_use_global*
Type: |Number| Type: |Number|
Default: `0` Default: `0`

View File

@@ -16,14 +16,5 @@ g:ale_r_lintr_options *g:ale_r_lintr_options*
options. Consult the lintr documentation for more information. options. Consult the lintr documentation for more information.
g:ale_r_lintr_lint_package *g:ale_r_lintr_lint_package*
*b:ale_r_lintr_lint_package*
Type: |Number|
Default: `0`
When set to `1`, the file will be checked with `lintr::lint_package` instead
of `lintr::lint`. This prevents erroneous namespace warnings when linting
package files.
=============================================================================== ===============================================================================
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:

View File

@@ -86,17 +86,5 @@ g:ale_ruby_ruby_executable *g:ale_ruby_ruby_executable*
This variable can be changed to use a different executable for ruby. This variable can be changed to use a different executable for ruby.
===============================================================================
rufo *ale-ruby-rufo*
g:ale_ruby_rufo_executable *g:ale_ruby_rufo_executable*
*b:ale_ruby_rufo_executable*
Type: String
Default: `'rufo'`
Override the invoked rufo binary. This is useful for running rufo from
binstubs or a bundle.
=============================================================================== ===============================================================================
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:

Some files were not shown because too many files have changed in this diff Show More