Skip to content

Commit

Permalink
fix: linter
Browse files Browse the repository at this point in the history
  • Loading branch information
euskadi31 committed Nov 28, 2024
1 parent 859e150 commit d82c33b
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 50 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ jobs:
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v6.1.1
with:
version: v1.60.3
version: v1.62.2
skip-cache: true
92 changes: 43 additions & 49 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,60 +1,14 @@
run:
concurrency: 4
timeout: 1m
issues-exit-code: 1
tests: false

output:
formats:
- format: colored-line-number
print-issued-lines: true
print-linter-name: true

issues:
exclude-use-default: true
exclude-case-sensitive: false
exclude-dirs-use-default: true
max-issues-per-linter: 50
exclude-generated: strict
exclude-files:
- .*_mock\.go
- mock_.*\.go
- .*/pkg/mod/.*$
- .*/go/src/.*\.go

linters-settings:
errcheck:
check-type-assertions: false
check-blank: false
govet:
disable:
- shadow
revive:
ignore-generated-header: true
severity: warning
gofmt:
simplify: true
gocyclo:
min-complexity: 18
dupl:
threshold: 99
goconst:
min-len: 3
min-occurrences: 2
depguard:
rules:
main:
allow:
- $all

misspell:
locale: US
ignore-words:
- cancelled
goimports:
local-prefixes: go.opentelemetry.io


exclude-generated: strict
exclude-use-default: true
max-issues-per-linter: 50
linters:
disable-all: true
enable:
Expand Down Expand Up @@ -93,3 +47,43 @@ linters:
- wrapcheck
- wsl
fast: false
linters-settings:
depguard:
rules:
main:
allow:
- $all
dupl:
threshold: 99
errcheck:
check-blank: false
check-type-assertions: false
goconst:
min-len: 3
min-occurrences: 2
gocyclo:
min-complexity: 18
gofmt:
simplify: true
goimports:
local-prefixes: go.opentelemetry.io
govet:
disable:
- shadow
misspell:
ignore-words:
- cancelled
locale: US
revive:
ignore-generated-header: true
severity: warning
output:
formats:
- format: colored-line-number
print-issued-lines: true
print-linter-name: true
run:
concurrency: 4
issues-exit-code: 1
tests: false
timeout: 1m
1 change: 1 addition & 0 deletions go.work.sum
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk=
github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc=
github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds=
Expand Down

0 comments on commit d82c33b

Please sign in to comment.