benmatselby / sublime-phpcs

🔍 PHP CodeSniffer, PHP Coding Standard Fixer, Linter, and Mess Detector Support for Sublime Text
Other
812 stars 126 forks source link

Not Working in Windows 7 Ultimate 64 #82

Closed lamakun closed 11 years ago

lamakun commented 11 years ago

I have just installed Sublime Text 2, then Package control plugin and right away phpcs plugin. My pear list is as follows:

PACKAGE VERSION STATE Archive_Tar 1.3.11 stable Console_Getopt 1.3.1 stable PEAR 1.9.4 stable PHP_CodeSniffer 1.4.5 stable Structures_Graph 1.0.4 stable XML_Util 1.2.1 stable

Now when I am in a file and right-click (inside text editor) in "php code sniffer" submenu all options appear disabled. If I right click in a file in the sidebar file explorer I have the option "Fix this file/directory" (as a suboption of "php code sniffer"). When choosing this option I get the error:

Traceback (most recent call last): File ".\sublimeplugin.py", line 337, in run File ".\phpcs.py", line 619, in run File ".\phpcs.py", line 464, in fix_standards_errors File ".\phpcs.py", line 128, in get_errors File ".\phpcs.py", line 212, in execute TypeError: argument of type 'NoneType' is not iterable

I am not quite sure what I should fill with in options:

“phpcs_php_path”
“phpcs_executable_path”
“phpmd_executable_path”
“php_cs_fixer_executable_path”

However in phpcs it is said this libraries are optional so I assume it should work in some way.

I know I am a little messed, as I am also new to pear package manager and php libs, so I am not sure I have installed everything properly. However, if anybody could tell me how to get started at least to see my syntax/standard errors highlighted it would be a good point to begin and try to solve all other problems myself.

Thanks in advance!!!

benmatselby commented 11 years ago

Have you looked at: https://github.com/benmatselby/sublime-phpcs/blob/master/example-settings/windows-7-phpcs-fixer-linter.example

It looks to be just a config issue, so look at the thread here as well: https://github.com/benmatselby/sublime-phpcs/issues/78

"Fix this file/directory" is actually using PHP-CS-Fixer: http://cs.sensiolabs.org/ so will not work unless that is installed.

lamakun commented 11 years ago

That did it Ben!!

Thank you very much!!