-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows users #3
Comments
Sorry, I have never tried using the plugin on Windows so it will be very hard for me to help you. My first suggestion would be to try running PHPCS on its own to see if it is actually working without using the plugin. |
Yes phpcs works in command line. But phpcbf doesnt recognize diff. I need to add --no-patch. There is fc command on windows similar as diff. This is the problem i think. |
I'm installing Cygwin to get those command. ! I will see. |
Nothing change, plugin doesn't work for me. |
I have just got my hands on Windows and installed the plugin. It worked with these settings: {
"phpcs_path": "C:\\PHP_CodeSniffer\\scripts\\phpcs",
"phpcbf_path": "C:\\PHP_CodeSniffer\\scripts\\phpcbf"
} I did not need to specify the php_path. |
Thx for reply. |
Yes, just clone PHP_CodeSniffer. I did not install cygwin or anything else. This plugin does not require you to install diff or patch, this is handled by the plugin. |
It's working ! Thx for your help. i added
this makes a file with diff for me. Do you know how can i replace %HOMEPATH% by the current directory of the sniffed file and replace myreport by the sniffed filename? |
You guys manage |
Hi, This is a looking good one plugin ! I'm a windows user and i wanted to know if it's compatible with windows users.
i ve download from the repositery and i ve rename the folder from "sublime-PHP_CodeSniffer-master" to "PHP_CodeSniffer" then put him in \Roaming\Sublim text 3\Packages
i have edited my settings files with this value :
edit after post : "we didn't see double\ in path on the post of this message but they really exist !
// Path to PHP.
"php_path": "C:\Program Files (x86)\EasyPHP\binaries\php\php_runningversion\php.exe",
// Path to the PHPCS script.
"phpcs_path": "C:\php\pear\phpcs.bat",
// Path to the PHPCBF script.
"phpcbf_path": "C:\php\pear\phpcbf.bat",
I've got this error in sublim text console :
@echo off
REM PHP_CodeSniffer tokenizes PHP code and detects violations of a
REM defined set of coding standards.
REM
REM PHP version 5
REM
REM @category PHP
REM @Package PHP_CodeSniffer
REM @author Greg Sherwood [email protected]
REM @author Marc McIntyre [email protected]
REM @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
REM @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
REM @link http://pear.php.net/package/PHP_CodeSniffer
if "%PHPBIN%" == "" set PHPBIN=C:\Program Files (x86)\EasyPHP\binaries\php\php_runningversion\php.exe
if not exist "%PHPBIN%" if "%PHP_PEAR_PHP_BIN%" neq "" goto USE_PEAR_PATH
GOTO RUN
:USE_PEAR_PATH
set PHPBIN=%PHP_PEAR_PHP_BIN%
:RUN
"%PHPBIN%" "C:\php\pear\phpcs" %*
Then i have create windows environment variable
PHPBIN with value `C:\Program Files (x86)\EasyPHP\binaries\php\php_runningversion\php.exe
And change :
// Path to PHP.
"php_path": "%PHPBIN%",
the error message in sublime text disappeared
but ! no error is detect in my php file :( seem to be not working.
Do you have a working PHP_CodeSniffer.sublime-settings --User Example ? Thx for help.
Sorry for posting here. I know it's not the best place but it's difficult to contact you. I will delete this post if you ask me. And sry for my english :)
Cheers. Thx in advance.
The text was updated successfully, but these errors were encountered: