Code-checker
Maintained by
Victor Deniz, Sara Arjona, Eloy Lafuente (stronk7), Tim Hunt
A tool for developers that helps them follow Moodle's coding style.
Comments
Comments are no longer open for new posts. Existing comments remain available to read.
I love this plugin and use it regularly. Will this plugin be updated for Moodle 4.5 LTS, 5.0, 5.1 and the upcoming 5.2 soon? I noticed that the version on GitHub was updated just 3 months ago.
Best regards,
Michael Milette
I did forget to bump version.php and just discovered it when publishing the new version in the Plugins directory. Expect a new release soon (2.9.3) fixing that. Sorry for the troubles!
Release 2.9.2 - Selectivenesses"
I don't know which editor you are using for that syntax to work. I have never seen it before, but doing something just for one editor is less likely to be a sensible decision.
So, given we want to encourage well-factored code, not long sprawling blocks of code, and we want to be editor-neutral, I am not enthusiastic about your suggestion.
What are the thoughts of having the code checker ignore code folding? Does code folding need to be defined in the Moodle coding style before being allowed in the code checker?
/// <editor-fold desc="This is a bunch of code that does stuff">
/// </editor-fold>
This doesn't check the column names in install.xml file. There is a coding standard for the column names as well. "Column names should be always lowercase, simple and short, following the same rules as for variable names. (https://docs.moodle.org/dev/Database)".
Looking at the code I believe that this: https://github.com/moodlehq/moodle-local_codechecker/blob/master/moodle/tests/moodlestandard_test.php#L344 should be a failure of 'Expected 1 space before "="; 2 found' given: https://github.com/moodlehq/moodle-local_codechecker/blob/master/moodle/tests/fixtures/squiz_whitespace_operatorspacing.php#L18
Cheers,
Gareth