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_php_pint_executable
3 Save g:ale_php_pint_options
4 let g:ale_php_pint_executable = 'pint'
5 let g:ale_php_pint_options = ''
7 call ale#test#SetDirectory('/testplugin/test/fixers')
12 call ale#test#RestoreDirectory()
15 Execute(project with pint should use local by default):
16 call ale#test#SetFilename('../test-files/php/project-with-pint/test.php')
19 \ ale#path#Simplify(g:dir . '/../test-files/php/project-with-pint/vendor/bin/pint'),
20 \ ale#fixers#pint#GetExecutable(bufnr(''))
22 Execute(use-global should override local detection):
23 let g:ale_php_pint_use_global = 1
24 call ale#test#SetFilename('../test-files/php/project-with-pint/test.php')
28 \ ale#fixers#pint#GetExecutable(bufnr(''))
30 Execute(project without pint should use global):
31 call ale#test#SetFilename('../test-files/php/project-without-pint/test.php')
35 \ ale#fixers#pint#GetExecutable(bufnr(''))
40 Execute(The pint callback should return the correct default values):
41 call ale#test#SetFilename('../test-files/php/project-without-pint/foo/test.php')
45 \ 'read_temporary_file': 1,
46 \ 'command': ale#Escape('pint')
47 \ . ' ' . g:ale_php_pint_options
50 \ ale#fixers#pint#Fix(bufnr(''))
52 Execute(The pint callback should include custom pint options):
53 let g:ale_php_pint_options = '--test'
54 call ale#test#SetFilename('../test-files/php/project-without-pint/test.php')
58 \ 'command': ale#Escape(g:ale_php_pint_executable)
60 \ 'read_temporary_file': 1,
62 \ ale#fixers#pint#Fix(bufnr(''))