Closed stronk7 closed 5 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
8f23cf5
) 85.17% compared to head (2b00727
) 85.19%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Ok, we have agreed to add a new option (ttodo-comment-regex
) to the phpcs
command.
So this PR is not valid right now... working on it soon... ciao :-)
Commit amended, now the new todo-comment-regex
takes the baton to decide how to proceed:
Ciao :-)
Changelog record is required (feel free to add later).
Thanks @kabalin,
I'll add the CHANGELOG details, yep (tomorrow).
Also I've converted this to draft because we need the new moodle-cs release to happen in order to get the new unit tests that I've added passing (they require a working moodle-cs with the new config option).
Once we bump to new moodle-cs, I'll complete this.
Ciao :-)
CHANGELOG updated with text:
--todo-comment-regex
option to the phpcs
command. When specified, all the todo comments (TODO
and @todo
) are inspected to ensure that they contain some text matching the regular expression (a tracker issue key: MDL-[0-9]+
, a link to GitHub: github.com/moodle/moodle/pull/[0-9]+
, ... or any other valid alternative).Still holding on https://github.com/moodlehq/moodle-cs/pull/91 and moodle-cs
release, to progress this. Not in a hurry.
About to go merging this (once tests end), as far as it was approved with all the changes but the CHANGELOG
ones that came later.
Immediately after getting this landed, will make a release, so it can be tested out there (default and custom regular expressions).
Ciao :-)
A new
todo-comment-regex
option has been added to the phpcs command.It allows to specify the regex that will be used with inspecting todo (TODO and @todo) comments.
By default, an empty string is used for the option and that makes the Sniff to stop checking. Whoever wants to check for anything (tracker issue, github issue, arbitrary url, ...) can us the new option to configure it.
Fixes #266