2021-11-12 18:35:36 -08:00
|
|
|
run:
|
|
|
|
|
timeout: 5m
|
2018-12-05 00:49:12 -08:00
|
|
|
linters:
|
2019-01-09 22:31:14 -08:00
|
|
|
enable-all: true
|
|
|
|
|
disable:
|
2022-03-27 15:31:26 -07:00
|
|
|
- cyclop
|
2023-03-05 14:22:23 -08:00
|
|
|
- dupword
|
2024-12-22 19:01:48 -05:00
|
|
|
- err113
|
2022-03-27 15:31:26 -07:00
|
|
|
- errname
|
2022-09-05 17:25:03 -07:00
|
|
|
- exhaustruct
|
2022-03-27 15:31:26 -07:00
|
|
|
- forbidigo
|
|
|
|
|
- forcetypeassert
|
|
|
|
|
- funlen
|
|
|
|
|
- gochecknoglobals
|
|
|
|
|
- gochecknoinits
|
2024-01-07 12:56:20 -08:00
|
|
|
- goconst
|
2022-03-27 15:31:26 -07:00
|
|
|
- godox
|
|
|
|
|
- gosec
|
2024-12-22 19:01:48 -05:00
|
|
|
- iface
|
2024-01-07 12:56:20 -08:00
|
|
|
- inamedparam
|
2022-03-27 15:31:26 -07:00
|
|
|
- ireturn
|
|
|
|
|
- lll
|
2024-12-22 19:01:48 -05:00
|
|
|
- mnd
|
2022-03-27 15:31:26 -07:00
|
|
|
- nlreturn
|
2022-09-05 17:25:03 -07:00
|
|
|
- nonamedreturns
|
2022-03-27 15:31:26 -07:00
|
|
|
- paralleltest
|
2024-01-07 12:56:20 -08:00
|
|
|
- perfsprint
|
2024-12-22 19:01:48 -05:00
|
|
|
- prealloc
|
|
|
|
|
- recvcheck
|
2023-03-05 20:04:45 -08:00
|
|
|
- rowserrcheck
|
2022-03-27 15:31:26 -07:00
|
|
|
- tagliatelle
|
|
|
|
|
- testpackage
|
|
|
|
|
- unparam
|
|
|
|
|
- varnamelen
|
2023-03-05 20:04:45 -08:00
|
|
|
- wastedassign
|
2022-03-27 15:31:26 -07:00
|
|
|
- wrapcheck
|
|
|
|
|
- wsl
|
2018-12-05 00:49:12 -08:00
|
|
|
linters-settings:
|
|
|
|
|
depguard:
|
2024-01-07 12:56:20 -08:00
|
|
|
rules:
|
|
|
|
|
main:
|
|
|
|
|
allow:
|
2026-03-06 20:14:02 +00:00
|
|
|
- sources.truenas.cloud/code/avo
|
2024-01-07 12:56:20 -08:00
|
|
|
- golang.org/x/
|
|
|
|
|
- $gostd
|
2022-03-27 15:31:26 -07:00
|
|
|
gci:
|
|
|
|
|
sections:
|
|
|
|
|
- standard
|
|
|
|
|
- default
|
2026-03-06 20:14:02 +00:00
|
|
|
- prefix(sources.truenas.cloud/code/avo)
|
2024-01-07 12:56:20 -08:00
|
|
|
revive:
|
|
|
|
|
enable-all-rules: true
|
|
|
|
|
rules:
|
|
|
|
|
- name: add-constant
|
|
|
|
|
disabled: true
|
|
|
|
|
- name: confusing-results
|
|
|
|
|
disabled: true
|
|
|
|
|
- name: cognitive-complexity
|
|
|
|
|
disabled: true
|
|
|
|
|
- name: cyclomatic
|
|
|
|
|
disabled: true
|
|
|
|
|
- name: deep-exit
|
|
|
|
|
disabled: true
|
|
|
|
|
- name: empty-block
|
|
|
|
|
disabled: true
|
|
|
|
|
- name: flag-parameter
|
|
|
|
|
disabled: true
|
|
|
|
|
- name: function-length
|
|
|
|
|
disabled: true
|
|
|
|
|
- name: if-return
|
|
|
|
|
disabled: true
|
|
|
|
|
- name: line-length-limit
|
|
|
|
|
disabled: true
|
|
|
|
|
- name: max-public-structs
|
|
|
|
|
disabled: true
|
|
|
|
|
- name: modifies-value-receiver
|
|
|
|
|
disabled: true
|
|
|
|
|
- name: unexported-naming
|
|
|
|
|
disabled: true
|
|
|
|
|
- name: unhandled-error
|
|
|
|
|
arguments:
|
|
|
|
|
- 'fmt\.(P|Fp)rint(ln|f)?'
|
|
|
|
|
- 'text/tabwriter\.Writer\.Flush'
|
|
|
|
|
- name: unused-parameter
|
|
|
|
|
disabled: true
|
|
|
|
|
- name: unused-receiver
|
|
|
|
|
disabled: true
|
2019-01-04 18:38:23 -08:00
|
|
|
issues:
|
|
|
|
|
exclude-use-default: false
|
|
|
|
|
exclude:
|
|
|
|
|
# errcheck: Almost all programs ignore errors on these functions and in most cases it's ok
|
|
|
|
|
- Error return value of .((os\.)?std(out|err)\..*|.*Close|.*Flush|os\.Remove(All)?|.*printf?|os\.(Un)?Setenv). is not checked
|
2019-01-13 11:09:37 -08:00
|
|
|
# gocritic: https://github.com/go-critic/go-critic/issues/762
|
2022-03-27 15:31:26 -07:00
|
|
|
- " with `(len|cap|real|imag)`"
|
2021-11-12 18:35:36 -08:00
|
|
|
# We want to allow all caps in certain cases.
|
|
|
|
|
- "ALL_CAPS in Go names"
|