From a7c5c52966b202b2c96f7bd03d87266ca5de9dfc Mon Sep 17 00:00:00 2001 From: Lukas Malkmus Date: Mon, 22 Aug 2022 16:12:51 +0200 Subject: [PATCH] fix(ops): align linters with 'axiom-go' --- .golangci.yaml | 5 +++++ internal/client/client.go | 2 +- internal/cmdutil/completion.go | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.golangci.yaml b/.golangci.yaml index 6155cec..1062cae 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -46,3 +46,8 @@ linters-settings: local-prefixes: github.com/axiomhq/cli govet: check-shadowing: true + nolintlint: + allow-unused: false + allow-leading-space: false + require-explanation: true + require-specific: true diff --git a/internal/client/client.go b/internal/client/client.go index d58dc99..82ee306 100644 --- a/internal/client/client.go +++ b/internal/client/client.go @@ -29,7 +29,7 @@ func New(ctx context.Context, baseURL, accessToken, orgID string, insecure bool) } if insecure { - httpTransport.TLSClientConfig = &tls.Config{InsecureSkipVerify: true} //nolint:gosec + httpTransport.TLSClientConfig = &tls.Config{InsecureSkipVerify: true} //nolint:gosec // This is intended behaviour. } httpClient := &http.Client{ diff --git a/internal/cmdutil/completion.go b/internal/cmdutil/completion.go index 63aaacc..5c2428e 100644 --- a/internal/cmdutil/completion.go +++ b/internal/cmdutil/completion.go @@ -37,7 +37,7 @@ func FormatCompletion(_ *cobra.Command, _ []string, toComplete string) ([]string // DatasetCompletionFunc returns a completion function which completes the // datasets from the configured deployment. // -//nolint:dupl +//nolint:dupl // This is about datasets and not organizations. func DatasetCompletionFunc(f *Factory) CompletionFunc { return func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { // Just complete the first argument. @@ -73,7 +73,7 @@ func DatasetCompletionFunc(f *Factory) CompletionFunc { // OrganizationCompletionFunc returns a completion function which completes the // organization IDs for the active deployment. // -//nolint:dupl +//nolint:dupl // This is about organizations and not datasets. func OrganizationCompletionFunc(f *Factory) CompletionFunc { return func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { // Just complete the first argument.