-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate moodle-local_moodlecheck phpdoc checks to this standard #30
Comments
This commit addss support for the standard Commenting sniffs relating to methods only. Some of the specific sniffs have been disabled, or their severity/type changed to suit our rules. Fixes moodlehq#30
Just thinking... maybe we should comment about this plan also @:
Stating that, progressively, we are proceeding to migrate the current checks to So, some overlapping / dupe reports can be expected here and there (when releases adding and removing don't match) but, ultimately, removing Ciao :-) |
I think we can probably migrate most of our custom-written phpdoc checks into this standard.
There are several, but (un)helpfully phpcs sucks at documenting the rules available. Here's a summary of some of them:
https://stackoverflow.com/questions/13767550/is-there-a-phpcs-standard-targeting-php-docblocks
We will need to tailor this a little, but it should be able to capture most of the phpdoc sniffs for methods at the very least.
packagespecified
- Check package tags #110 / Remove package checks. moodle-local_moodlecheck#131packagevalid
- Check package tags #110 / Remove package checks. moodle-local_moodlecheck#131categoryvalid
- Check category tag #112 / Remove category checks moodle-local_moodlecheck#132noemptysecondline
- (already checked by PSR and Boilerplate) / Remove noemptysecondlines check moodle-local_moodlecheck#133filephpdocpresent
- Add sniff to detect missing docblocks #119 / Remove filephpdocpresent and classesdocumented moodle-local_moodlecheck#134classesdocumented
- Add sniff to detect missing docblocks #119 / Remove filephpdocpresent and classesdocumented moodle-local_moodlecheck#134functionsdocumented
- Add sniff to detect missing docblocks #119 / Docblock removals moodle-local_moodlecheck#137variablesdocumented
- Add sniff to cover correct use of @var #121 / Variablesdocumented removal moodle-local_moodlecheck#135constsdocumented
- Add sniff to detect missing docs for constants #129 / Remove constsdocumented moodle-local_moodlecheck#140definesdocumented
- N/A / Remove all checks for define() moodle-local_moodlecheck#141noinlinephpdocs
- Add sniff to detect use of /// comments. #137 / Remove noinlinephpdocs check moodle-local_moodlecheck#144phpdocsfistline
- Add sniff to check for first line descriptions #134 / Remove phpdocsfistline and functiondescription (#142) moodle-local_moodlecheck#142functiondescription
- Add sniff to check for first line descriptions #134 / Remove phpdocsfistline and functiondescription (#142) moodle-local_moodlecheck#142functionarguments
variableshasvar
- Add sniff to cover correct use of @var #121 / Variablesdocumented removal moodle-local_moodlecheck#135definedoccorrect
- N/A / Remove all checks for define() moodle-local_moodlecheck#141filehascopyright
- Add sniffs for file docblock @copyright and @license #125 / Remove filehascopyright, filehaslicense moodle-local_moodlecheck#139filehaslicense
- Add sniffs for file docblock @copyright and @license #125 / Remove filehascopyright, filehaslicense moodle-local_moodlecheck#139phpdocsinvalidtag
- Introduce various doc tag sniffs #124 / Remove phpdocsinvalidtag, phpdocsnotrecommendedtag, phpdocsinvalidpathtag moodle-local_moodlecheck#136phpdocsnotrecommendedtag
- Introduce various doc tag sniffs #124 / Remove phpdocsinvalidtag, phpdocsnotrecommendedtag, phpdocsinvalidpathtag moodle-local_moodlecheck#136phpdocsinvalidpathtag
- Introduce various doc tag sniffs #124 / Remove phpdocsinvalidtag, phpdocsnotrecommendedtag, phpdocsinvalidpathtag moodle-local_moodlecheck#136phpdocsinvalidinlinetag
phpdocsuncurlyinlinetag
phpdoccontentsinlinetag
Forum discussion: https://moodle.org/mod/forum/discuss.php?d=455786
The text was updated successfully, but these errors were encountered: