Description
Current problem
At the moment, pylint
only include a column offset in the output. That works find for command line or CI uses but doesn't work too well in IDEs. They depend on us to output an error range so they can effectively highlight the issue.
microsoft/vscode-python#18027
Desired solution
We already have node information for most / all (?) errors. Those include end column information. It should be fairly strait forward to add a new formatting option to the pylint output.
A Todo list:
- Modify output formatter to allow outputting end column information -> Update reporters to (allow) use of
end_line
andend_column
#5372 - Update documentation -> Update reporters to (allow) use of
end_line
andend_column
#5372 - Test changes -> Update functional test expected output #5349 & Check
node
location attributes in unittests #5383 - Update test runner to check end column info -> Update functional test expected output #5349 & Check
node
location attributes in unittests #5383 - Update existing tests -> Update functional test expected output #5349 & Check
node
location attributes in unittests #5383 - Decide what to output if we don't have an end column. -> end of line, only one char, repeat column offset? -> Update reporters to (allow) use of
end_line
andend_column
#5372
Additional context
Maybe we can release a beta
version first. With that IDEs and extensions could be updated and then it's up to us.
For that first version we wouldn't need to update the existing tests. It should be enough to enable the output.
--
Side note: IMO, this should be completely optional. It doesn't make much sense to update the default output.