summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Kreeftmeijer <jeffkreeftmeijer@gmail.com>2017-10-08 14:45:10 +0200
committerJeff Kreeftmeijer <jeffkreeftmeijer@gmail.com>2018-11-14 21:41:18 +0100
commit7c7390119966f5f8f45a02cda94c09d4fa117a63 (patch)
tree046a83de9da1f2ab3d548582d0507503da68b6f5
parentdd7b2188ab2cc50d548d38f8ebfcccc1ae61983a (diff)
downloadale-7c7390119966f5f8f45a02cda94c09d4fa117a63.zip
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.
-rw-r--r--README.md2
-rw-r--r--ale_linters/asciidoc/vale.vim9
-rw-r--r--doc/ale.txt2
3 files changed, 11 insertions, 2 deletions
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`