PHP Sniffing With VSCode

PHP Sniffing With VSCode

by Marcus Green -
Number of replies: 2
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

I want to add details to my wiki instructions for setting up VSCode for PHPSniff 

https://docs.moodle.org/dev/Setting_up_VSCode#Show_coding_standards_issues_.28plugin.29

At the moment I am rather clumsily installing the coding standards like this

composer require --dev "blackboard-open-source/moodle-coding-standard"

composer global require "squizlabs/php_codesniffer=2.*"

Note that 2.* required or it doesn't work, add phpcs to the path and then 

phpcs  --config-set  installed_paths jrandompath/vendor/blackboard-open-source/moodle-coding-standard

phpcs --config-set default_standard moodle

Would it be possible to pull the gubbins, or at least the latest standards file from Codechecker...

https://moodle.org/plugins/local_codechecker

And generally make it simpler?

Average of ratings: -
In reply to Marcus Green

Re: PHP Sniffing With VSCode

by Michael Milette -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Hi Marcus,

Did you ever get an answer to this question? I am looking for the answer too, and also information on how to make it work with a more recent version of phpcs.

Best regards,

Michael