-
Notifications
You must be signed in to change notification settings - Fork 2
/
revive.toml
94 lines (70 loc) · 2.43 KB
/
revive.toml
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
# 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
# No need to enforce a file header.
[rule.file-header]
disabled = true
# Reports on each file in a package.
[rule.package-comments]
disabled = true
# Reports on comments mismatching comments.
[rule.exported]
disabled = true
# No need to exclude import shadowing.
[rule.import-shadowing]
disabled = true
# Exluding '.'-import makes test package separation unnecessary difficult.
[rule.dot-imports]
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
# 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.
[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 = ["Ω", "Σ", "σ"]