summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw0rp <w0rp@users.noreply.github.com>2018-10-25 15:34:31 +0100
committerw0rp <devw0rp@gmail.com>2018-10-25 15:34:58 +0100
commit0c17ba2a0fa90d219e52fdb64c29cc65fd950e97 (patch)
tree15f0f7940e58b4a1b9e34dead3b7da5b1cef9f17
parent2dbfbe7b02cf88cdce48793ff0cfe682403ea81d (diff)
downloadale-2.2.1.zip
Merge pull request #2016 from terryding77/masterv2.2.1
fix: change google_java_format_* to java_google_java_format_*
-rw-r--r--autoload/ale/fixers/google_java_format.vim10
-rw-r--r--test/fixers/test_goofle_java_format_fixer_callback.vader8
2 files changed, 9 insertions, 9 deletions
diff --git a/autoload/ale/fixers/google_java_format.vim b/autoload/ale/fixers/google_java_format.vim
index 6a2f5491..20086c73 100644
--- a/autoload/ale/fixers/google_java_format.vim
+++ b/autoload/ale/fixers/google_java_format.vim
@@ -1,13 +1,13 @@
" Author: butlerx <butlerx@notthe,cloud>
" Description: Integration of Google-java-format with ALE.
-call ale#Set('google_java_format_executable', 'google-java-format')
-call ale#Set('google_java_format_use_global', get(g:, 'ale_use_global_executables', 0))
-call ale#Set('google_java_format_options', '')
+call ale#Set('java_google_java_format_executable', 'google-java-format')
+call ale#Set('java_google_java_format_use_global', get(g:, 'ale_use_global_executables', 0))
+call ale#Set('java_google_java_format_options', '')
function! ale#fixers#google_java_format#Fix(buffer) abort
- let l:options = ale#Var(a:buffer, 'google_java_format_options')
- let l:executable = ale#Var(a:buffer, 'google_java_format_executable')
+ let l:options = ale#Var(a:buffer, 'java_google_java_format_options')
+ let l:executable = ale#Var(a:buffer, 'java_google_java_format_executable')
if !executable(l:executable)
return 0
diff --git a/test/fixers/test_goofle_java_format_fixer_callback.vader b/test/fixers/test_goofle_java_format_fixer_callback.vader
index d64e2788..4c28b330 100644
--- a/test/fixers/test_goofle_java_format_fixer_callback.vader
+++ b/test/fixers/test_goofle_java_format_fixer_callback.vader
@@ -1,8 +1,8 @@
Before:
- Save g:ale_google_java_format_executable
+ Save g:ale_java_google_java_format_executable
" Use an invalid global executable, so we don't match it.
- let g:ale_google_java_format_executable = 'xxxinvalid'
+ let g:ale_java_google_java_format_executable = 'xxxinvalid'
call ale#test#SetDirectory('/testplugin/test/fixers')
@@ -17,11 +17,11 @@ Execute(The google-java-format callback should return 0 when the executable isn'
\ ale#fixers#google_java_format#Fix(bufnr(''))
Execute(The google-java-format callback should run the command when the executable test passes):
- let g:ale_google_java_format_executable = has('win32') ? 'cmd' : 'echo'
+ let g:ale_java_google_java_format_executable = has('win32') ? 'cmd' : 'echo'
AssertEqual
\ {
\ 'read_temporary_file': 1,
- \ 'command': ale#Escape(ale_google_java_format_executable) . ' --replace %t'
+ \ 'command': ale#Escape(ale_java_google_java_format_executable) . ' --replace %t'
\ },
\ ale#fixers#google_java_format#Fix(bufnr(''))