From 7c7390119966f5f8f45a02cda94c09d4fa117a63 Mon Sep 17 00:00:00 2001 From: Jeff Kreeftmeijer Date: Sun, 8 Oct 2017 14:45:10 +0200 Subject: [PATCH] Add Vale linter for AsciiDoc Vale supports AsciiDoc. This patch adds a Vale linter for AsciiDoc files, which is based on the existing Markdown linter. --- README.md | 2 +- ale_linters/asciidoc/vale.vim | 9 +++++++++ doc/ale.txt | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 ale_linters/asciidoc/vale.vim diff --git a/README.md b/README.md index 4540ac9f..9d37db74 100644 --- a/README.md +++ b/README.md @@ -100,7 +100,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), [vale](https://github.com/ValeLint/vale) | | Awk | [gawk](https://www.gnu.org/software/gawk/)| | Bash | [language-server](https://github.com/mads-hartmann/bash-language-server), 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) | diff --git a/ale_linters/asciidoc/vale.vim b/ale_linters/asciidoc/vale.vim new file mode 100644 index 00000000..b3cf4547 --- /dev/null +++ b/ale_linters/asciidoc/vale.vim @@ -0,0 +1,9 @@ +" Author: Jeff Kreeftmeijer https://github.com/jeffkreeftmeijer +" Description: vale for AsciiDoc files + +call ale#linter#Define('asciidoc', { +\ 'name': 'vale', +\ 'executable': 'vale', +\ 'command': 'vale --output=line %t', +\ 'callback': 'ale#handlers#unix#HandleAsWarning', +\}) diff --git a/doc/ale.txt b/doc/ale.txt index 96150f12..c1c104e6 100644 --- a/doc/ale.txt +++ b/doc/ale.txt @@ -395,7 +395,7 @@ Notes: * ASM: `gcc` * Ansible: `ansible-lint` * API Blueprint: `drafter` -* AsciiDoc: `alex`!!, `proselint`, `redpen`, `write-good` +* AsciiDoc: `alex`!!, `proselint`, `redpen`, `write-good`, `vale` * Awk: `gawk` * Bash: `language-server`, `shell` (-n flag), `shellcheck`, `shfmt` * Bourne Shell: `shell` (-n flag), `shellcheck`, `shfmt`