summaryrefslogtreecommitdiff
path: root/ale_linters
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2018-07-24 10:05:44 +0100
committerw0rp <devw0rp@gmail.com>2018-07-24 10:05:44 +0100
commitd368f090aeeca3545dd03b1bfe4bff5e6a95d7e2 (patch)
tree01cb50e7de53bd94f162a59bdefb0a21c08699e6 /ale_linters
parent95be2bf1ff9221eb74dc028ca616412305b2bc85 (diff)
downloadale-d368f090aeeca3545dd03b1bfe4bff5e6a95d7e2.zip
#1754 Require snake_case names for linters in the codebase
Diffstat (limited to 'ale_linters')
-rw-r--r--ale_linters/asciidoc/writegood.vim7
-rw-r--r--ale_linters/go/gobuild.vim3
-rw-r--r--ale_linters/go/govet.vim3
-rw-r--r--ale_linters/haskell/cabal_ghc.vim3
-rw-r--r--ale_linters/haskell/ghc-mod.vim6
-rw-r--r--ale_linters/haskell/stack_build.vim3
-rw-r--r--ale_linters/haskell/stack_ghc.vim3
-rw-r--r--ale_linters/help/writegood.vim7
-rw-r--r--ale_linters/html/writegood.vim9
-rw-r--r--ale_linters/markdown/remark_lint.vim4
-rw-r--r--ale_linters/markdown/writegood.vim7
-rw-r--r--ale_linters/nroff/writegood.vim7
-rw-r--r--ale_linters/po/writegood.vim7
-rw-r--r--ale_linters/pod/writegood.vim7
-rw-r--r--ale_linters/rst/writegood.vim7
-rw-r--r--ale_linters/sml/smlnj_cm.vim3
-rw-r--r--ale_linters/tex/writegood.vim7
-rw-r--r--ale_linters/texinfo/writegood.vim7
-rw-r--r--ale_linters/text/writegood.vim7
-rw-r--r--ale_linters/xhtml/writegood.vim7
20 files changed, 32 insertions, 82 deletions
diff --git a/ale_linters/asciidoc/writegood.vim b/ale_linters/asciidoc/writegood.vim
index c986cc6c..a29b7e9c 100644
--- a/ale_linters/asciidoc/writegood.vim
+++ b/ale_linters/asciidoc/writegood.vim
@@ -1,9 +1,4 @@
" Author: Sumner Evans <sumner.evans98@gmail.com>
" Description: write-good for AsciiDoc files
-call ale#linter#Define('asciidoc', {
-\ 'name': 'write-good',
-\ 'executable_callback': 'ale#handlers#writegood#GetExecutable',
-\ 'command_callback': 'ale#handlers#writegood#GetCommand',
-\ 'callback': 'ale#handlers#writegood#Handle',
-\})
+call ale#handlers#writegood#DefineLinter('asciidoc')
diff --git a/ale_linters/go/gobuild.vim b/ale_linters/go/gobuild.vim
index 068877a3..c4608071 100644
--- a/ale_linters/go/gobuild.vim
+++ b/ale_linters/go/gobuild.vim
@@ -70,7 +70,8 @@ function! ale_linters#go#gobuild#Handler(buffer, lines) abort
endfunction
call ale#linter#Define('go', {
-\ 'name': 'go build',
+\ 'name': 'gobuild',
+\ 'aliases': ['go build'],
\ 'executable': 'go',
\ 'command_chain': [
\ {'callback': 'ale_linters#go#gobuild#GoEnv', 'output_stream': 'stdout'},
diff --git a/ale_linters/go/govet.vim b/ale_linters/go/govet.vim
index edf9eb66..e94e6ecd 100644
--- a/ale_linters/go/govet.vim
+++ b/ale_linters/go/govet.vim
@@ -9,7 +9,8 @@ function! ale_linters#go#govet#GetCommand(buffer) abort
endfunction
call ale#linter#Define('go', {
-\ 'name': 'go vet',
+\ 'name': 'govet',
+\ 'aliases': ['go vet'],
\ 'output_stream': 'stderr',
\ 'executable': 'go',
\ 'command_callback': 'ale_linters#go#govet#GetCommand',
diff --git a/ale_linters/haskell/cabal_ghc.vim b/ale_linters/haskell/cabal_ghc.vim
index 79fd8ff9..003adf5d 100644
--- a/ale_linters/haskell/cabal_ghc.vim
+++ b/ale_linters/haskell/cabal_ghc.vim
@@ -10,7 +10,8 @@ function! ale_linters#haskell#cabal_ghc#GetCommand(buffer) abort
endfunction
call ale#linter#Define('haskell', {
-\ 'name': 'cabal-ghc',
+\ 'name': 'cabal_ghc',
+\ 'aliases': ['cabal-ghc'],
\ 'output_stream': 'stderr',
\ 'executable': 'cabal',
\ 'command_callback': 'ale_linters#haskell#cabal_ghc#GetCommand',
diff --git a/ale_linters/haskell/ghc-mod.vim b/ale_linters/haskell/ghc-mod.vim
index 1b15d8c2..eb032f50 100644
--- a/ale_linters/haskell/ghc-mod.vim
+++ b/ale_linters/haskell/ghc-mod.vim
@@ -2,14 +2,16 @@
" Description: ghc-mod for Haskell files
call ale#linter#Define('haskell', {
-\ 'name': 'ghc-mod',
+\ 'name': 'ghc_mod',
+\ 'aliases': ['ghc-mod'],
\ 'executable': 'ghc-mod',
\ 'command': 'ghc-mod --map-file %s=%t check %s',
\ 'callback': 'ale#handlers#haskell#HandleGHCFormat',
\})
call ale#linter#Define('haskell', {
-\ 'name': 'stack-ghc-mod',
+\ 'name': 'stack_ghc_mod',
+\ 'aliases': ['stack-ghc-mod'],
\ 'executable': 'stack',
\ 'command': 'stack exec ghc-mod -- --map-file %s=%t check %s',
\ 'callback': 'ale#handlers#haskell#HandleGHCFormat',
diff --git a/ale_linters/haskell/stack_build.vim b/ale_linters/haskell/stack_build.vim
index 44e2e86f..f5bdf4b8 100644
--- a/ale_linters/haskell/stack_build.vim
+++ b/ale_linters/haskell/stack_build.vim
@@ -13,7 +13,8 @@ function! ale_linters#haskell#stack_build#GetCommand(buffer) abort
endfunction
call ale#linter#Define('haskell', {
-\ 'name': 'stack-build',
+\ 'name': 'stack_build',
+\ 'aliases': ['stack-build'],
\ 'output_stream': 'stderr',
\ 'executable': 'stack',
\ 'command_callback': 'ale_linters#haskell#stack_build#GetCommand',
diff --git a/ale_linters/haskell/stack_ghc.vim b/ale_linters/haskell/stack_ghc.vim
index 0367dc24..d702aa68 100644
--- a/ale_linters/haskell/stack_ghc.vim
+++ b/ale_linters/haskell/stack_ghc.vim
@@ -2,7 +2,8 @@
" Description: ghc for Haskell files, using Stack
call ale#linter#Define('haskell', {
-\ 'name': 'stack-ghc',
+\ 'name': 'stack_ghc',
+\ 'aliases': ['stack-ghc'],
\ 'output_stream': 'stderr',
\ 'executable': 'stack',
\ 'command': 'stack ghc -- -fno-code -v0 %t',
diff --git a/ale_linters/help/writegood.vim b/ale_linters/help/writegood.vim
index 11254cd2..eeb21a73 100644
--- a/ale_linters/help/writegood.vim
+++ b/ale_linters/help/writegood.vim
@@ -1,9 +1,4 @@
" Author: Sumner Evans <sumner.evans98@gmail.com>
" Description: write-good for vim Help files
-call ale#linter#Define('help', {
-\ 'name': 'write-good',
-\ 'executable_callback': 'ale#handlers#writegood#GetExecutable',
-\ 'command_callback': 'ale#handlers#writegood#GetCommand',
-\ 'callback': 'ale#handlers#writegood#Handle',
-\})
+call ale#handlers#writegood#DefineLinter('help')
diff --git a/ale_linters/html/writegood.vim b/ale_linters/html/writegood.vim
index 9fae8821..6a2bd8e5 100644
--- a/ale_linters/html/writegood.vim
+++ b/ale_linters/html/writegood.vim
@@ -1,9 +1,4 @@
" Author: Sumner Evans <sumner.evans98@gmail.com>
-" Description: write-good for nroff files
+" Description: write-good for html files
-call ale#linter#Define('html', {
-\ 'name': 'write-good',
-\ 'executable_callback': 'ale#handlers#writegood#GetExecutable',
-\ 'command_callback': 'ale#handlers#writegood#GetCommand',
-\ 'callback': 'ale#handlers#writegood#Handle',
-\})
+call ale#handlers#writegood#DefineLinter('html')
diff --git a/ale_linters/markdown/remark_lint.vim b/ale_linters/markdown/remark_lint.vim
index 195b0f5a..d9c2efb6 100644
--- a/ale_linters/markdown/remark_lint.vim
+++ b/ale_linters/markdown/remark_lint.vim
@@ -1,3 +1,4 @@
+scriptencoding utf-8
" Author rhysd https://rhysd.github.io/, Dirk Roorda (dirkroorda), Adrián González Rus (@adrigzr)
" Description: remark-lint for Markdown files
call ale#Set('markdown_remark_lint_executable', 'remark')
@@ -43,7 +44,8 @@ function! ale_linters#markdown#remark_lint#Handle(buffer, lines) abort
endfunction
call ale#linter#Define('markdown', {
-\ 'name': 'remark-lint',
+\ 'name': 'remark_lint',
+\ 'aliases': ['remark-lint'],
\ 'executable_callback': 'ale_linters#markdown#remark_lint#GetExecutable',
\ 'command_callback': 'ale_linters#markdown#remark_lint#GetCommand',
\ 'callback': 'ale_linters#markdown#remark_lint#Handle',
diff --git a/ale_linters/markdown/writegood.vim b/ale_linters/markdown/writegood.vim
index 21dbff1a..7108e7ac 100644
--- a/ale_linters/markdown/writegood.vim
+++ b/ale_linters/markdown/writegood.vim
@@ -1,9 +1,4 @@
" Author: Sumner Evans <sumner.evans98@gmail.com>
" Description: write-good for Markdown files
-call ale#linter#Define('markdown', {
-\ 'name': 'write-good',
-\ 'executable_callback': 'ale#handlers#writegood#GetExecutable',
-\ 'command_callback': 'ale#handlers#writegood#GetCommand',
-\ 'callback': 'ale#handlers#writegood#Handle',
-\})
+call ale#handlers#writegood#DefineLinter('markdown')
diff --git a/ale_linters/nroff/writegood.vim b/ale_linters/nroff/writegood.vim
index d318fb28..bcf344f6 100644
--- a/ale_linters/nroff/writegood.vim
+++ b/ale_linters/nroff/writegood.vim
@@ -1,9 +1,4 @@
" Author: Sumner Evans <sumner.evans98@gmail.com>
" Description: write-good for nroff files
-call ale#linter#Define('nroff', {
-\ 'name': 'write-good',
-\ 'executable_callback': 'ale#handlers#writegood#GetExecutable',
-\ 'command_callback': 'ale#handlers#writegood#GetCommand',
-\ 'callback': 'ale#handlers#writegood#Handle',
-\})
+call ale#handlers#writegood#DefineLinter('nroff')
diff --git a/ale_linters/po/writegood.vim b/ale_linters/po/writegood.vim
index 5a01cb66..14686473 100644
--- a/ale_linters/po/writegood.vim
+++ b/ale_linters/po/writegood.vim
@@ -1,9 +1,4 @@
" 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',
-\})
+call ale#handlers#writegood#DefineLinter('po')
diff --git a/ale_linters/pod/writegood.vim b/ale_linters/pod/writegood.vim
index 14ed5c0c..9f5461e6 100644
--- a/ale_linters/pod/writegood.vim
+++ b/ale_linters/pod/writegood.vim
@@ -1,9 +1,4 @@
" Author: Sumner Evans <sumner.evans98@gmail.com>
" Description: write-good for Pod files
-call ale#linter#Define('pod', {
-\ 'name': 'write-good',
-\ 'executable_callback': 'ale#handlers#writegood#GetExecutable',
-\ 'command_callback': 'ale#handlers#writegood#GetCommand',
-\ 'callback': 'ale#handlers#writegood#Handle',
-\})
+call ale#handlers#writegood#DefineLinter('pod')
diff --git a/ale_linters/rst/writegood.vim b/ale_linters/rst/writegood.vim
index 12137dbf..26b1152a 100644
--- a/ale_linters/rst/writegood.vim
+++ b/ale_linters/rst/writegood.vim
@@ -1,9 +1,4 @@
" Author: Sumner Evans <sumner.evans98@gmail.com>
" Description: write-good for reStructuredText files
-call ale#linter#Define('rst', {
-\ 'name': 'write-good',
-\ 'executable_callback': 'ale#handlers#writegood#GetExecutable',
-\ 'command_callback': 'ale#handlers#writegood#GetCommand',
-\ 'callback': 'ale#handlers#writegood#Handle',
-\})
+call ale#handlers#writegood#DefineLinter('rst')
diff --git a/ale_linters/sml/smlnj_cm.vim b/ale_linters/sml/smlnj_cm.vim
index 96cd7bd9..7a482307 100644
--- a/ale_linters/sml/smlnj_cm.vim
+++ b/ale_linters/sml/smlnj_cm.vim
@@ -9,7 +9,8 @@ endfunction
" Using CM requires that we set "lint_file: 1", since it reads the files
" from the disk itself.
call ale#linter#Define('sml', {
-\ 'name': 'smlnj-cm',
+\ 'name': 'smlnj_cm',
+\ 'aliases': ['smlnj-cm'],
\ 'executable_callback': 'ale#handlers#sml#GetExecutableSmlnjCm',
\ 'lint_file': 1,
\ 'command_callback': 'ale_linters#sml#smlnj_cm#GetCommand',
diff --git a/ale_linters/tex/writegood.vim b/ale_linters/tex/writegood.vim
index dc59de2e..c1aeace9 100644
--- a/ale_linters/tex/writegood.vim
+++ b/ale_linters/tex/writegood.vim
@@ -1,9 +1,4 @@
" Author: Sumner Evans <sumner.evans98@gmail.com>
" Description: write-good for TeX files
-call ale#linter#Define('tex', {
-\ 'name': 'write-good',
-\ 'executable_callback': 'ale#handlers#writegood#GetExecutable',
-\ 'command_callback': 'ale#handlers#writegood#GetCommand',
-\ 'callback': 'ale#handlers#writegood#Handle',
-\})
+call ale#handlers#writegood#DefineLinter('tex')
diff --git a/ale_linters/texinfo/writegood.vim b/ale_linters/texinfo/writegood.vim
index 8104c634..4427f056 100644
--- a/ale_linters/texinfo/writegood.vim
+++ b/ale_linters/texinfo/writegood.vim
@@ -1,9 +1,4 @@
" Author: Sumner Evans <sumner.evans98@gmail.com>
" Description: write-good for Texinfo files
-call ale#linter#Define('texinfo', {
-\ 'name': 'write-good',
-\ 'executable_callback': 'ale#handlers#writegood#GetExecutable',
-\ 'command_callback': 'ale#handlers#writegood#GetCommand',
-\ 'callback': 'ale#handlers#writegood#Handle',
-\})
+call ale#handlers#writegood#DefineLinter('texinfo')
diff --git a/ale_linters/text/writegood.vim b/ale_linters/text/writegood.vim
index ff76ce42..81b935d4 100644
--- a/ale_linters/text/writegood.vim
+++ b/ale_linters/text/writegood.vim
@@ -1,9 +1,4 @@
" Author: Sumner Evans <sumner.evans98@gmail.com>
" Description: write-good for text files
-call ale#linter#Define('text', {
-\ 'name': 'write-good',
-\ 'executable_callback': 'ale#handlers#writegood#GetExecutable',
-\ 'command_callback': 'ale#handlers#writegood#GetCommand',
-\ 'callback': 'ale#handlers#writegood#Handle',
-\})
+call ale#handlers#writegood#DefineLinter('text')
diff --git a/ale_linters/xhtml/writegood.vim b/ale_linters/xhtml/writegood.vim
index 83d1863b..1fcba182 100644
--- a/ale_linters/xhtml/writegood.vim
+++ b/ale_linters/xhtml/writegood.vim
@@ -1,9 +1,4 @@
" Author: Sumner Evans <sumner.evans98@gmail.com>
" Description: write-good for XHTML files
-call ale#linter#Define('xhtml', {
-\ 'name': 'write-good',
-\ 'executable_callback': 'ale#handlers#writegood#GetExecutable',
-\ 'command_callback': 'ale#handlers#writegood#GetCommand',
-\ 'callback': 'ale#handlers#writegood#Handle',
-\})
+call ale#handlers#writegood#DefineLinter('xhtml')