moodlehq / moodle-local_codechecker

A Moodle local plugin providing a simple web UI to run the MoodleCS coding style checks with PHP_CodeSniffer.
63 stars 72 forks source link

Add VSCode reference to README #135

Closed sarjona closed 3 years ago

sarjona commented 3 years ago

Documentation related to PHP CS in moodle.org has been improved and a section to Visual Studio Code has been added to the README file of this project (it was requested in https://github.com/moodlehq/moodle-local_codechecker/issues/102 by Michael Milette).

stronk7 commented 3 years ago

Wow, I didn't know (or had forgotten) about https://docs.moodle.org/dev/CodeSniffer#Installing_PHP_CS completely. That page is really outdated!

sarjona commented 3 years ago

Thanks a lot for merging it, Eloy... I moved information about PHP CS from the Sublime page (because it's unrelated to this editor... to avoid duplicating information) and tried to update it (at least the "Installing_PHP_CS" related to Ubuntu (which is the one I could verify) :-)

stronk7 commented 3 years ago

Yeah, good changes!

The detail that always calls my attention is that, once you've installed moodle-local_codechecker... you already have phpCodeSniffer installed (under local/codechecker/phpcs), so really, there isn't any need to install it apart (neither via pear - does that still work? - neither composer or direct download), it's already there.

In my dev environment (vim) but I bet it will the same for others... all I've to do is to point to my moodle-local_codechecker/phpcs local clone, point to the executable (moodle-local_codechecker/phpcs/bin/phpcs), to the standard (moodle-local_codechecker/moodle) and done.

And upgrading any of them (phpcs or standard) is as simple as pulling changes from the moodle-local_codechecker upstream repo.

More yet, that way... you can ensure the the versions (phpcs and standards) are compatible and so on, they already have been bundled and tested together.

Not saying that there is anything wrong installing phpcs apart, just raising that the one bundled within codechecker is a perfectly valid one.

Ciao :-)