moodle-cs icon indicating copy to clipboard operation
moodle-cs copied to clipboard

Moodle Coding Style

Results 55 moodle-cs issues
Sort by recently updated
recently updated
newest added

This is about to enforce the following policy decided recently (https://tracker.moodle.org/browse/MDLSITE-6087). > Policy: Require formal namespaces for any new PHP files > Since 19th June 2020, this rule applies: >...

bug

This is about to implement the same logic available @ MDLSITE-2096 in the code checker. Note: Same harcoded classes (until we have a classmap), also as warning, not error. ---...

This is a code smell and leads to tests which: * store instance data in the test itself and do not clean up (memory bloat in the test _run_) *...

In #34 we started checking for PHP long array syntax (September 2023). As we have done with other new checks, it was created: - As warning within the `moodle` standard....

``` vendor/*.js vendor/*.css ``` As they'll be blocked by MDL-69333

Right now we are using a dev version of PHPCompatibility in all our products: - moodle-cs (see https://github.com/moodlehq/moodle-cs/pull/36) - CiBoT (see https://github.com/moodlehq/moodle-local_ci/commit/ba75031362ecacb96e450ccb9fa80ce39e84b168) - moodle-plugin-ci (see [#196](https://github.com/moodlehq/moodle-plugin-ci/issues/196)) - local_codechecker(see [#213](https://github.com/moodlehq/moodle-local_codechecker/pull/213)) Once...

Sadly I don't think that we can easily do this with configuartion of the existing sniff, but essentially there are certain errors and warnings we want to ignore with regards...

Hi Is usage of magic `__construct()` in derived classes restricted by policy? Code: ``` # auth/emailotp/settings.php #(...) $settings->add(new class( 'auth_emailotp/minrequestperiod', get_string('minrequestperiod', 'auth_emailotp'), get_string('minrequestperiod_help', 'auth_emailotp') ) extends admin_setting_configtext { public function...

Right now we are not looking for C-style (/* .... */, single or multiline) in the checker. More yet, we are, incorrectly, [suggesting them](https://github.com/stronk7/moodle-local_codechecker/blob/7e9f2602aac911efe9ec65fce697d353296810a0/moodle/Sniffs/Commenting/InlineCommentSniff.php#L102)! [Coding style](https://docs.moodle.org/dev/Coding_style#Inline_comments) clearly shows them as...

bug