Open
Description
This block of code has a side effect that it's tricky to debug.
if exists('g:php_cs_fixer_config_file') && filereadable(g:php_cs_fixer_config_file)
if g:php_cs_fixer_version == 1
let g:php_cs_fixer_command = g:php_cs_fixer_command . ' --config-file=' . g:php_cs_fixer_config_file
else
let g:php_cs_fixer_command = g:php_cs_fixer_command . ' --config=' . g:php_cs_fixer_config_file
endif
endif
filereadable
check result in the omission of an php-cs-fixer error saying that the config file it's not readable. I was spend 30 minutes to understand why my phpcs config file did not run properly in vim but executing command line ran without any problem.
I realise that I must use an absolute path to the config file and not a relative one to work properly. In case a misconfiguration like this, an error saying that file can't be loaded would be nice.
Metadata
Metadata
Assignees
Labels
No labels