Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure that we only use the TodoComment Sniff for core runs, not for plugin ones #266

Closed
stronk7 opened this issue Jan 17, 2024 · 0 comments · Fixed by #267
Closed

Ensure that we only use the TodoComment Sniff for core runs, not for plugin ones #266

stronk7 opened this issue Jan 17, 2024 · 0 comments · Fixed by #267

Comments

@stronk7
Copy link
Member

stronk7 commented Jan 17, 2024

With moodlehq/moodle-cs#91 we are introducing a new Sniff that looks for missing MDL-xxxx issue codes in all the TODO and @todo comments (as stated by the coding style).

This Sniff is only for core, hence we have to prevent it to be executed for plugins within moodle-plugin-ci. By disabling it or by setting commentRequiredRegex to an empty value.

Ciao :-)

stronk7 added a commit to stronk7/moodle-plugin-ci that referenced this issue Jan 17, 2024
That sniff covers the core coding style and verifies that all the
TODOs (inline or phpdoc block), have a MDL issue associated.

But that's not a requirements for plugins, hence disabling
that Sniff for them.

Fixes moodlehq#266
stronk7 added a commit to stronk7/moodle-plugin-ci that referenced this issue Jan 18, 2024
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 moodlehq#266
stronk7 added a commit to stronk7/moodle-plugin-ci that referenced this issue Jan 18, 2024
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 moodlehq#266
stronk7 added a commit to stronk7/moodle-plugin-ci that referenced this issue Jan 19, 2024
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 moodlehq#266
stronk7 added a commit to stronk7/moodle-plugin-ci that referenced this issue Jan 19, 2024
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 moodlehq#266
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant