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 03934b7 commit 9ba799d
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 56 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ jobs:
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v4
with:
version: v1.52.2
version: v1.55.2
skip-pkg-cache: true

- name: Coveralls
Expand Down
100 changes: 45 additions & 55 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,56 +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:
- deadcode
- depguard
- errcheck
- gas
- goconst
Expand All @@ -61,17 +11,14 @@ linters:
- ineffassign
- megacheck
- misspell
- structcheck
- typecheck
- unconvert
- varcheck
- gosimple
- staticcheck
- unused
- asciicheck
- bodyclose
- dogsled
- dupl
- durationcheck
- errorlint
- exhaustive
Expand All @@ -81,15 +28,58 @@ linters:
- gocritic
- godot
- gosec
- ifshort
- nestif
- nilerr
- nlreturn
- noctx
- 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 9ba799d

Please sign in to comment.