Skip to content

Conversation

massongit
Copy link
Contributor

startLine := loc.GetRange().GetStart().GetLine()
endLine := loc.GetRange().GetEnd().GetLine()
if endLine == 0 {
endLine = startLine
}
return int(startLine), int(endLine)

The above code is common regardless of the branch of the if statement.
Therefore, I refactor it so that it is written only once.

  • Updated Unreleased section in CHANGELOG or it's not notable changes.
    • It's not notable changes.

@haya14busa haya14busa merged commit f31b773 into reviewdog:master Jun 30, 2024
@massongit massongit deleted the refactor_github_comment_line_range branch June 30, 2024 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants