fix: interpret span correctly for github format#1621
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors GitHub Actions output formatting by exporting and utilizing the FileLocation and Position types from the lint package. The manual span processing in github_actions.go is replaced with FileLocationFromPBLocation, and tests are updated to reflect the new output. Feedback includes suggestions to simplify formatting logic, correct a capitalization error in a comment, and improve documentation for the newly exported functions.
52e51be to
76a76d4
Compare
|
Hey @SoMuchForSubtlety, thank you so much for submitting this PR. We definitely do not want to expose this API, so I think a small re-implementation would be appropriate. Additionally, if you don't mind, could you also reference #1071 to determine if this change addresses that issue? |
Reuse location logic from the lint package The old location logic had two bugs - keeping locations zero-indexed - interpreting end column as end line in case of span size 3
39069e0 to
5097d9b
Compare
The old location logic had two bugs
I decided to reuse the existing correct implementation from the lint package. I can re-implement it if you would prefer not to expose this API.I also fixed newlines, github does not support
\n, but at least partially supports%0A, see actions/toolkit#193Closes #1071