diff --git a/.golangci.yml b/.golangci.yml index 6fb47e0..70247aa 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,3 +1,8 @@ run: + tests: true skip-dirs: - internal/tools + linters-settings: + govet: + enable-all: true + diff --git a/internal/github/api_source_list_sources.go b/internal/github/api_source_list_sources.go index fb8438d..9924c5c 100644 --- a/internal/github/api_source_list_sources.go +++ b/internal/github/api_source_list_sources.go @@ -101,7 +101,7 @@ func (s *ListSourcesAPISource) Sources(ctx context.Context) (api.Review, []api.S continue } id := *c.PullRequestReviewID - count, _ := commentsByReviewID[id] + count := commentsByReviewID[id] commentsByReviewID[id] = count + 1 } diff --git a/internal/view/review/content.go b/internal/view/review/content.go index 1658ab9..961d54c 100644 --- a/internal/view/review/content.go +++ b/internal/view/review/content.go @@ -117,7 +117,9 @@ func (c Card) Render() el.Component { el.Div{ el.Class("w-full", "text-sm", "p-3", "bg-slate-100", "border-b", "border-slate-300", "gap-1", "rounded-t-xl"), badge(c.Badge), - el.Content{c.Title}, + el.Content{ + c.Title, + }, }, el.Content{c.Body}, }, diff --git a/internal/view/review/page_content.go b/internal/view/review/page_content.go index 6526e8e..54fa04b 100644 --- a/internal/view/review/page_content.go +++ b/internal/view/review/page_content.go @@ -40,7 +40,7 @@ func PageContent(p github.ReviewParamsMap, model api.Review) veun.AsView { }, el.Class("underline", "hover:no-underline"), el.Href(c.Title.HRef), - el.Attr{"target", "_blank"}, + el.Attr{Key: "target", Value: "_blank"}, }, Body: el.Div{ el.Class("flex flex-col md:flex-row max-h-[95vh] bg-gray-50"), diff --git a/internal/view/review/slide_content.go b/internal/view/review/slide_content.go index 2a5e7d6..73d2199 100644 --- a/internal/view/review/slide_content.go +++ b/internal/view/review/slide_content.go @@ -74,7 +74,7 @@ func SlideContent(p github.ReviewParamsMap, model api.Review) veun.AsView { Card{ Badge: idx + 1, Title: el.A{ - el.Attr{"target", "_blank"}, + el.Attr{Key: "target", Value: "_blank"}, el.Href(c.Title.HRef), el.Code{el.Text(c.Title.Text)}, },