mirror of
https://github.com/owncast/owncast.git
synced 2024-11-22 04:40:37 +03:00
88 lines
2.1 KiB
YAML
88 lines
2.1 KiB
YAML
run:
|
|
tests: false
|
|
modules-download-mode: readonly
|
|
|
|
# Define the Go version limit.
|
|
# Mainly related to generics support in go1.18.
|
|
# Default: use Go version from the go.mod file, fallback on the env var `GOVERSION`, fallback on 1.18
|
|
go: '1.22'
|
|
|
|
issues:
|
|
# The linter has a default list of ignorable errors. Turning this on will enable that list.
|
|
exclude-use-default: false
|
|
|
|
# Maximum issues count per one linter. Set to 0 to disable. Default is 50.
|
|
max-issues-per-linter: 0
|
|
|
|
# Maximum count of issues with the same text. Set to 0 to disable. Default is 3.
|
|
max-same-issues: 0
|
|
|
|
exclude:
|
|
- Subprocess launch(ed with variable|ing should be audited)
|
|
- Error return value of .((os\.)?std(out|err)\..*|.*Close|.*Flush|os\.Remove(All)?|.*print(f|ln)?|os\.(Un)?Setenv). is not checked
|
|
- G307 # Allow closing files as a defer without checking error.
|
|
- composite literal uses unkeyed fields
|
|
|
|
linters:
|
|
enable:
|
|
- bodyclose
|
|
- dupl
|
|
- errcheck
|
|
- goconst
|
|
- godot
|
|
- godox
|
|
- goimports
|
|
- goprintffuncname
|
|
- gosec
|
|
- govet
|
|
- misspell
|
|
- prealloc
|
|
- revive
|
|
- rowserrcheck
|
|
- sqlclosecheck
|
|
- staticcheck
|
|
- unconvert
|
|
- unparam
|
|
- whitespace
|
|
- nakedret
|
|
- cyclop
|
|
- gosimple
|
|
- unused
|
|
- copyloopvar
|
|
- gocritic
|
|
- forbidigo
|
|
- unparam
|
|
- wastedassign
|
|
linters-settings:
|
|
govet:
|
|
disable:
|
|
- composite
|
|
|
|
cyclop:
|
|
# the maximal code complexity to report. default is 10. eventually work our way to that.
|
|
max-complexity: 15
|
|
# the max average package complexity. If it's higher than 0.0 (float) the check is enabled (default 0.0)
|
|
package-average: 0.0
|
|
# should ignore tests
|
|
skip-tests: true
|
|
|
|
gocritic:
|
|
disabled-checks:
|
|
- ifElseChain
|
|
- exitAfterDefer
|
|
|
|
revive:
|
|
rules:
|
|
- name: package-comments
|
|
disabled: true
|
|
|
|
forbidigo:
|
|
# Forbid the following identifiers (identifiers are written using regexp):
|
|
forbid:
|
|
# Logging via Print bypasses our logging framework.
|
|
- ^(fmt\.Print(|f|ln)|print|println)
|
|
- ^panic.*$
|
|
|
|
dupl:
|
|
# tokens count to trigger issue, 150 by default
|
|
threshold: 200
|