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_ruby_standardrb_executable
3 Save g:ale_ruby_standardrb_options
5 " Use an invalid global executable, so we don't match it.
6 let g:ale_ruby_standardrb_executable = 'xxxinvalid'
7 let g:ale_ruby_standardrb_options = ''
9 call ale#test#SetDirectory('/testplugin/test/fixers')
14 call ale#test#RestoreDirectory()
16 Execute(The standardrb callback should return the correct default values):
17 call ale#test#SetFilename('../test-files/ruby/dummy.rb')
21 \ 'process_with': 'ale#fixers#rubocop#PostProcess',
22 \ 'command': ale#Escape(g:ale_ruby_standardrb_executable)
23 \ . ' --fix --force-exclusion --stdin %s',
25 \ ale#fixers#standardrb#Fix(bufnr(''))
27 Execute(The standardrb callback should include configuration files):
28 call ale#test#SetFilename('../test-files/ruby/with_config/dummy.rb')
32 \ 'process_with': 'ale#fixers#rubocop#PostProcess',
33 \ 'command': ale#Escape(g:ale_ruby_standardrb_executable)
34 \ . ' --config ' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/ruby/with_config/.standard.yml'))
35 \ . ' --fix --force-exclusion --stdin %s',
37 \ ale#fixers#standardrb#Fix(bufnr(''))
39 Execute(The standardrb callback should include custom rubocop options):
40 let g:ale_ruby_standardrb_options = '--except Lint/Debugger'
41 call ale#test#SetFilename('../test-files/ruby/with_config/dummy.rb')
45 \ 'process_with': 'ale#fixers#rubocop#PostProcess',
46 \ 'command': ale#Escape(g:ale_ruby_standardrb_executable)
47 \ . ' --config ' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/ruby/with_config/.standard.yml'))
48 \ . ' --except Lint/Debugger'
49 \ . ' --fix --force-exclusion --stdin %s',
51 \ ale#fixers#standardrb#Fix(bufnr(''))