-
Notifications
You must be signed in to change notification settings - Fork 4
/
.golangci.yml
64 lines (62 loc) · 1.86 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
linters:
enable:
- containedctx
- gocritic
- godot
- nilerr
- revive
- thelper
- unconvert
issues:
include:
- EXC0012
- EXC0013
- EXC0014
- EXC0015
linters-settings:
revive:
# Maximum number of open files at the same time.
# See https://github.com/mgechev/revive#command-line-flags
# Defaults to unlimited.
max-open-files: 2048
# When set to false, ignores files with "GENERATED" header, similar to golint.
# See https://github.com/mgechev/revive#available-rules for details.
# Default: false
ignore-generated-header: true
# Sets the default severity.
# See https://github.com/mgechev/revive#configuration
# Default: warning
severity: error
# Default: false
# Sets the default failure confidence.
# This means that linting errors with less than 0.8 confidence will be ignored.
# Default: 0.8
confidence: 0.8
rules:
- name: blank-imports
- name: context-as-argument
arguments:
- allowTypesBefore: "*testing.T,*github.com/user/repo/testing.Harness"
- name: context-keys-type
- name: error-return
- name: error-strings
- name: error-naming
- name: exported
arguments:
- "checkPrivateReceivers"
- "sayRepetitiveInsteadOfStutters"
- name: if-return
- name: increment-decrement
- name: var-naming
- name: var-declaration
- name: package-comments
- name: range
- name: receiver-naming
- name: time-naming
- name: unexported-return
- name: indent-error-flow
- name: errorf
- name: early-return
- name: file-header
arguments:
- "Copyright 20[0-2][0-9](-20[1-2][0-9])? the u-root Authors. All rights reserved Use of this source code is governed by a BSD-style license that can be found in the LICENSE file."