Sublime Text 3 Configuration Phpcs Plugin

Source: Internet
Author: User

    1. Download PHP code sniffer addon via package Control in ST3.
    2. Download the Php-cs-fixer File from this Website = cs.sensiolabs.org/(Direct Link = cs.sensiolabs.org/get/php-cs- Fixer.phar)
    3. Copy downloaded File to Your Php.exe directory (mine is C:/xammp/php/php.exe)
    4. Download Php_codesniffer PEAR code package from this page pear.php.net/package/php_codesniffer/download/all (Direct Link = http://download.pear.php.net/package/PHP_CodeSniffer-1.5.0RC4.tgz)
    5. Find Php_codesniffer-1.5.0rc4.tgz\php_codesniffer-1.5.0rc4\scripts\phpcs.bat and copy this file too (in your php.exe Directory
    6. Copy the first Post's config file, change your directory accordingly and writing in package Settings, PHP Code snif Fer, Settings-user File. This Method worked for Me on Sublime Text 3 Build 3047 in Win8 x64 System ... No more slow ST2 for me ... Cheers
{// Path to PHP on Windows installation  //This is needed as we cannot run Phars on Windows, so we run it through PHP"Phpcs_php_prefix_path": "C:\\wamp\bin\\php\\php5.4.12\\php.exe",//The the path to the bat file when we installed Php_codesniffer"Phpcs_executable_path": "C:\\wamp\\bin\\php\\php5.4.12\\phpcs.bat",// php-cs-fixer settings  //Don ' t want to auto fix issue with Php-cs-fixer"Php_cs_fixer_on_save": false,//Show the Quick Panel"Php_cs_fixer_show_quick_panel": true,//The fixer Phar file is stored here:"Php_cs_fixer_executable_path": "C:\\wamp\bin\\php\\php5.4.12\\php-cs-fixer.phar",// PHP linter settings  //Yes, lets lint the files"Phpcs_linter_run": true,//and execute that on each file when saved (PHP only as per Extensions_to_execute)"Phpcs_linter_command_on_save": true,//Path to PHP"Phpcs_php_path": "C:\\wamp\bin\\php\\php5.4.12\\php.exe",//This is the regex format of the errors"Phpcs_linter_regex": "(? p<message>.*) on line (? p<line>\\d+)",// PHP Mess Detector settings  //Not turning on the mess detector here"Phpmd_run": false,"Phpmd_command_on_save": false,"Phpmd_executable_path": "","Phpmd_additional_args": {}}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.