opentofu/.golangci.yml
Christian Mesh 7cacb9f066
Fix function refs in variable validation (#2052)
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
2024-10-17 12:37:54 -04:00

113 lines
1.9 KiB
YAML

# Copyright (c) The OpenTofu Authors
# SPDX-License-Identifier: MPL-2.0
# Copyright (c) 2023 HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0
run:
timeout: 30m
linters-settings:
errcheck:
check-type-assertions: true
exhaustive:
check:
- switch
- map
funlen:
lines: 100
statements: 50
ignore-comments: true
govet:
enable-all: true
disable:
- fieldalignment # rule is too strict
nolintlint:
require-explanation: true
require-specific: true
cyclop:
max-complexity: 15
gocognit:
min-complexity: 50
issues:
exclude-rules:
- path: (.+)_test.go
linters:
- funlen
- dupl
- revive
- path: (.+)_test.go
text: "ST1003"
- path: (.+)_test.go
text: "var-naming: don't use underscores in Go names"
linters:
disable-all: true
enable:
- asasalint
- asciicheck
- bidichk
- bodyclose
- cyclop
- dupl
- durationcheck
- errcheck
- errname
- errorlint
- exhaustive
- exportloopref
- forbidigo
- funlen
- gocheckcompilerdirectives
- gochecknoglobals
- gochecknoinits
- gocognit
- goconst
- gocritic
- gocyclo
- goimports
#- gomoddirectives Disabled while we deal with the HCL fork
- gomodguard
- goprintffuncname
- gosec
- gosimple
- govet
- ineffassign
- loggercheck
- makezero
- mirror
- mnd
- musttag
- nakedret
- nestif
- nilerr
- nilnil
- noctx
- nolintlint
- nonamedreturns
- nosprintfhostport
- predeclared
- promlinter
- reassign
- revive
- rowserrcheck
- sqlclosecheck
- staticcheck
- stylecheck
- tenv
- testableexamples
- tparallel
- typecheck
- unconvert
- unparam
- unused
- usestdlibvars
- wastedassign
- whitespace