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

Adapt run.php to the new phpcs3 API #90

Closed sarjona closed 4 years ago

sarjona commented 4 years ago

The run.php file has been reviewed and adapted to use the new runner class.

Some changes have been done to this runner class to add some of the config settings and also to get the interactive mode working ($this->processFile($file) is the method doing the magic and the exception has been added too to exit when 'q' key is pressed). The following code has been removed to avoid to repeat some information: $reporter->cacheFileReport($file, $this->config);

The run.php file can be tested using the following commands:

sarjona commented 4 years ago

The branch has been rebased to the latest 3.5.8 PHPCS3.

vmdef commented 4 years ago

Hi Sara! Nice work! Thanks for work on this patch. Just some comments for your consideration, although most of them are not part of your changes, I think it worth to fix them now:

sarjona commented 4 years ago

A separate issue has been created to see if includes in index.php and run.php can be removed: https://github.com/moodlehq/moodle-local_codechecker/issues/94

stronk7 commented 4 years ago

yay * 2!