From 7fa3553da65af3ca5f859f804c47ec9c6f54576e Mon Sep 17 00:00:00 2001 From: "Stanislav N. aka pztrn" Date: Wed, 29 Jun 2022 13:19:22 +0500 Subject: [PATCH] Make linters happy. --- .golangci.yml | 2 ++ internal/config/config.go | 2 +- internal/gitlab/gitlab.go | 4 ++-- internal/tasks/base.go | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 18bdc1b..eb48f3f 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -16,6 +16,8 @@ linters: - testpackage # Crashes a lot. - gci + # Deprecated. + - exhaustivestruct linters-settings: lll: line-length: 128 diff --git a/internal/config/config.go b/internal/config/config.go index 0662408..4dc82a5 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -45,7 +45,7 @@ func Parse() *Config { panic("Failed to read configuration file data: " + readErr.Error()) } - // nolint:exhaustivestruct + // nolint:exhaustruct cfg := &Config{} if err := yaml.Unmarshal(data, cfg); err != nil { diff --git a/internal/gitlab/gitlab.go b/internal/gitlab/gitlab.go index cb33573..c7dfe47 100644 --- a/internal/gitlab/gitlab.go +++ b/internal/gitlab/gitlab.go @@ -16,7 +16,7 @@ type Client struct { // NewGitlabClient creates new Gitlab's client controlling structure. func NewGitlabClient(cfg *Config) *Client { - // nolint:exhaustivestruct + // nolint:exhaustruct c := &Client{ config: cfg, } @@ -43,7 +43,7 @@ func (c *Client) GetClient() *gitlab.Client { // GetIssuesByTitle returns list of issues that matches passed title in specific // project. func (c *Client) GetIssuesByTitle(projectID int, title string) ([]*gitlab.Issue, error) { - // nolint:exhaustivestruct + // nolint:exhaustruct issues, resp, err := c.client.Issues.ListProjectIssues(projectID, &gitlab.ListProjectIssuesOptions{ ListOptions: gitlab.ListOptions{ PerPage: 1000, diff --git a/internal/tasks/base.go b/internal/tasks/base.go index b287b51..225f0f4 100644 --- a/internal/tasks/base.go +++ b/internal/tasks/base.go @@ -123,7 +123,7 @@ func (b *BaseTask) Run() { b.log("Found no opened tasks and task should be created, doing so. Task deadline: " + nextDeadlineTS.String()) - // nolint:exhaustivestruct + // nolint:exhaustruct err := b.client.CreateIssue(b.projectID, &g.CreateIssueOptions{ Title: &b.title, Description: &b.body,