Moodle Plugins directory: Moodle PHPdoc check | Moodle.org
Moodle PHPdoc check
Local plugins ::: local_moodlecheck
Maintained by
Eloy Lafuente (stronk7),
Andrew Lyons
Part of set Moodle development.
Tool for Moodle developers: allows to check phpdocs in the code for compliance with Moodle Coding Style.
Latest release:
283 sites
182 downloads
21 fans
Current versions available: 2
The latest version of this plugin is available on github
Install the source into the local/moodlecheck directory in your moodle
Log in as admin and select:
Settings -> Site administration -> Development -> Moodle PHPdoc check
enter paths to check and select rules to use.
Customization:
You can add new rules by adding new php files in rules/ directory, they will be included automatically. Look at other files in this directory for examples.
Please note that if you register the rule with code 'mynewrule', the rule registry will look in language file for strings 'rule_mynewrule' and 'error_mynewrule'. If they are not present, the rule code will be used instead of the rule name and
default error message appears.
Useful links
Contributors
Eloy Lafuente (stronk7) (Lead maintainer)
Andrew Lyons
Please login to view contributors details and/or to contact them
$plugin->component = "local_moodlecheck";
I just tried running the latest version from GitHub, and where I use fully qualified class names in parameter lists, it complains:
Phpdocs for function xxx has incomplete parameters list (error)
Is this intentional? Is it recommended to add "use" to PHP files instead of having fully qualified class names?
Thanks.
I'd recommend you to create and issue @ https://github.com/moodlehq/moodle-local_moodlecheck/issues with as many details as possible (code example or link to it, results that you are getting...).
That would help a lot to better reproduce, understand and fix the problem.
Ciao
I notice the checker currently doesn't validate PHPDoc types. I think this would be good to do, especially since it does some type checking (best to ensure that the types being checked are valid). I've put something together here:
https://github.com/james-cnz/moodle-local_moodlecheck/tree/parse_extended_array_types
It's pretty basic, but I think it accepts probably the most commonly used types, and I think accepting many more types would make it difficult to do the type checking. It expects types to have no whitespace in them, because that's what the checker currently seems to assume. Is this of interest? Should I make it into a pull request?
Cheers,
James
Thanks for sharing this site, It's helps me a lot. https://fencecontractormantecaca.com/