UseDataKit/DataKit

Restructure exceptions to not trigger WPCS rules

zackkatz opened this issue · 1 comments

Running the plugin through the Plugin Check plugin, which is used by the Plugin Team code reviewers, results in many WordPress.Security.EscapeOutput.ExceptionNotEscaped errors.

I believe this is because Exceptions are expected to have $message as the first parameter ($message, $code, $throwable).

I think it unlikely that the code checker will be fixed to address non-conforming Exceptions, so is it a good idea to rework our exceptions to match the expected pattern?

It isn't about the order of parameters. It really is about the message not being escaped. And I think that a bit weird. We can just ignore all of them, as the messages are never contain user content. That's why I ignored it in the phpcs config.