Skip to content

Commit

Permalink
Enable to get source line
Browse files Browse the repository at this point in the history
  • Loading branch information
nakabonne committed May 17, 2020
1 parent fda0015 commit a5e9bbb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/golangcilint/issue.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,10 @@ func (i *Issue) Line() int {
func (i *Issue) Column() int {
return i.issue.Column()
}

func (i *Issue) SourceLine() string {
if len(i.issue.SourceLines) < 1 {
return ""
}
return i.issue.SourceLines[0]
}

0 comments on commit a5e9bbb

Please sign in to comment.