diff --git a/.golangci.yml b/.golangci.yml index f3265792..db9f0fcc 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -33,7 +33,6 @@ linters: staticcheck: checks: - all - - '-ST1005' # disable rule 'Incorrectly formatted error string' - '-ST1023' # disable rule 'Redundant type in variable declaration' - '-QF1001' # disable rule 'Apply De Morgan’s law' - '-QF1012' # disable rule 'Use fmt.Fprintf instead of x.Write(fmt.Sprintf(...))' diff --git a/internal/api/client.go b/internal/api/client.go index 063751cc..b008a0a1 100644 --- a/internal/api/client.go +++ b/internal/api/client.go @@ -294,7 +294,7 @@ func (c *Client) DoWithRetry(ctx context.Context, request *http.Request, span op span.SetTag("status_code", r.StatusCode) if r.StatusCode != http.StatusOK { - return nil, errors.WithStack(fmt.Errorf("Slack API unexpected status code %d returned from url %s", r.StatusCode, sURL)) + return nil, errors.WithStack(fmt.Errorf("unexpected status code %d returned from url %s", r.StatusCode, sURL)) } var bytes []byte diff --git a/internal/auth/auth.go b/internal/auth/auth.go index 029d7c00..b2b3152b 100644 --- a/internal/auth/auth.go +++ b/internal/auth/auth.go @@ -374,7 +374,7 @@ func (c *Client) SetAuth(ctx context.Context, auth types.SlackAuth) (types.Slack allAuths, err := c.auths(ctx) if err != nil { - return types.SlackAuth{}, "", fmt.Errorf("Failed to fetch user authorizations %s", err) + return types.SlackAuth{}, "", fmt.Errorf("failed to fetch user authorizations %s", err) } allAuths[auth.TeamID] = auth diff --git a/internal/pkg/create/create.go b/internal/pkg/create/create.go index 48632583..449ae3d9 100644 --- a/internal/pkg/create/create.go +++ b/internal/pkg/create/create.go @@ -169,7 +169,7 @@ func getAppDirName(appName string) (string, error) { // name cannot be a reserved word if goutils.Contains(reserved, appName, false) { - return "", fmt.Errorf("The app name you entered is reserved. Please try a different name.") + return "", fmt.Errorf("the app name you entered is reserved") } return appName, nil } diff --git a/internal/pkg/platform/localserver.go b/internal/pkg/platform/localserver.go index 9879a27c..702c084f 100644 --- a/internal/pkg/platform/localserver.go +++ b/internal/pkg/platform/localserver.go @@ -428,7 +428,7 @@ type SocketEvent struct { func sendWebSocketMessage(c WebSocketConnection, linkResponse *LinkResponse) error { // Validate the response if linkResponse == nil { - return slackerror.Wrap(fmt.Errorf("Websocket response message cannot be empty"), slackerror.ErrSocketConnection) + return slackerror.Wrap(fmt.Errorf("websocket response message cannot be empty"), slackerror.ErrSocketConnection) } // Prepare response for websocket diff --git a/internal/style/template.go b/internal/style/template.go index 42d1b5be..608bd8eb 100644 --- a/internal/style/template.go +++ b/internal/style/template.go @@ -111,7 +111,7 @@ func getTemplateFuncs() template.FuncMap { func PrintTemplate(w io.Writer, tmpl string, data any) (err error) { defer func() { if r := recover(); r != nil { - err = fmt.Errorf("Failed to create the template! %+v", r) + err = fmt.Errorf("failed to create the template: %+v", r) } }() t := template.New("template") diff --git a/internal/update/cli_metadata.go b/internal/update/cli_metadata.go index 26c834dc..8c4c7e0c 100644 --- a/internal/update/cli_metadata.go +++ b/internal/update/cli_metadata.go @@ -98,7 +98,7 @@ func (md *Metadata) httpClientRequest(method string, host string, data interface } if res.StatusCode != http.StatusOK { - return errors.WithStack(fmt.Errorf("Slack CLI metadata responded with an unexpected status code %d from url %s", res.StatusCode, host)) + return errors.WithStack(fmt.Errorf("CLI metadata responded with an unexpected status code %d from url %s", res.StatusCode, host)) } var bytes []byte