diff options
author | Eddie Lebow <elebow@users.noreply.github.com> | 2017-07-09 10:48:04 -0400 |
---|---|---|
committer | w0rp <w0rp@users.noreply.github.com> | 2017-07-09 15:48:04 +0100 |
commit | ab0e76dbd50dbe5bae08817baa56432889335b99 (patch) | |
tree | acb7f0999e71e800921581a8feea7b1720574840 /test/command_callback | |
parent | 836a2cfe3b5ba2761291564cbf412ca79f9a52a9 (diff) | |
download | ale-ab0e76dbd50dbe5bae08817baa56432889335b99.zip |
Use rubocop's JSON output format (resolves #339) (#738)
* Use rubocop's JSON output format (resolves #339)
Rubocop's emacs formatter seems to have changed format in some
not-so-ancient version. The JSON formatter should provide a more stable
interface than parsing lines with a regex.
The JSON formatter was introduced in mid-2013, so it should be safe to
assume available in any reasonably-modern environment. The oldest
currently-supported version of ruby (according to ruby-lang.org) was
not supported by rubocop until 2014.
* Rubocop: Use global function for GetType
* Rubocop: Use scope prefix in GetType
* Rubocop: Update command_callback test
* Rubocop: add end_col to Handle
Diffstat (limited to 'test/command_callback')
-rw-r--r-- | test/command_callback/test_rubocop_command_callback.vader | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/command_callback/test_rubocop_command_callback.vader b/test/command_callback/test_rubocop_command_callback.vader index cda0c230..db151800 100644 --- a/test/command_callback/test_rubocop_command_callback.vader +++ b/test/command_callback/test_rubocop_command_callback.vader @@ -3,17 +3,17 @@ Before: Execute(Executable should default to rubocop): AssertEqual - \ '''rubocop'' --format emacs --force-exclusion --stdin ''dummy.py''', + \ '''rubocop'' --format json --force-exclusion --stdin ''dummy.py''', \ ale_linters#ruby#rubocop#GetCommand(bufnr('')) Execute(Should be able to set a custom executable): let g:ale_ruby_rubocop_executable = 'bin/rubocop' AssertEqual - \ '''bin/rubocop'' --format emacs --force-exclusion --stdin ''dummy.py''', + \ '''bin/rubocop'' --format json --force-exclusion --stdin ''dummy.py''', \ ale_linters#ruby#rubocop#GetCommand(bufnr('')) Execute(Setting bundle appends 'exec rubocop'): let g:ale_ruby_rubocop_executable = 'path to/bundle' AssertEqual - \ '''path to/bundle'' exec rubocop --format emacs --force-exclusion --stdin ''dummy.py''', + \ '''path to/bundle'' exec rubocop --format json --force-exclusion --stdin ''dummy.py''', \ ale_linters#ruby#rubocop#GetCommand(bufnr('')) |