yuzutech / annotations-action

GitHub action to create annotations from a JSON file
MIT License
36 stars 14 forks source link

Annotations across multiple lines not showing up? #68

Open Nate-Wessel opened 7 months ago

Nate-Wessel commented 7 months ago

I have an annotation file like the following, generated by SQLFluff 3.0.5

[
    {"file": "high_injury_network/4_HIN/percent_x_percent.sql", "start_line": 12, "start_column": 22, "end_line": 12, "end_column": 31, "title": "SQLFluff", "message": "AL02: Implicit/explicit aliasing of columns.", "annotation_level": "failure"},
    {"file": "high_injury_network/4_HIN/percent_x_percent.sql", "start_line": 20, "start_column": 5, "end_line": 21, "end_column": 75, "title": "SQLFluff", "message": "LT09: Select targets should be on a new line unless there is only one select target.", "annotation_level": "failure"},
    {"file": "high_injury_network/4_HIN/percent_x_percent.sql", "start_line": 20, "start_column": 11, "end_line": 20, "end_column": 12, "title": "SQLFluff", "message": "LT02: Expected line break and indent of 8 spaces before 'SUM'.", "annotation_level": "failure"},
    {"file": "high_injury_network/4_HIN/percent_x_percent.sql", "start_line": 30, "start_column": 1, "end_line": 31, "end_column": 56, "title": "SQLFluff", "message": "LT09: Select targets should be on a new line unless there is only one select target.", "annotation_level": "failure"}
]

I think I've noticed a pattern that where start_line == end_line everything seems to work fine and the annotation shows up as expected. But where that's not true, for annotations referencing multiple lines, the action still fails (as it should), but the annotations are just not shown. It's really hard to debug these!

For context, the full Github action I'm using is here.

Nate-Wessel commented 7 months ago

Possibly a bug somewhere further down the line? https://github.com/orgs/community/discussions/122594