Add @todo Fixing Functionality#123
Conversation
Amend comments in regex, add test for normal to do in comment, remove…
|
All tests and code style checks are passing. |
|
I'm not sure why this is showing old commits. If you are squashing when you merge, it shouldn't matter though I suppose. If you want me to open a new PR that only shows the new commits I can do that too. The diff looks correct though. |
arkener
left a comment
There was a problem hiding this comment.
Thank you for working on this! The PHPStan check currently seems to be failing, I'm unsure why the check isn't showing up here, @klausi any idea?
Running this on core returns the expected results with 1 exception. The fixer currently breaks when an empty @todo is given, for example:
function lorem() {
// @todo
$node = Node::load(1);
}Results in the following
function lorem() {
// @todo $node = Node::load(1);
}Could you add a test for the fixer? That way we can automatically validate the fixer. This can be achieved by adding the TodoCommentUnitTest.inc.fixed file, containing the expected result of the autofix based on the TodoCommentUnitTest.inc file.
|
Strange that Travis CI does not show up. I also see some other commits here - can you make a new pull request where you start the branch fresh from origin/8.x-3.x? |
|
New PR with those fixes coming up. |
|
I fixed the new line creation, but how do we want to handle Maybe it should be fixed to |
https://www.drupal.org/project/coder/issues/3177471