109 lines
2.2 KiB
YAML
109 lines
2.2 KiB
YAML
# Copyright (c) 2024 Joshua Rich <joshua.rich@gmail.com>
|
|
#
|
|
# This software is released under the MIT License.
|
|
# https://opensource.org/licenses/MIT
|
|
|
|
linters-settings:
|
|
revive:
|
|
enable-all-rules: true
|
|
confidence: 0.8
|
|
ignore-generated-header: false
|
|
rules:
|
|
- name: line-length-limit
|
|
disabled: true
|
|
- name: add-constant
|
|
disabled: true
|
|
- name: unhandled-error
|
|
arguments:
|
|
- "fmt.Fprintf"
|
|
- ".*.WriteString"
|
|
- name: cognitive-complexity
|
|
disabled: true
|
|
- name: cyclomatic
|
|
disabled: true
|
|
gocyclo:
|
|
min-complexity: 15
|
|
goimports:
|
|
local-prefixes: github.com/joshuar/go-hass-agent
|
|
dupl:
|
|
threshold: 100
|
|
funlen:
|
|
lines: 100
|
|
statements: 50
|
|
goconst:
|
|
min-len: 2
|
|
min-occurrences: 3
|
|
gocritic:
|
|
enabled-tags:
|
|
- diagnostic
|
|
- experimental
|
|
- opinionated
|
|
- performance
|
|
- style
|
|
disabled-checks:
|
|
- dupImport # https://github.com/go-critic/go-critic/issues/845
|
|
- ifElseChain
|
|
- octalLiteral
|
|
- whyNoLint
|
|
- wrapperFunc
|
|
govet:
|
|
enable-all: true
|
|
check-shadowing: true
|
|
lll:
|
|
line-length: 140
|
|
misspell:
|
|
locale: UK
|
|
nolintlint:
|
|
allow-unused: false # report any unused nolint directives
|
|
require-explanation: false # don't require an explanation for nolint directives
|
|
require-specific: false # don't require nolint directives to be specific about which linter is being skipped
|
|
linters:
|
|
disable-all: true
|
|
enable:
|
|
- bodyclose
|
|
- decorder
|
|
- dogsled
|
|
- dupl
|
|
- errcheck
|
|
- errchkjson
|
|
- exportloopref
|
|
- forcetypeassert
|
|
- funlen
|
|
- goconst
|
|
- gocritic
|
|
- gocyclo
|
|
- godot
|
|
- gofumpt
|
|
- goimports
|
|
- goprintffuncname
|
|
- gosec
|
|
- gosimple
|
|
- govet
|
|
- inamedparam
|
|
- ineffassign
|
|
- lll
|
|
- mirror
|
|
- misspell
|
|
- nakedret
|
|
- nestif
|
|
- nilerr
|
|
- nilnil
|
|
- noctx
|
|
- nolintlint
|
|
- revive
|
|
- reassign
|
|
- staticcheck
|
|
- stylecheck
|
|
- typecheck
|
|
- unconvert
|
|
- unparam
|
|
- unused
|
|
- usestdlibvars
|
|
- wastedassign
|
|
- whitespace
|
|
- bodyclose
|
|
- zerologlint
|
|
|
|
run:
|
|
timeout: 5m
|
|
tests: false |