Skip to content

Commit

Permalink
Merge pull request #461 from dodona-edu/fix/shellcheck-ii
Browse files Browse the repository at this point in the history
Fix negative columns in shellcheck output
  • Loading branch information
niknetniko authored Nov 23, 2023
2 parents 9bdbccd + 8258a75 commit c5f0b09
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tested/languages/bash/linter.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,15 @@ def run_shellcheck(
start_col = shellcheck_object.get("column", 1)
end_col = shellcheck_object.get("endColumn")
cols = end_col - start_col if end_col else None
if cols and cols < 1:
cols = 1
annotations.append(
AnnotateCode(
row=start_row + config.source_offset,
rows=rows,
text=text,
externalUrl=external,
column=start_col,
column=start_col - 1,
columns=cols,
type=message_categories.get(
shellcheck_object.get("level", "warning"), Severity.WARNING
Expand Down

0 comments on commit c5f0b09

Please sign in to comment.