Skip to content

Commit

Permalink
fix(ops): align linters with 'axiom-go'
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasmalkmus committed Sep 28, 2022
1 parent a07c63a commit a7c5c52
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion internal/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
4 changes: 2 additions & 2 deletions internal/cmdutil/completion.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit a7c5c52

Please sign in to comment.