jhoff / SublimeLinter-contrib-php-cs-fixer

SublimeLinter plugin for php, using php-cs-fixer.
MIT License
8 stars 8 forks source link

Can't seem to get this to work? #12

Closed KevinJNicholls closed 2 years ago

KevinJNicholls commented 4 years ago

I must be doing something VERY basically wrong:

No matter how bad I write my code (see examples below), phpcsfixer doesn't highlight, or provide messages (in either the Output:SublimeLinter nor popup ...) and doesn't seem to fix anything???

I've checked "where php-cs-fixer" with my windows 10 command prompt, and I successfully get the directory for all of my composer packages (phpcs & phpmd are working as expected with SublimeLinter). phpcs and phpmd both working as expected.

I'm running SublimeLinter in debug mode ("debug":true in SublimeLinter.sublime-settings), I keep getting the message in the console "phpcsfixer: no output", but above, it successfully running:

SublimeLinter: #621 linter.py:1636 Running ... C:\Users\kevin\OneDrive\Documents\Programming\Local SFTP\A2kjnapps (working dir)

C:\Users\kevin\AppData\Roaming\Composer\vendor\bin\php-cs-fixer.BAT fix c:\users\kevin\appdata\local\temp\tmpdgw08y.php --dry-run --diff --diff-format=udiff --using-cache=no --no-ansi --config=.php_cs -vv --verbose=3

C:\Users\kevin\OneDrive\Documents\Programming\Local SFTP\A2kjnapps (working dir)

C:\Users\kevin\AppData\Roaming\Composer\vendor\bin\php-cs-fixer.BAT fix c:\users\kevin\appdata\local\temp\tmpdgw08y.php --dry-run --diff --diff-format=udiff --using-cache=no --no-ansi --config=.php_cs -vv

I do get a message in the status bar that phpcsfixer is working (right next to my other php linters: php, phpcs, phpmd). But it appears that it is not finding anything.

Here is some sample code I'm trying to get phpcsfixer to act upon:

/*

constant("ThisShouldTripAConstantCaseError", false);

$ThisShouldTripAdir_constantError = dirname(FILE);

Thank you for any help..

KevinJNicholls commented 4 years ago

From sublime console, I see the the file being fixed is a ".tmp" file, and the command line switch of "--config=.php_cs" - where are these files? I cannot locate them to troubleshoot.