Skip to content

Add columnCharIndex field to LocalizedMessage #4998

@MEZk

Description

@MEZk

The log method of AbstractCheck stores shifted column number (with expanded tabs) to the LocalizedMessage. This column number cannot be used in XpathFilter as the token with that columnNo might not exist in the tree.

For example, if there is a tab character on line 1, the ANTLR parser will return the token with the columnNo=1, but Checkstyle will print 4 as a columnNo in the violation.

Thus, we need to store the real column number to localized message.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions