Skip to content

Commit

Permalink
fix depguard
Browse files Browse the repository at this point in the history
Signed-off-by: denis-tingaikin <denis.tingajkin@xored.com>
  • Loading branch information
denis-tingaikin committed Jun 29, 2023
1 parent 129c6d4 commit 7c61772
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
22 changes: 11 additions & 11 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
---
run:
# concurrency: 6
go: "1.20"
go: '1.20'
timeout: 2m
issues-exit-code: 1
tests: true
linters-settings:
goheader:
template-path: ".license/template.txt"
template-path: .license/template.txt
values:
regexp:
company: .*
copyright-holder: Copyright \(c\) ({{year-range}}) {{company}}\n\n
copyright-holders: ({{copyright-holder}})+
copyright-holder: 'Copyright \(c\) ({{year-range}}) {{company}}\n\n'
copyright-holders: '({{copyright-holder}})+'
errcheck:
check-type-assertions: false
check-blank: false
Expand All @@ -38,6 +36,12 @@ linters-settings:
funlen:
Lines: 100
Statements: 50
depguard:
rules:
main:
deny:
- pkg: errors
desc: Please use github.com/pkg/errors instead of errors in go imports
goconst:
min-len: 2
min-occurrences: 2
Expand Down Expand Up @@ -120,12 +124,12 @@ linters-settings:
linters:
disable-all: true
enable:
# - rowserrcheck
- goheader
- bodyclose
- deadcode
- dogsled
- dupl
- depguard
- errcheck
- funlen
- gochecknoinits
Expand All @@ -140,7 +144,6 @@ linters:
- govet
- ineffassign
- interfacer
# - lll
- misspell
- nakedret
- scopelint
Expand All @@ -150,16 +153,13 @@ linters:
- typecheck
- unconvert
- unparam
# - unused
- varcheck
- whitespace
issues:
exclude-use-default: false
max-issues-per-linter: 0
max-same-issues: 0
exclude-rules:
# We really *do* want to pass a pointer to an interface in these cases. See comments in file for New{Server,Client}
# function for why
- path: pkg/tools/k8s/
linters:
- goheader
Expand Down
2 changes: 1 addition & 1 deletion pkg/registry/etcd/nse_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ package etcd_test

import (
"context"
"errors"
"io"
"testing"
"time"

"github.com/networkservicemesh/api/pkg/api/registry"
"github.com/pkg/errors"
"github.com/stretchr/testify/require"
"google.golang.org/protobuf/types/known/timestamppb"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down

0 comments on commit 7c61772

Please sign in to comment.