Skip to content

Commit

Permalink
Minor code refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
matejchalk committed Apr 9, 2024
1 parent c6a58e4 commit d2c12da
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions __tests__/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,9 @@ describe('code-pushup action', () => {

expect(core.setFailed).not.toHaveBeenCalled()

expect(core.error).toHaveBeenCalledTimes(0)
expect(core.warning).toHaveBeenCalledTimes(0)
expect(core.notice).toHaveBeenCalledTimes(0)
expect(core.error).not.toHaveBeenCalled()
expect(core.warning).not.toHaveBeenCalled()
expect(core.notice).not.toHaveBeenCalled()

expect(core.setOutput).toHaveBeenCalledWith('comment-id', 10)

Expand Down
4 changes: 2 additions & 2 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.

4 changes: 2 additions & 2 deletions src/issues.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ function positionsMatch(
return hasPosition(prev) === hasPosition(curr)
}
return (
startLinesMatch(prev, curr, changedFiles) ||
adjustedStartLinesMatch(prev, curr, changedFiles) ||
adjustedLineSpansMatch(prev, curr, changedFiles)
)
}
Expand All @@ -108,7 +108,7 @@ function hasPosition(
return source.position != null
}

function startLinesMatch(
function adjustedStartLinesMatch(
prev: Required<SourceFileIssue['source']>,
curr: Required<SourceFileIssue['source']>,
changedFiles: ChangedFiles
Expand Down

0 comments on commit d2c12da

Please sign in to comment.