-
Notifications
You must be signed in to change notification settings - Fork 12
/
.rubocop.yml
137 lines (110 loc) · 3.33 KB
/
.rubocop.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
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
132
133
134
135
136
137
# use the shared Yast defaults
inherit_from:
/usr/share/YaST2/data/devtools/data/rubocop-1.24.1_yast_style.yml
Style/FrozenStringLiteralComment:
Enabled: false
Metrics/AbcSize:
Max: 129
Exclude:
- 'src/lib/**/*.rb' # be more strict for new code in lib
Metrics/AbcSize:
Max: 30
Include:
- 'src/lib/**/*.rb' # be more strict for new code in lib
Metrics/BlockNesting:
Max: 5
Exclude:
- 'src/lib/**/*.rb' # be more strict for new code in lib
Metrics/BlockNesting:
Max: 2
Include:
- 'src/lib/**/*.rb' # be more strict for new code in lib
# Configuration parameters: CountComments.
Metrics/ClassLength:
Max: 385
Exclude:
- 'src/lib/**/*.rb' # be more strict for new code in lib
# Configuration parameters: CountComments.
Metrics/ClassLength:
Max: 200
Include:
- 'src/lib/**/*.rb' # be more strict for new code in lib
Metrics/ModuleLength:
Max: 385
Exclude:
- 'src/lib/**/*.rb' # be more strict for new code in lib
Metrics/ModuleLength:
Max: 100
Include:
- 'src/lib/**/*.rb' # be more strict for new code in lib
Metrics/CyclomaticComplexity:
Max: 29
Exclude:
- 'src/lib/**/*.rb' # be more strict for new code in lib
Metrics/CyclomaticComplexity:
Max: 10
Include:
- 'src/lib/**/*.rb' # be more strict for new code in lib
# Configuration parameters: AllowURI, URISchemes.
Metrics/LineLength:
Max: 299
Exclude:
- 'src/lib/**/*.rb' # be more strict for new code in lib
# Configuration parameters: AllowURI, URISchemes.
Metrics/LineLength:
Max: 100 # TODO this should be lower for new code
Include:
- 'src/lib/**/*.rb' # be more strict for new code in lib
# Configuration parameters: CountComments.
Metrics/MethodLength:
Max: 160
Exclude:
- 'src/lib/**/*.rb' # be more strict for new code in lib
# Configuration parameters: CountComments.
Metrics/MethodLength:
Max: 30 # TODO this should be lower for new code
Include:
- 'src/lib/**/*.rb' # be more strict for new code in lib
Metrics/PerceivedComplexity:
Max: 34
Exclude:
- 'src/lib/**/*.rb' # be more strict for new code in lib
Metrics/PerceivedComplexity:
Max: 10
Include:
- 'src/lib/**/*.rb' # be more strict for new code in lib
# be more strict then rubocop, 5 is too much
Metrics/ParameterLists:
Max: 4
# Configuration parameters: EnforcedStyle, SupportedStyles.
Style/AndOr:
EnforcedStyle: conditionals
Style/Documentation:
Include:
- 'src/lib/**/*.rb' # force well documented code only for new code
Style/FileName:
Include:
- 'src/lib/**/*.rb' # force correct names on new code
Style/HashSyntax:
Include:
- 'src/lib/**/*.rb' # force new hash style only for new code
# JR: I found lambda easier to read and understand then ->()
Style/Lambda:
Enabled: false
Style/MethodName:
Include:
- 'src/lib/**/*.rb' # force correct names on new code
Style/VariableName:
Include:
- 'src/lib/**/*.rb' # force known variables only for new code
# alias method is more convenient method for method aliasing
Style/Alias:
EnforcedStyle: prefer_alias_method
# This two are not equivalent if using refinements (and we use them to add
# functionality to the classes coming from libstorage)
# using RefinementAddingFooToThing
# things.map { |s| s.foo } # it works
# things.map(&:foo) # it does not work
# See https://github.com/bbatsov/rubocop/issues/2720
Style/SymbolProc:
Enabled: false