Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
euskadi31 committed Mar 9, 2024
1 parent 48f46e1 commit 98ea05d
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 52 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,9 @@ jobs:
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v4.0.0
with:
version: v1.52.2
version: v1.55.2
skip-pkg-cache: true
skip-cache: true

- name: Coveralls
uses: shogo82148/actions-goveralls@v1
Expand Down
96 changes: 45 additions & 51 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,55 +1,6 @@
run:
concurrency: 4
deadline: 1m
issues-exit-code: 1
tests: false
skip-files:
- ".*_mock\\.go"
- "mock_.*\\.go"
- ".*/pkg/mod/.*$"

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

linters-settings:
errcheck:
check-type-assertions: false
check-blank: false
govet:
check-shadowing: false
revive:
ignore-generated-header: true
severity: warning
gofmt:
simplify: true
gocyclo:
min-complexity: 18
maligned:
suggest-new: true
dupl:
threshold: 80
goconst:
min-len: 4
min-occurrences: 3
depguard:
list-type: blacklist
include-go-root: false
packages:
- github.com/davecgh/go-spew/spew
misspell:
locale: US
ignore-words:
- cancelled
goimports:
local-prefixes: go.opentelemetry.io


linters:
disable-all: true
enable:
- depguard
- errcheck
- gas
- goconst
Expand All @@ -68,7 +19,6 @@ linters:
- asciicheck
- bodyclose
- dogsled
- dupl
- durationcheck
- errorlint
- exhaustive
Expand All @@ -85,7 +35,51 @@ linters:
- prealloc
- predeclared
- sqlclosecheck
- tagliatelle
- whitespace
- 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:
check-shadowing: false
maligned:
suggest-new: true
misspell:
ignore-words:
- cancelled
locale: US
revive:
ignore-generated-header: true
severity: warning
output:
format: colored-line-number
print-issued-lines: true
print-linter-name: true
run:
concurrency: 4
issues-exit-code: 1
skip-files:
- .*_mock\.go
- mock_.*\.go
- .*/pkg/mod/.*$
tests: false
timeout: 1m

0 comments on commit 98ea05d

Please sign in to comment.