Skip to content

Commit

Permalink
Merge pull request #455 from kishikawakatsumi/bitmovin-engineering-fe…
Browse files Browse the repository at this point in the history
…ature/fix-reported-line-numbers

Bitmovin engineering feature/fix reported line numbers
  • Loading branch information
kishikawakatsumi authored Sep 26, 2022
2 parents e8dbbd5 + e0badee commit c908065
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 11 deletions.
15 changes: 9 additions & 6 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions src/report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -309,11 +309,13 @@ export class BuildLog {
const value = parseInt(pair[1])
switch (pair[0]) {
case 'StartingLineNumber': {
startLine = value
// StartingLineNumber is 0-based, but we need a 1-based value
// see https://github.com/diogot/danger-xcode_summary/blob/master/lib/xcode_summary/plugin.rb#L207
startLine = value + 1
break
}
case 'EndingLineNumber': {
endLine = value
endLine = value + 1
break
}
default:
Expand Down Expand Up @@ -378,11 +380,11 @@ export class BuildLog {
const value = parseInt(pair[1])
switch (pair[0]) {
case 'StartingLineNumber': {
startLine = value
startLine = value + 1
break
}
case 'EndingLineNumber': {
endLine = value
endLine = value + 1
break
}
default:
Expand Down

0 comments on commit c908065

Please sign in to comment.