1
+ # This is the configuration for golangci-lint for the restic project.
2
+ #
3
+ # A sample config with all settings is here:
4
+ # https://github.com/golangci/golangci-lint/blob/master/.golangci.example.yml
5
+
6
+ linters :
7
+ # only enable the linters listed below
8
+ disable-all : true
9
+ enable :
10
+ # make sure all errors returned by functions are handled
11
+ - errcheck
12
+
13
+ # find unused code
14
+ - deadcode
15
+
16
+ # show how code can be simplified
17
+ - gosimple
18
+
19
+ # # make sure code is formatted
20
+ - gofmt
21
+
22
+ # examine code and report suspicious constructs, such as Printf calls whose
23
+ # arguments do not align with the format string
24
+ - govet
25
+
26
+ # make sure names and comments are used according to the conventions
27
+ - revive
28
+
29
+ # detect when assignments to existing variables are not used
30
+ - ineffassign
31
+
32
+ # run static analysis and find errors
33
+ - staticcheck
34
+
35
+ # find unused variables, functions, structs, types, etc.
36
+ - unused
37
+
38
+ # find unused struct fields
39
+ - structcheck
40
+
41
+ # find unused global variables
42
+ - varcheck
43
+
44
+ # parse and typecheck code
45
+ - typecheck
46
+
47
+ issues :
48
+ # don't use the default exclude rules, this hides (among others) ignored
49
+ # errors from Close() calls
50
+ exclude-use-default : false
51
+
52
+ # list of things to not warn about
53
+ exclude :
54
+ # revive: do not warn about missing comments for exported stuff
55
+ - exported (function|method|var|type|const) .* should have comment or be unexported
56
+ # revive: ignore constants in all caps
57
+ - don't use ALL_CAPS in Go names; use CamelCase
0 commit comments