-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golangci.yml
93 lines (83 loc) · 2.51 KB
/
.golangci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# Copyright 2020 Adam Chalkley
#
# https://github.com/atc0005/go-ci
#
# Licensed under the MIT License. See LICENSE file in the project root for
# full license information.
###############################################################################
# NOTE: This is the golangci-lint configuration file *specific* to the
# "unstable" variant of the container images provided by this project. This
# configuration (potentially) enables additional linters not used by the other
# container image variants.
###############################################################################
issues:
# equivalent CLI flag: --exclude-use-default
#
# see:
# atc0005/todo#22
# atc0005/todo#29
# golangci-lint/golangci-lint#1249
# golangci-lint/golangci-lint#413
exclude-use-default: false
# run:
# 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
# https://github.com/golangci/golangci-lint/blob/master/.golangci.reference.yml
# go: "1.19"
# Reminder: Sort this after every change
linters:
enable:
- depguard
- dogsled
- dupl
- exportloopref
- errcheck
- gochecknoglobals
- gocognit
- goconst
- gocritic
- gocyclo
- goerr113
- gofmt
- goimports
- gosec
- govet
# Deprecated linter, but still functional as of golangci-lint v1.39.0.
# See https://github.com/atc0005/go-ci/issues/302 for more information.
- maligned
- misspell
- nilnil
- prealloc
- predeclared
- revive
- staticcheck
- stylecheck
- unconvert
#
# Disable govet:fieldalignment, re-enable deprecated maligned linter until the
# Go team offers more control over the types of checks provided by the
# fieldalignment linter or golangci-lint does so.
#
# See https://github.com/atc0005/go-ci/issues/302 for more information.
#
# disable:
# - maligned
linters-settings:
gocognit:
# minimal code complexity to report, 30 by default (but we recommend 10-20)
min-complexity: 10
gocyclo:
# minimal code complexity to report, 30 by default (but we recommend 10-20)
min-complexity: 15
govet:
enable-all: true
disable:
#
# Disable fieldalignment settings until the Go team offers more control over
# the types of checks provided by the fieldalignment linter or golangci-lint
# does so.
#
# See https://github.com/atc0005/go-ci/issues/302 for more information.
#
- fieldalignment