moodlehq / moodle-cs

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

Unable to pass checks with multiline attributes using MissingDocblockSniff for non-class methods #185

Closed ziegenberg closed 2 months ago

ziegenberg commented 2 months ago

The following file fails with an error messages:

<?php
/*
 * Function with multiline attributes.
 */
#[someattribute(
    attr1: 'asdf',
    attr2: 'asdf',
)]
function single_method_multiline_attribute(): void {
}

Also see: https://integration.moodle.org/job/Precheck%20remote%20branch/164248/artifact/work/smurf.html#phpcs

ziegenberg commented 2 months ago

Yeah, I will close this one again. It was a false positive...

andrewnicols commented 2 months ago

For anyone wondering why thi sis a false positive:

/*
 * Test.
 */

vs.

/**
 * Test.
 */
ziegenberg commented 2 months ago

This sneaky little missing asterisk. It took me an hour to find it. And some debugging. 🙈