proselint: Add more supported filetypes (#367)

* proselint: Add more suported filetypes

* proselint: Minor consistency fixes

* Vim help: Disable linters by default
This commit is contained in:
Daniel M. Capella 2017-03-01 19:06:09 -05:00 committed by w0rp
parent 6befe9e37c
commit 18508f7453
14 changed files with 98 additions and 11 deletions

View File

@ -53,6 +53,7 @@ name. That seems to be the fairest way to arrange this table.
| Language | Tools |
| -------- | ----- |
| Ansible | [ansible-lint](https://github.com/willthames/ansible-lint) |
| AsciiDoc | [proselint](http://proselint.com/)|
| Bash | [-n flag](https://www.gnu.org/software/bash/manual/bash.html#index-set), [shellcheck](https://www.shellcheck.net/) |
| Bourne Shell | [-n flag](http://linux.die.net/man/1/sh), [shellcheck](https://www.shellcheck.net/) |
| C | [cppcheck](http://cppcheck.sourceforge.net), [gcc](https://gcc.gnu.org/), [clang](http://clang.llvm.org/)|
@ -71,7 +72,7 @@ name. That seems to be the fairest way to arrange this table.
| Fortran | [gcc](https://gcc.gnu.org/) |
| Go | [gofmt -e](https://golang.org/cmd/gofmt/), [go vet](https://golang.org/cmd/vet/), [golint](https://godoc.org/github.com/golang/lint), [go build](https://golang.org/cmd/go/) |
| Haskell | [ghc](https://www.haskell.org/ghc/), [hlint](https://hackage.haskell.org/package/hlint) |
| HTML | [HTMLHint](http://htmlhint.com/), [tidy](http://www.html-tidy.org/) |
| HTML | [HTMLHint](http://htmlhint.com/), [proselint](http://proselint.com/), [tidy](http://www.html-tidy.org/) |
| Java | [javac](http://www.oracle.com/technetwork/java/javase/downloads/index.html) |
| JavaScript | [eslint](http://eslint.org/), [jscs](http://jscs.info/), [jshint](http://jshint.com/), [flow](https://flowtype.org/), [standard](http://standardjs.com/)
| JSON | [jsonlint](http://zaa.ch/jsonlint/) |
@ -79,12 +80,15 @@ name. That seems to be the fairest way to arrange this table.
| Lua | [luacheck](https://github.com/mpeterv/luacheck) |
| Markdown | [mdl](https://github.com/mivok/markdownlint), [proselint](http://proselint.com/)|
| MATLAB | [mlint](https://www.mathworks.com/help/matlab/ref/mlint.html) |
| nroff | [proselint](http://proselint.com/)|
| OCaml | [merlin](https://github.com/the-lambda-church/merlin) see `:help ale-integration-ocaml-merlin` for configuration instructions
| Perl | [perl -c](https://perl.org/), [perl-critic](https://metacpan.org/pod/Perl::Critic) |
| PHP | [hack](http://hacklang.org/), [php -l](https://secure.php.net/), [phpcs](https://github.com/squizlabs/PHP_CodeSniffer), [phpmd](https://phpmd.org) |
| Pod | [proselint](http://proselint.com/)|
| Pug | [pug-lint](https://github.com/pugjs/pug-lint) |
| Puppet | [puppet](https://puppet.com), [puppet-lint](https://puppet-lint.com) |
| Python | [flake8](http://flake8.pycqa.org/en/latest/), [mypy](http://mypy-lang.org/), [pylint](https://www.pylint.org/) |
| reStructuredText | [proselint](http://proselint.com/)|
| Ruby | [rubocop](https://github.com/bbatsov/rubocop) |
| Rust | [rustc](https://www.rust-lang.org/), cargo (see `:help ale-integration-rust` for configuration instructions) |
| SASS | [sass-lint](https://www.npmjs.com/package/sass-lint), [stylelint](https://github.com/stylelint/stylelint) |
@ -93,13 +97,16 @@ name. That seems to be the fairest way to arrange this table.
| SML | [smlnj](http://www.smlnj.org/) |
| Swift | [swiftlint](https://swift.org/) |
| Tex | [proselint](http://proselint.com/) |
| Text^^ | [proselint](http://proselint.com/) |
| Texinfo | [proselint](http://proselint.com/)|
| Text^ | [proselint](http://proselint.com/) |
| TypeScript | [tslint](https://github.com/palantir/tslint), 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^ | [proselint](http://proselint.com/)|
| XHTML | [proselint](http://proselint.com/)|
| YAML | [yamllint](https://yamllint.readthedocs.io/) |
* *^^ No text linters are enabled by default.*
* *^ No linters for text or Vim help filetypes are enabled by default.*
<a name="usage"></a>

View File

@ -0,0 +1,9 @@
" Author: Daniel M. Capella https://github.com/polyzen
" Description: proselint for AsciiDoc files
call ale#linter#Define('asciidoc', {
\ 'name': 'proselint',
\ 'executable': 'proselint',
\ 'command': 'proselint %t',
\ 'callback': 'ale#handlers#HandleUnixFormatAsWarning',
\})

View File

@ -0,0 +1,9 @@
" Author: Daniel M. Capella https://github.com/polyzen
" Description: proselint for Vim help files
call ale#linter#Define('help', {
\ 'name': 'proselint',
\ 'executable': 'proselint',
\ 'command': 'proselint %t',
\ 'callback': 'ale#handlers#HandleUnixFormatAsWarning',
\})

View File

@ -0,0 +1,9 @@
" Author: Daniel M. Capella https://github.com/polyzen
" Description: proselint for HTML files
call ale#linter#Define('html', {
\ 'name': 'proselint',
\ 'executable': 'proselint',
\ 'command': 'proselint %t',
\ 'callback': 'ale#handlers#HandleUnixFormatAsWarning',
\})

View File

@ -1,5 +1,5 @@
" Author: poohzrn https://github.com/poohzrn
" Description: proselint for markdown files
" Description: proselint for Markdown files
call ale#linter#Define('markdown', {
\ 'name': 'proselint',

View File

@ -0,0 +1,9 @@
" Author: Daniel M. Capella https://github.com/polyzen
" Description: proselint for nroff files
call ale#linter#Define('nroff', {
\ 'name': 'proselint',
\ 'executable': 'proselint',
\ 'command': 'proselint %t',
\ 'callback': 'ale#handlers#HandleUnixFormatAsWarning',
\})

View File

@ -0,0 +1,9 @@
" Author: Daniel M. Capella https://github.com/polyzen
" Description: proselint for Pod files
call ale#linter#Define('pod', {
\ 'name': 'proselint',
\ 'executable': 'proselint',
\ 'command': 'proselint %t',
\ 'callback': 'ale#handlers#HandleUnixFormatAsWarning',
\})

View File

@ -0,0 +1,9 @@
" Author: Daniel M. Capella https://github.com/polyzen
" Description: proselint for reStructuredText files
call ale#linter#Define('rst', {
\ 'name': 'proselint',
\ 'executable': 'proselint',
\ 'command': 'proselint %t',
\ 'callback': 'ale#handlers#HandleUnixFormatAsWarning',
\})

View File

@ -1,5 +1,5 @@
" Author: poohzrn https://github.com/poohzrn
" Description: proselint for tex files
" Description: proselint for TeX files
call ale#linter#Define('tex', {
\ 'name': 'proselint',

View File

@ -0,0 +1,9 @@
" Author: Daniel M. Capella https://github.com/polyzen
" Description: proselint for Texinfo files
call ale#linter#Define('texinfo', {
\ 'name': 'proselint',
\ 'executable': 'proselint',
\ 'command': 'proselint %t',
\ 'callback': 'ale#handlers#HandleUnixFormatAsWarning',
\})

View File

@ -4,6 +4,6 @@
call ale#linter#Define('text', {
\ 'name': 'proselint',
\ 'executable': 'proselint',
\ 'callback': 'ale#handlers#HandleUnixFormatAsWarning',
\ 'command': 'proselint %t',
\ 'callback': 'ale#handlers#HandleUnixFormatAsWarning',
\})

View File

@ -0,0 +1,9 @@
" Author: Daniel M. Capella https://github.com/polyzen
" Description: proselint for XHTML files
call ale#linter#Define('xhtml', {
\ 'name': 'proselint',
\ 'executable': 'proselint',
\ 'command': 'proselint %t',
\ 'callback': 'ale#handlers#HandleUnixFormatAsWarning',
\})

View File

@ -22,6 +22,7 @@ let s:default_ale_linter_aliases = {
" Only cargo is enabled for Rust by default.
let s:default_ale_linters = {
\ 'csh': ['shell'],
\ 'help': [],
\ 'rust': ['cargo'],
\ 'text': [],
\ 'zsh': ['shell'],

View File

@ -73,6 +73,7 @@ ALE supports the following key features:
The following languages and tools are supported.
* Ansible: 'ansible-lint'
* Asciidoc: 'proselint'
* Bash: 'shell' (-n flag), 'shellcheck'
* Bourne Shell: 'shell' (-n flag), 'shellcheck'
* C: 'cppcheck', 'gcc', 'clang'
@ -91,20 +92,23 @@ The following languages and tools are supported.
* Fortran: 'gcc'
* Go: 'gofmt -e', 'go vet', 'golint', 'go build'
* Haskell: 'ghc', 'hlint'
* HTML: 'HTMLHint', 'tidy'
* HTML: 'HTMLHint', 'proselint', 'tidy'
* Java: 'javac'
* JavaScript: 'eslint', 'jscs', 'jshint', 'flow', 'xo'
* JSON: 'jsonlint'
* LaTeX: 'chktex', 'lacheck'
* Lua: 'luacheck'
* Markdown: 'mdl'
* Markdown: 'mdl', 'proselint'
* MATLAB: 'mlint'
* nroff: 'proselint'
* OCaml: 'merlin' (see |ale-linter-integration-ocaml-merlin|)
* Perl: 'perl' (-c flag), 'perlcritic'
* PHP: 'hack', 'php' (-l flag), 'phpcs', 'phpmd'
* Pod: 'proselint'
* Pug: 'pug-lint'
* Puppet: 'puppet', 'puppet-lint'
* Python: 'flake8', 'mypy', 'pylint'
* reStructuredText: 'proselint'
* Rust: 'rustc' (see |ale-integration-rust|)
* Ruby: 'rubocop'
* SASS: 'sasslint', 'stylelint'
@ -113,10 +117,13 @@ The following languages and tools are supported.
* SML: 'smlnj'
* Swift: 'swiftlint'
* Tex: 'proselint'
* Texinfo: 'proselint'
* Text: 'proselint'
* TypeScript: 'tslint', 'typecheck'
* Verilog: 'iverilog', 'verilator'
* Vim: 'vint'
* Vim help: 'proselint'
* XHTML: 'proselint'
* YAML: 'yamllint'
===============================================================================
@ -1371,7 +1378,7 @@ ale#linter#Define(filetype, linter) *ale#linter#Define()*
<
Any substring `%t` will be replaced with a path to a temporary file. Merely
adding `%t` will cause ALE to create a temporary file containing the
contents of the the buffer being checked. All occurrences of `%t` in command
contents of the buffer being checked. All occurrences of `%t` in command
strings will reference the one temporary file. The temporary file will be
created inside a temporary directory, and the entire temporary directory
will be automatically deleted, following the behaviour of