-
Notifications
You must be signed in to change notification settings - Fork 74
Description
Since some months ago, core includes a .phpcs.xml file, really useful that instructs to any PHP_CodeSniffer about which standard must be used by default.
And the standard is "moodle" how now.
Problem is that PHP_CodeSniffer first looks for local (pwd) directories with that name ("moodle") and, in the case of codechecker, that's currently a soft alias, pointing to the new moodle-cs standard, and kept on purpose to allow other tools to continue working.
While codechecker's bundled PHP_CodeSniffer doesn't need that file at all (because the standards are perfectly configured via .conf file), its default behaviour is to look to those .phpcs.xml files. Then it reads "moodle" from there and resolves it to the soft alias. And soft aliases don't work on Windows, causing an error.
An error occurred during processing; checking has been aborted. The error message was:
Ruleset C:\...\local\codechecker\moodle is not valid - On line 1, column 1: Start tag expected, '<' not found
We need to ensure that codechecker's bundled PHP_CodeSniffer stops looking to core .phpcs.xml, surely by introducing its own .phpcs.xml file (that will cause it to stop looking upwards). At least that's the theory.
Let's see. Ciao :-)