All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@git.madduck.net.
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
2 Save g:ale_scala_scalafmt_executable
3 Save g:ale_scala_scalafmt_options
5 " Use an invalid global executable, so we don't match it.
6 let g:ale_scala_scalafmt_executable = 'xxxinvalid'
7 let g:ale_scala_scalafmt_options = ''
9 call ale#test#SetDirectory('/testplugin/test/fixers')
14 call ale#test#RestoreDirectory()
16 Execute(The scalafmt callback should return the correct default values):
17 call ale#test#SetFilename('../test-files/scala/dummy.scala')
21 \ 'read_temporary_file': 1,
22 \ 'command': ale#Escape(g:ale_scala_scalafmt_executable)
25 \ ale#fixers#scalafmt#Fix(bufnr(''))
27 Execute(The scalafmt callback should use ng with scalafmt automatically):
28 let g:ale_scala_scalafmt_executable = 'ng'
29 call ale#test#SetFilename('../test-files/scala/dummy.scala')
33 \ 'read_temporary_file': 1,
34 \ 'command': ale#Escape('ng')
38 \ ale#fixers#scalafmt#Fix(bufnr(''))
40 Execute(The scalafmt callback should include custom scalafmt options):
41 let g:ale_scala_scalafmt_options = '--diff'
42 call ale#test#SetFilename('../test-files/scala/dummy.scala')
46 \ 'read_temporary_file': 1,
47 \ 'command': ale#Escape(g:ale_scala_scalafmt_executable)
51 \ ale#fixers#scalafmt#Fix(bufnr(''))
53 Execute(The scalafmt callback should include custom scalafmt options and use ng with scalafmt):
54 let g:ale_scala_scalafmt_options = '--diff'
55 let g:ale_scala_scalafmt_executable = 'ng'
56 call ale#test#SetFilename('../test-files/scala/dummy.scala')
60 \ 'read_temporary_file': 1,
61 \ 'command': ale#Escape('ng')
66 \ ale#fixers#scalafmt#Fix(bufnr(''))