Adds standardrb linter (#2133)

See: https://github.com/testdouble/standard

StandardRB is to RuboCop what StandardJS is to ESLint. This commit 
naively copies the RuboCop linter and fixer to point at the standardrb
executable. Any other adjustments are very minor (the only I can think 
of is that standardrb takes a `--fix` option instead of 
`--auto-correct`).

This raises a confusing point to me as both developer and a user: since
ale enables all linters by default, won't this run both RuboCop and 
StandardRB (the results of which will almost always be in conflict with
one another)? How does ale already solve for this for the similar case
of StandardJS and ESLint?
This commit is contained in:
Justin Searls
2018-12-10 16:02:32 -05:00
committed by Bjorn Neergaard
parent c899ff3523
commit 2cfa09e02d
12 changed files with 198 additions and 39 deletions

View File

@@ -129,5 +129,27 @@ g:ale_ruby_solargraph_executable *g:ale_ruby_solargraph_executable*
from binstubs or a bundle.
===============================================================================
standardrb *ale-ruby-standardrb*
g:ale_ruby_standardrb_executable *g:ale_ruby_standardrb_executable*
*b:ale_ruby_standardrb_executable*
Type: String
Default: `'standardrb'`
Override the invoked standardrb binary. Set this to `'bundle'` to invoke
`'bundle` `exec` standardrb'.
g:ale_ruby_standardrb_options *g:ale_ruby_standardrb_options*
*b:ale_ruby_standardrb_options*
Type: |String|
Default: `''`
This variable can be change to modify flags given to standardrb.
===============================================================================
===============================================================================
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:

View File

@@ -285,6 +285,7 @@ CONTENTS *ale-contents*
ruby................................|ale-ruby-ruby|
rufo................................|ale-ruby-rufo|
solargraph..........................|ale-ruby-solargraph|
standardrb..........................|ale-ruby-standardrb|
rust..................................|ale-rust-options|
cargo...............................|ale-rust-cargo|
rls.................................|ale-rust-rls|
@@ -486,7 +487,7 @@ Notes:
* reStructuredText: `alex`!!, `proselint`, `redpen`, `rstcheck`, `vale`, `write-good`
* Re:VIEW: `redpen`
* RPM spec: `rpmlint`
* Ruby: `brakeman`, `rails_best_practices`!!, `reek`, `rubocop`, `ruby`, `rufo`, `solargraph`
* Ruby: `brakeman`, `rails_best_practices`!!, `reek`, `rubocop`, `ruby`, `rufo`, `solargraph`, `standardrb`
* Rust: `cargo`!!, `rls`, `rustc` (see |ale-integration-rust|), `rustfmt`
* SASS: `sass-lint`, `stylelint`
* SCSS: `prettier`, `sass-lint`, `scss-lint`, `stylelint`