moodlehq / moodle-cs

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

ERROR | Missing member variable doc comment (moodle.Commenting.VariableComment.Missing) reporting on constructor parameters. #143

Closed gjb2048 closed 5 months ago

gjb2048 commented 5 months ago

In https://github.com/moodlehq/moodle-cs/releases/tag/v3.4.2 the sniff "Add new moodle.Commenting.VariableComment sniff to check that the @var tag and its types are used correctly." was added. This appears to be incorrectly reporting an issue with constructor parameters:

Screenshot 2024-03-31 114122

given the line numbers, you can match against https://github.com/gjbarnard/moodle-theme_foundation/blob/MOODLE_403/classes/admin_setting_configcolourpicker.php#L32-L60 being the code:

Screenshot 2024-03-31 114558

No matter what I do to the documentation comments of the actual member variables, I can't solve this! Do I need to add some sort of reference to the inherited member variables?

If you'd like a core file to test against, then use the lib/adminlib.php file:

Screenshot 2024-03-31 115017

being the code:

Screenshot 2024-03-31 115115

in Moodle 2023100903.11 4.3.3+ (Build: 20240326).

I realise that this is Windows, however, first spotted GitHub actions given https://github.com/moodlehq/moodle-plugin-ci/commit/c3f7ea8c1190bc6516076d2ba1a649a3de89a8cd#diff-d2ab9925cad7eac58e0ff4cc0d251a937ecf49e4b6bf57f8b95aab76648a9d34R58.

stronk7 commented 5 months ago

Hi @gjb2048 ,

thanks for the report. I’m closing this as dupe of #142 , where it’s being investigated.

Ciao :-)