refactored overcomplicated code; deleted some unused functions; added golangci-lint config

This commit is contained in:
kjubybot
2022-05-19 19:05:38 +03:00
parent 56e71c8981
commit 5aa436cfb8
31 changed files with 220 additions and 967 deletions

33
.golangci.yml Normal file
View File

@@ -0,0 +1,33 @@
linters:
enable:
- bodyclose
- decorder
- dogsled
- errorlint
- exportloopref
- gocognit
- goconst
- gocyclo
- gosec
- ifshort
- makezero
- nestif
- nilerr
- prealloc
- unconvert
- unparam
linters-settings:
errcheck:
exclude-functions:
- (*github.com/hashicorp/terraform-plugin-sdk/helper/schema.ResourceData).Set
staticcheck:
go: "1.18"
checks:
- all
- -SA1019
nestif:
min-complexity: 7
issues:
max-same-issues: 0