Thanks for the fix! I checked out this branch and poked at it a bit. Based on pyright's output, and on the response to the issue you linked in the pyright repo, I think the column numbers are 0-based as well, and we need to bump those also.
Here's a raw diagnostic from pyright running on bad.py:
{
"file": "/home/jordan/Source/action-pyright/pyright_to_rdjson/tests/files/bad.py",
"severity": "error",
"message": "Operator \"+\" not supported for types \"str\" and \"int\"\n Operator \"+\" not supported for types \"str\" and \"int\"",
"range": {
"start": {
"line": 1,
"character": 11
},
"end": {
"line": 1,
"character": 20
}
},
"rule": "reportGeneralTypeIssues"
},
Here's the line it's referring to:
return one + two + three
If you assume character is zero-based, then the string it calls out is one + two.
If you assume character is one-based, then the string it calls out is one + tw.
Thanks for the fix! I checked out this branch and poked at it a bit. Based on pyright's output, and on the response to the issue you linked in the pyright repo, I think the column numbers are 0-based as well, and we need to bump those also.
Here's a raw diagnostic from pyright running on bad.py:
Here's the line it's referring to:
If you assume
character
is zero-based, then the string it calls out isone + two
.If you assume
character
is one-based, then the string it calls out isone + tw
.According to the Reviewdog JSON Schema, their positions are one-based: https://github.com/reviewdog/reviewdog/blob/master/proto/rdf/jsonschema/Position.jsonschema