From 1e574ed5f7c9d3b6b0b3b4d209984102eba079b2 Mon Sep 17 00:00:00 2001 From: Johannes Wienke Date: Mon, 18 Dec 2017 15:26:52 +0100 Subject: [PATCH] Make alex a file linter alex does not find its configuration file when using temporary files for input. --- README.md | 24 ++++++++++++------------ ale_linters/asciidoc/alex.vim | 5 +++-- ale_linters/help/alex.vim | 3 ++- ale_linters/html/alex.vim | 3 ++- ale_linters/mail/alex.vim | 3 ++- ale_linters/markdown/alex.vim | 3 ++- ale_linters/nroff/alex.vim | 3 ++- ale_linters/pod/alex.vim | 3 ++- ale_linters/rst/alex.vim | 3 ++- ale_linters/tex/alex.vim | 3 ++- ale_linters/texinfo/alex.vim | 3 ++- ale_linters/text/alex.vim | 3 ++- ale_linters/xhtml/alex.vim | 3 ++- doc/ale.txt | 24 ++++++++++++------------ 14 files changed, 49 insertions(+), 37 deletions(-) diff --git a/README.md b/README.md index ec8788a..e939e6f 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ formatting. | ASM | [gcc](https://gcc.gnu.org) | | Ansible | [ansible-lint](https://github.com/willthames/ansible-lint) | | API Blueprint | [drafter](https://github.com/apiaryio/drafter) | -| AsciiDoc | [alex](https://github.com/wooorm/alex), [proselint](http://proselint.com/), [redpen](http://redpen.cc/), [write-good](https://github.com/btford/write-good) | +| AsciiDoc | [alex](https://github.com/wooorm/alex) !!, [proselint](http://proselint.com/), [redpen](http://redpen.cc/), [write-good](https://github.com/btford/write-good) | | 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) | | Bourne Shell | shell [-n flag](http://linux.die.net/man/1/sh), [shellcheck](https://www.shellcheck.net/), [shfmt](https://github.com/mvdan/sh) | @@ -106,36 +106,36 @@ formatting. | Haml | [haml-lint](https://github.com/brigade/haml-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) | -| HTML | [alex](https://github.com/wooorm/alex), [HTMLHint](http://htmlhint.com/), [proselint](http://proselint.com/), [tidy](http://www.html-tidy.org/), [write-good](https://github.com/btford/write-good) | +| HTML | [alex](https://github.com/wooorm/alex) !!, [HTMLHint](http://htmlhint.com/), [proselint](http://proselint.com/), [tidy](http://www.html-tidy.org/), [write-good](https://github.com/btford/write-good) | | 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) | | 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 | [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 | -| 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) | | LLVM | [llc](https://llvm.org/docs/CommandGuide/llc.html) | | 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) | -| 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) | +| 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) | | Nim | [nim check](https://nim-lang.org/docs/nimc.html) !! | | nix | [nix-instantiate](http://nixos.org/nix/manual/#sec-nix-instantiate) | -| nroff | [alex](https://github.com/wooorm/alex), [proselint](http://proselint.com/), [write-good](https://github.com/btford/write-good)| +| nroff | [alex](https://github.com/wooorm/alex) !!, [proselint](http://proselint.com/), [write-good](https://github.com/btford/write-good)| | 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) | | 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) | -| 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) | | proto | [protoc-gen-lint](https://github.com/ckaznocha/protoc-gen-lint) | | Pug | [pug-lint](https://github.com/pugjs/pug-lint) | | 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) | | R | [lintr](https://github.com/jimhester/lintr) | | 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/) | | 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) | @@ -151,14 +151,14 @@ formatting. | Swift | [swiftlint](https://github.com/realm/SwiftLint), [swiftformat](https://github.com/nicklockwood/SwiftFormat) | | Tcl | [nagelfar](http://nagelfar.sourceforge.net) !! | | 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)| -| 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/) | +| 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/), [vale](https://github.com/ValeLint/vale), [write-good](https://github.com/btford/write-good), [redpen](http://redpen.cc/) | | 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 | | Verilog | [iverilog](https://github.com/steveicarus/iverilog), [verilator](http://www.veripool.org/projects/verilator/wiki/Intro) | | 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) | -| XHTML | [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) | +| 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) | | YAML | [swaglint](https://github.com/byCedric/swaglint), [yamllint](https://yamllint.readthedocs.io/) | diff --git a/ale_linters/asciidoc/alex.vim b/ale_linters/asciidoc/alex.vim index a1e50de..79b04fc 100644 --- a/ale_linters/asciidoc/alex.vim +++ b/ale_linters/asciidoc/alex.vim @@ -1,10 +1,11 @@ " Author: Johannes Wienke " Description: alex for asciidoc files -call ale#linter#Define('asciidoc', { +call ale#linter#Define('help', { \ 'name': 'alex', \ 'executable': 'alex', -\ 'command': 'alex %t -t', +\ 'command': 'alex %s -t', \ 'output_stream': 'stderr', \ 'callback': 'ale#handlers#alex#Handle', +\ 'lint_file': 1, \}) diff --git a/ale_linters/help/alex.vim b/ale_linters/help/alex.vim index 9b3e4ee..21b23b4 100644 --- a/ale_linters/help/alex.vim +++ b/ale_linters/help/alex.vim @@ -4,7 +4,8 @@ call ale#linter#Define('help', { \ 'name': 'alex', \ 'executable': 'alex', -\ 'command': 'alex %t -t', +\ 'command': 'alex %s -t', \ 'output_stream': 'stderr', \ 'callback': 'ale#handlers#alex#Handle', +\ 'lint_file': 1, \}) diff --git a/ale_linters/html/alex.vim b/ale_linters/html/alex.vim index 85dc4fd..5a1f61e 100644 --- a/ale_linters/html/alex.vim +++ b/ale_linters/html/alex.vim @@ -4,7 +4,8 @@ call ale#linter#Define('html', { \ 'name': 'alex', \ 'executable': 'alex', -\ 'command': 'alex %t -t', +\ 'command': 'alex %s -t', \ 'output_stream': 'stderr', \ 'callback': 'ale#handlers#alex#Handle', +\ 'lint_file': 1, \}) diff --git a/ale_linters/mail/alex.vim b/ale_linters/mail/alex.vim index 047e6cf..b0651cc 100644 --- a/ale_linters/mail/alex.vim +++ b/ale_linters/mail/alex.vim @@ -4,7 +4,8 @@ call ale#linter#Define('mail', { \ 'name': 'alex', \ 'executable': 'alex', -\ 'command': 'alex %t -t', +\ 'command': 'alex %s -t', \ 'output_stream': 'stderr', \ 'callback': 'ale#handlers#alex#Handle', +\ 'lint_file': 1, \}) diff --git a/ale_linters/markdown/alex.vim b/ale_linters/markdown/alex.vim index 1e3e368..2930614 100644 --- a/ale_linters/markdown/alex.vim +++ b/ale_linters/markdown/alex.vim @@ -4,7 +4,8 @@ call ale#linter#Define('markdown', { \ 'name': 'alex', \ 'executable': 'alex', -\ 'command': 'alex %t -t', +\ 'command': 'alex %s -t', \ 'output_stream': 'stderr', \ 'callback': 'ale#handlers#alex#Handle', +\ 'lint_file': 1, \}) diff --git a/ale_linters/nroff/alex.vim b/ale_linters/nroff/alex.vim index 911ac41..a10db2d 100644 --- a/ale_linters/nroff/alex.vim +++ b/ale_linters/nroff/alex.vim @@ -4,7 +4,8 @@ call ale#linter#Define('nroff', { \ 'name': 'alex', \ 'executable': 'alex', -\ 'command': 'alex %t -t', +\ 'command': 'alex %s -t', \ 'output_stream': 'stderr', \ 'callback': 'ale#handlers#alex#Handle', +\ 'lint_file': 1, \}) diff --git a/ale_linters/pod/alex.vim b/ale_linters/pod/alex.vim index 8bc205d..5c09bef 100644 --- a/ale_linters/pod/alex.vim +++ b/ale_linters/pod/alex.vim @@ -4,7 +4,8 @@ call ale#linter#Define('pod', { \ 'name': 'alex', \ 'executable': 'alex', -\ 'command': 'alex %t -t', +\ 'command': 'alex %s -t', \ 'output_stream': 'stderr', \ 'callback': 'ale#handlers#alex#Handle', +\ 'lint_file': 1, \}) diff --git a/ale_linters/rst/alex.vim b/ale_linters/rst/alex.vim index 1fed723..e637eae 100644 --- a/ale_linters/rst/alex.vim +++ b/ale_linters/rst/alex.vim @@ -4,7 +4,8 @@ call ale#linter#Define('rst', { \ 'name': 'alex', \ 'executable': 'alex', -\ 'command': 'alex %t -t', +\ 'command': 'alex %s -t', \ 'output_stream': 'stderr', \ 'callback': 'ale#handlers#alex#Handle', +\ 'lint_file': 1, \}) diff --git a/ale_linters/tex/alex.vim b/ale_linters/tex/alex.vim index da82856..78c530f 100644 --- a/ale_linters/tex/alex.vim +++ b/ale_linters/tex/alex.vim @@ -4,7 +4,8 @@ call ale#linter#Define('tex', { \ 'name': 'alex', \ 'executable': 'alex', -\ 'command': 'alex %t -t', +\ 'command': 'alex %s -t', \ 'output_stream': 'stderr', \ 'callback': 'ale#handlers#alex#Handle', +\ 'lint_file': 1, \}) diff --git a/ale_linters/texinfo/alex.vim b/ale_linters/texinfo/alex.vim index 41969fd..4a88457 100644 --- a/ale_linters/texinfo/alex.vim +++ b/ale_linters/texinfo/alex.vim @@ -4,7 +4,8 @@ call ale#linter#Define('texinfo', { \ 'name': 'alex', \ 'executable': 'alex', -\ 'command': 'alex %t -t', +\ 'command': 'alex %s -t', \ 'output_stream': 'stderr', \ 'callback': 'ale#handlers#alex#Handle', +\ 'lint_file': 1, \}) diff --git a/ale_linters/text/alex.vim b/ale_linters/text/alex.vim index 32d8ce2..c696367 100644 --- a/ale_linters/text/alex.vim +++ b/ale_linters/text/alex.vim @@ -4,7 +4,8 @@ call ale#linter#Define('text', { \ 'name': 'alex', \ 'executable': 'alex', -\ 'command': 'alex %t -t', +\ 'command': 'alex %s -t', \ 'output_stream': 'stderr', \ 'callback': 'ale#handlers#alex#Handle', +\ 'lint_file': 1, \}) diff --git a/ale_linters/xhtml/alex.vim b/ale_linters/xhtml/alex.vim index cf073cb..60a9a7c 100644 --- a/ale_linters/xhtml/alex.vim +++ b/ale_linters/xhtml/alex.vim @@ -4,7 +4,8 @@ call ale#linter#Define('xhtml', { \ 'name': 'alex', \ 'executable': 'alex', -\ 'command': 'alex %t -t', +\ 'command': 'alex %s -t', \ 'output_stream': 'stderr', \ 'callback': 'ale#handlers#alex#Handle', +\ 'lint_file': 1, \}) diff --git a/doc/ale.txt b/doc/ale.txt index b7f14f8..bdcb39f 100644 --- a/doc/ale.txt +++ b/doc/ale.txt @@ -275,7 +275,7 @@ Notes: * ASM: `gcc` * Ansible: `ansible-lint` * API Blueprint: `drafter` -* AsciiDoc: `alex`, `proselint`, `redpen`, `write-good` +* AsciiDoc: `alex`!!, `proselint`, `redpen`, `write-good` * Awk: `gawk` * Bash: `shell` (-n flag), `shellcheck`, `shfmt` * Bourne Shell: `shell` (-n flag), `shellcheck`, `shfmt` @@ -306,36 +306,36 @@ Notes: * Haml: `haml-lint` * Handlebars: `ember-template-lint` * Haskell: `brittany`, `ghc`, `stack-ghc`, `stack-build`!!, `ghc-mod`, `stack-ghc-mod`, `hlint`, `hdevtools`, `hfmt` -* HTML: `alex`, `HTMLHint`, `proselint`, `tidy`, `write-good` +* HTML: `alex`!!, `HTMLHint`, `proselint`, `tidy`, `write-good` * Idris: `idris` * Java: `checkstyle`, `javac`, `google-java-format` * JavaScript: `eslint`, `flow`, `jscs`, `jshint`, `prettier`, `prettier-eslint`, `prettier-standard`, `standard`, `xo` * JSON: `jsonlint`, `prettier` * Kotlin: `kotlinc`, `ktlint` -* LaTeX (tex): `alex`, `chktex`, `lacheck`, `proselint`, `redpen`, `vale`, `write-good` +* LaTeX (tex): `alex`!!, `chktex`, `lacheck`, `proselint`, `redpen`, `vale`, `write-good` * Less: `lessc`, `prettier`, `stylelint` * LLVM: `llc` * Lua: `luacheck` -* Mail: `alex`, `proselint`, `vale` +* Mail: `alex`!!, `proselint`, `vale` * Make: `checkmake` -* Markdown: `alex`, `mdl`, `proselint`, `redpen`, `remark-lint`, `vale`, `write-good` +* Markdown: `alex`!!, `mdl`, `proselint`, `redpen`, `remark-lint`, `vale`, `write-good` * MATLAB: `mlint` * Nim: `nim check`!! * nix: `nix-instantiate` -* nroff: `alex`, `proselint`, `write-good` +* nroff: `alex`!!, `proselint`, `write-good` * Objective-C: `clang` * Objective-C++: `clang` * OCaml: `merlin` (see |ale-ocaml-merlin|), `ols` * Perl: `perl -c`, `perl-critic` * PHP: `hack`, `hackfmt`, `langserver`, `phan`, `php -l`, `phpcs`, `phpmd`, `phpstan`, `phpcbf` -* Pod: `alex`, `proselint`, `write-good` +* Pod: `alex`!!, `proselint`, `write-good` * proto: `protoc-gen-lint` * Pug: `pug-lint` * Puppet: `puppet`, `puppet-lint` * Python: `autopep8`, `flake8`, `isort`, `mypy`, `prospector`, `pycodestyle`, `pyls`, `pylint`!!, `yapf` * R: `lintr` * ReasonML: `merlin`, `ols`, `refmt` -* reStructuredText: `alex`, `proselint`, `redpen`, `rstcheck`, `vale`, `write-good` +* reStructuredText: `alex`!!, `proselint`, `redpen`, `rstcheck`, `vale`, `write-good` * Re:VIEW: `redpen` * RPM spec: `rpmlint` * Ruby: `brakeman`, `rails_best_practices`!!, `reek`, `rubocop`, `ruby` @@ -351,14 +351,14 @@ Notes: * Swift: `swiftlint`, `swiftformat` * Tcl: `nagelfar`!! * Terraform: `tflint` -* Texinfo: `alex`, `proselint`, `write-good` -* Text^: `alex`, `proselint`, `vale`, `write-good`, `redpen` +* Texinfo: `alex`!!, `proselint`, `write-good` +* Text^: `alex`!!, `proselint`, `vale`, `write-good`, `redpen` * Thrift: `thrift` * TypeScript: `eslint`, `prettier`, `tslint`, `tsserver`, `typecheck` * Verilog: `iverilog`, `verilator` * Vim: `vint` -* Vim help^: `alex`, `proselint`, `write-good` -* XHTML: `alex`, `proselint`, `write-good` +* Vim help^: `alex`!!, `proselint`, `write-good` +* XHTML: `alex`!!, `proselint`, `write-good` * XML: `xmllint` * YAML: `swaglint`, `yamllint`