moodlehq / moodle-cs

Moodle Coding Style
https://github.com/moodlehq/moodle-cs
GNU General Public License v3.0
18 stars 16 forks source link

Add sniff to detect missing docblocks #119

Closed andrewnicols closed 8 months ago

andrewnicols commented 8 months ago

Replaces:

local_moodlecheck_registry::add_rule('filephpdocpresent')->set_callback('local_moodlecheck_filephpdocpresent');
local_moodlecheck_registry::add_rule('classesdocumented')->set_callback('local_moodlecheck_classesdocumented');
codecov[bot] commented 8 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 97.54%. Comparing base (88f207d) to head (88eb84c).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #119 +/- ## ============================================ + Coverage 97.46% 97.54% +0.08% - Complexity 706 735 +29 ============================================ Files 30 32 +2 Lines 2090 2160 +70 ============================================ + Hits 2037 2107 +70 Misses 53 53 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

stronk7 commented 8 months ago

One more little thing... this also replaces the "functionsdocumented" or no? I've seen that we skip it for methods, but it works for global scope functions correct?

andrewnicols commented 8 months ago

Okay,

So I've refactored this a fair amount:

stronk7 commented 8 months ago

Thanks @andrewnicols, it looks perfect, so I'm going to merge this now.

The only remaining point is to confirm if we should, also, remove (or no) the "functionsdocumented" check from local_moodlecheck, because in https://github.com/moodlehq/moodle-local_moodlecheck/pull/134 we only removed the file and class checks.

Ciao :-)

andrewnicols commented 8 months ago

Sorry about that. I have raised https://github.com/moodlehq/moodle-local_moodlecheck/pull/137 for it.