Skip to content

Do not report errors in the one-line comments that start with "Mdlcode" #193

@marinaglancy

Description

@marinaglancy

Mdlcode extension for vscode allows to insert directives https://mdlcode.dev/docs/directives , sometimes they can be too long and sometimes they trigger the "X% valid code" error:

  • Line exceeds 132 characters; contains 143 characters (moodle.Files.LineLength.TooLong)
  • Inline comments must end in full-stops, exclamation marks, or question marks
  • This comment is 60% valid code; is this commented out code?

Can we exclude the comments that start with "Mdlcode" from these checks? I can see that there are a couple of exceptions already:
https://github.com/moodlehq/moodle-cs/blob/main/moodle/Sniffs/Commenting/InlineCommentSniff.php#L296
https://github.com/moodlehq/moodle-cs/blob/main/moodle/Sniffs/Commenting/InlineCommentSniff.php#L438

Thanks in advance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions