Skip to content

Comments inside if statements are not parsed #111

@thomasvisma

Description

@thomasvisma

Hi there,

we are using your package to identify TODOs with expired dates. First of all, great package and thanks for making it!

Recently we added a //todo 2024-09-10 inside an if statement and realized (after the deadline) that this was not picked up.

Issue

Comments inside if statements are not parsed, therefore no rules are triggered.

Version

phpstan-todo-by 0.1.27

Example

if (
// @todo 2024-08-01 Do something important 
$someStatement
) {
...
}

If the comment is moved to on top of the if, it will be parsed:

// @todo 2024-08-01 Do something important 
if (
$someStatement
) {
...
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions