# Copyright (c) HashiCorp, Inc. # SPDX-License-Identifier: BUSL-1.1 version: "2" run: timeout: 10m # Modules download mode (do not modify go.mod) modules-download-mode: readonly # Exclude test files tests: false output: formats: text: path: stdout print-linter-name: true print-issued-lines: true linters: default: none enable: - asasalint - asciicheck - bidichk - bodyclose - copyloopvar - dogsled - durationcheck - gocritic - govet - ineffassign - misspell - staticcheck - unconvert - usestdlibvars settings: errcheck: # report about not checking of errors in type assetions: `a := b.(MyStruct)`; # default is false: such cases aren't reported by default. check-type-assertions: false exclude-functions: - io.* - fmt.* gocritic: disabled-checks: - commentFormatting - deprecatedComment govet: disable: - shadow staticcheck: checks: - SA4029 - SA5008 - SA9004 - ST1016 - ST1020 exclusions: rules: - path: (.+)\.go$ text: ifElseChain - path: (.+)\.go$ text: singleCaseSwitch - path: (.+)\.go$ text: assignOp - path: (.+)\.go$ text: unlambda paths: - ".*\\.generated\\.go$" - ".*bindata_assetfs\\.go$" formatters: enable: - gofmt - goimports settings: gofmt: simplify: true exclusions: paths: - ".*\\.generated\\.go$" - ".*bindata_assetfs\\.go$"