Skip to content

Incorrect horizontal position of fixme warnings (W0511) #4218

Closed
@bersbersbers

Description

@bersbersbers

The horizontal positions of the following four W0511 warning are all 2:

bug.py:

"""Horizontal position of fixme."""

# TODO 1
print(1)  # TODO 2


def fun():
    """Test in function."""
    # TODO 3
    if True & True:
        pass
        # TODO 4

pylint bug.py:

************* Module bug
bug.py:3:2: W0511: TODO 1 (fixme)
bug.py:4:2: W0511: TODO 2 (fixme)
bug.py:9:2: W0511: TODO 3 (fixme)
bug.py:12:2: W0511: TODO 4 (fixme)

This is how that is rendered by VS Code:
image

Shouldn't the position be the start of the comment (or the start of TODO)?

Metadata

Metadata

Assignees

Labels

Enhancement ✨Improvement to a componentGood first issueFriendly and approachable by new contributorsHelp wanted 🙏Outside help would be appreciated, good for new contributors

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions