Skip to content

Commit

Permalink
Update golangci config to newer style (same as TF provider)
Browse files Browse the repository at this point in the history
  • Loading branch information
zliang-akamai committed Dec 9, 2023
1 parent 726d1fd commit ccd468b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 79 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
run: make lint

- name: Vet
run: make vet
run: go vet ./...

- name: Tidy
run: go mod tidy
Expand Down
88 changes: 10 additions & 78 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,91 +1,23 @@
run:
tests: false
timeout: 10m

linters-settings:
errcheck:
check-type-assertions: true
check-blank: true
revive:
rules:
- name: unused-parameter
severity: warning
disabled: true

govet:
check-shadowing: true
gomoddirectives:
replace-allow-list:
- github.com/linode/linodego

enable:
- atomicalign
enable-all: false
govet:
disable:
- shadow
disable-all: false
golint:
min-confidence: 0.8
gocyclo:
min-complexity: 30
gocognit:
min-complexity: 30
maligned:
suggest-new: true
dupl:
threshold: 100

linters:
enable-all: true
disable:
# deprecated linters
- deadcode
- ifshort
- varcheck
- nosnakecase
####################

# conflicted with go fmt
- nolintlint

# workaround to avoid linter failures of getting malformed json
- musttag

- bodyclose
- contextcheck
- nilerr
- noctx
- rowserrcheck
- sqlclosecheck
- structcheck
- tparallel
- vetshadow
- errname
- forcetypeassert
- gocyclo
- unparam
- nakedret
- lll
- golint
- maligned
- scopelint
- dupl
- gosec
- gochecknoinits
- gochecknoglobals
- exhaustruct
- nonamedreturns
- errcheck
- staticcheck
- stylecheck
- wsl
- interfacer
- varnamelen
- tagliatelle
- gomnd
- nlreturn
- wrapcheck
- wastedassign
- goerr113
- exhaustivestruct
- durationcheck
- errorlint
- cyclop
- godot
- exhaustive
- depguard
- tagalign
- inamedparam
- godox
fast: false

0 comments on commit ccd468b

Please sign in to comment.