Skip to content

Commit

Permalink
Merge pull request #648 from cloudflare/issue-645
Browse files Browse the repository at this point in the history
Ensure we always use modified lines
  • Loading branch information
prymitive authored Jun 9, 2023
2 parents 287e264 + 576e5ca commit badbfd0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
1 change: 1 addition & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

- Rule names were not checked for correctly, allowing for rules with empty names
to pass checks.
- Fixed GitHub annotations being added to unmodified lines - #645.

## v0.44.0

Expand Down
7 changes: 2 additions & 5 deletions internal/reporter/bitbucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,11 +270,8 @@ func moveReportedLine(report Report) (reported, original int) {
}
}

if reported < 0 && report.Problem.Severity == checks.Fatal {
for _, ml := range report.ModifiedLines {
reported = ml
break
}
if reported < 0 && len(report.ModifiedLines) > 0 {
return report.ModifiedLines[0], original
}

return reported, original
Expand Down

0 comments on commit badbfd0

Please sign in to comment.