Open Blake-C opened 6 years ago
For the lazy, and until the associated PR is fixed, this is a one-liner to fix this based on @Blake-C PR in #129 :
curl https://gist.githubusercontent.com/shadyvb/585ff8666f55f206c7fdbd11cee128d5/raw/f48e3fee4ce4f4d264f20e76a7e64429811ca9d2/vscode-phpcs-ext-basepath-fix.patch | patch ~/.vscode/extensions/ikappas.phpcs-1.0.5/server/src/linter.js
The patch being applied can be viewed at https://gist.githubusercontent.com/shadyvb/585ff8666f55f206c7fdbd11cee128d5/raw/f48e3fee4ce4f4d264f20e76a7e64429811ca9d2/vscode-phpcs-ext-basepath-fix.patch, given the extension is saved to ~/.vscode/extensions
Thanks @Blake-C !
If a user has
<arg name="basepath" value="./"/>
in their phpcs.xml file the dictionary look up on line 216 will lookup the wrong file.File path given with
<arg name="basepath" value="./"/>
:File path being looked up:
Meta: VSCode: Version 1.26.1 (1.26.1) macOS: 10.13.6 High Sierra PHP CodeSniffer: 3.2.3 vscode-phpcs: 1.0.5