-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathrevive.toml
More file actions
131 lines (98 loc) · 3.63 KB
/
revive.toml
File metadata and controls
131 lines (98 loc) · 3.63 KB
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
## Maintained by: github.com/tkrop/go-make
# Translates the 'golangci-lint' settings into an Codacy understandable format.
# When set to false, ignores files with "GENERATED" header.
ignoreGeneratedHeader = true
# Sets the default severity to "warning"
severity = "error"
# Sets the default failure confidence. This means that linting errors
# with less than 0.8 confidence will be ignored.
confidence = 0.8
# Sets the error code for failures with severity "error"
errorCode = 1
# Sets the error code for failures with severity "warning"
warningCode = 0
# Enables all available rules
enableAllRules = true
# Reports on missing or wrong file headers.
# No need to enforce a file header.
[rule.file-header]
disabled = true
# Reports on each file in a package having no package comments.
# Rule prevents from having a central package documentation in `doc.go`.
[rule.package-comments]
disabled = true
# Reports on package names that use core library names.
# Rule prevents users from intentional creating drop in replacements.
[rule.package-naming]
disabled = true
# Reports on mismatches between directory names and package names.
# Rule prevents having a clearer hyphen readable directory name.
[rule.package-directory-mismatch]
disabled = true
# Reports on exported comments not matching the name as first word.
# Rule prevents being more relaxed in comment writing.
[rule.exported]
disabled = true
# No need to exclude import shadowing.
[rule.import-shadowing]
disabled = true
# Excluding '.'-import makes test package separation unnecessary difficult.
[rule.dot-imports]
disabled = true
# Excluding unchecked type assertion since ending in panic is usually okay.
[rule.unchecked-type-assertion]
disabled = true
# Fails to disable writers that actually cannot return errors.
[rule.unhandled-error]
disabled = true
# Conflicts with strategy to embed assignments in if statements.
[rule.indent-error-flow]
disabled = true
# Fails to restrict sufficiently in switches with numeric values.
[rule.add-constant]
disabled = true
# Rule prevents intentional usage of similar variable names.
[rule.flag-parameter]
disabled = true
# Rule prevents intentional usage of similar private method names.
[rule.confusing-naming]
disabled = true
# Rule prevents intentional usage of explicit exhaustive switches.
[rule.useless-fallthrough]
disabled = true
# Rule prevents intentional usage of explicit exhaustive switches.
[rule.enforce-switch-style]
disabled = true
# Rule prevents intentional usage of explicit branches.
[rule.identical-switch-branches]
disabled = true
# Rule prevents intentional usage of explicit branches.
[rule.identical-ifelseif-branches]
disabled = true
# Enables a more experienced cyclomatic complexity (we enabled a log of rules
# to counter-act the complexity trap).
[rule.cyclomatic]
arguments = [20]
# Enables a more experienced cognitive complexity (we enabled a lot of rules
# to counter-act the complexity trap).
[rule.cognitive-complexity]
arguments = [20]
# Limit line-length to increase readability (compromise between 80 and 120 is
# at 100).
[rule.line-length-limit]
arguments = [100]
# We are a bit more relaxed with function length consistent with funlen.
[rule.function-length]
arguments = [40,60]
# Limit arguments of functions to the maximum understandable value.
[rule.argument-limit]
arguments = [6]
# Limit results of functions to the maximum understandable value.
[rule.function-result-limit]
arguments = [4]
# Raise the limit a bit to allow more complex package models.
[rule.max-public-structs]
arguments = [8]
# I do not know what I'm doing here...
[rule.banned-characters]
arguments = ["Ω", "Σ", "σ"]