kpn-style 0.1.7 → 0.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/ruby-2.5.yml CHANGED
@@ -1,268 +1,268 @@
1
- ---
2
- require: rubocop-rspec
3
- AllCops:
4
- DisplayCopNames: true
5
- TargetRubyVersion: '2.5'
6
- Include:
7
- - "**/*.rb"
8
- Exclude:
9
- - bin/*
10
- - ".vendor/**/*"
11
- - Gemfile
12
- - Rakefile
13
- - pkg/**/*
14
- - spec/fixtures/**/*
15
- - vendor/**/*
16
- Layout/LineLength:
17
- Description: People have wide screens, use them.
18
- Max: 240
19
- RSpec/BeforeAfterAll:
20
- Description: Beware of using after(:all) as it may cause state to leak between tests.
21
- A necessary evil in acceptance testing.
22
- Exclude:
23
- - spec/acceptance/**/*.rb
24
- RSpec/EmptyExampleGroup:
25
- Description: Checks if an example group does not include any tests.
26
- Enabled: false
27
- RSpec/HookArgument:
28
- Description: Prefer explicit :each argument, matching existing module's style
29
- EnforcedStyle: each
30
- RSpec/RepeatedDescription:
31
- Description: Check for repeated description strings in example groups.
32
- Enabled: false
33
- Style/BlockDelimiters:
34
- Description: Prefer braces for chaining. Mostly an aesthetical choice. Better to
35
- be consistent then.
36
- EnforcedStyle: braces_for_chaining
37
- Style/ClassAndModuleChildren:
38
- Description: Compact style reduces the required amount of indentation.
39
- EnforcedStyle: compact
40
- Style/EmptyElse:
41
- Description: Enforce against empty else clauses, but allow `nil` for clarity.
42
- EnforcedStyle: empty
43
- Style/FormatString:
44
- Description: Following the main puppet project's style, prefer the % format format.
45
- EnforcedStyle: percent
46
- Style/FormatStringToken:
47
- Description: Following the main puppet project's style, prefer the simpler template
48
- tokens over annotated ones.
49
- EnforcedStyle: template
50
- Style/Lambda:
51
- Description: Prefer the keyword for easier discoverability.
52
- EnforcedStyle: literal
53
- Style/RegexpLiteral:
54
- Description: Community preference. See https://github.com/voxpupuli/modulesync_config/issues/168
55
- EnforcedStyle: percent_r
56
- Style/TernaryParentheses:
57
- Description: Checks for use of parentheses around ternary conditions. Enforce parentheses
58
- on complex expressions for better readability, but seriously consider breaking
59
- it up.
60
- EnforcedStyle: require_parentheses_when_complex
61
- Style/TrailingCommaInArguments:
62
- Description: Prefer always trailing comma on multiline argument lists. This makes
63
- diffs, and re-ordering nicer.
64
- EnforcedStyleForMultiline: comma
65
- Style/TrailingCommaInArrayLiteral:
66
- EnforcedStyleForMultiline: comma
67
- Style/TrailingCommaInHashLiteral:
68
- EnforcedStyleForMultiline: comma
69
- Style/SymbolArray:
70
- Description: Using percent style obscures symbolic intent of array's contents.
71
- EnforcedStyle: brackets
72
- RSpec/MessageSpies:
73
- Description: Checks that message expectations are set using spies.
74
- EnforcedStyle: receive
75
- Style/CollectionMethods:
76
- Description: Preferred collection methods.
77
- Enabled: true
78
- Style/MethodCalledOnDoEndBlock:
79
- Description: Avoid chaining a method call on a do...end block.
80
- Enabled: true
81
- Style/StringMethods:
82
- Description: Checks if configured preferred methods are used over non-preferred.
83
- Enabled: true
84
- Layout/EndOfLine:
85
- Description: Use Unix-style line endings.
86
- EnforcedStyle: lf
87
- Metrics/AbcSize:
88
- Description: >-
89
- A calculated magnitude based on number of assignments,
90
- branches, and conditions.
91
- Enabled: false
92
- Metrics/BlockLength:
93
- Description: Avoid long blocks with many lines.
94
- Enabled: false
95
- Metrics/ClassLength:
96
- Description: Avoid classes longer than 100 lines of code.
97
- Enabled: false
98
- Metrics/CyclomaticComplexity:
99
- Description: >-
100
- A complexity metric that is strongly correlated to the number
101
- of test cases needed to validate a method.
102
- Enabled: false
103
- Metrics/MethodLength:
104
- Description: Avoid methods longer than 10 lines of code.
105
- Enabled: false
106
- Metrics/ModuleLength:
107
- Description: Avoid modules longer than 100 lines of code.
108
- Enabled: false
109
- Metrics/ParameterLists:
110
- Description: Avoid parameter lists longer than three or four parameters.
111
- Enabled: false
112
- Metrics/PerceivedComplexity:
113
- Description: >-
114
- A complexity metric geared towards measuring complexity for a
115
- human reader.
116
- Enabled: false
117
- RSpec/DescribeClass:
118
- Description: Check that the first argument to the top-level describe is a constant.
119
- Enabled: false
120
- RSpec/ExampleLength:
121
- Description: Checks for long examples.
122
- Enabled: false
123
- RSpec/MessageExpectation:
124
- Description: Checks for consistent message expectation style.
125
- Enabled: false
126
- RSpec/MultipleExpectations:
127
- Description: Checks if examples contain too many `expect` calls.
128
- Enabled: false
129
- RSpec/NestedGroups:
130
- Description: Checks for nested example groups.
131
- Enabled: false
132
- Style/AsciiComments:
133
- Description: Use only ascii symbols in comments.
134
- Enabled: false
135
- Style/IfUnlessModifier:
136
- Description: Don't force trailing if/unless for single-line conditionals
137
- Enabled: false
138
- Style/SymbolProc:
139
- Description: Use symbols as procs instead of blocks when possible.
140
- Enabled: false
141
- Layout/EmptyLinesAroundAttributeAccessor:
142
- Description: Keep blank lines around attribute accessors.
143
- Enabled: true
144
- Layout/SpaceAroundMethodCallOperator:
145
- Description: Checks method call operators to not have spaces around them.
146
- Enabled: true
147
- Lint/BinaryOperatorWithIdenticalOperands:
148
- Description: This cop checks for places where binary operator has identical operands.
149
- Enabled: true
150
- Lint/DeprecatedOpenSSLConstant:
151
- Description: Don't use algorithm constants for `OpenSSL::Cipher` and `OpenSSL::Digest`.
152
- Enabled: true
153
- Lint/DuplicateElsifCondition:
154
- Description: Do not repeat conditions used in if `elsif`.
155
- Enabled: true
156
- Lint/DuplicateRescueException:
157
- Description: Checks that there are no repeated exceptions used in `rescue` expressions.
158
- Enabled: true
159
- Lint/EmptyConditionalBody:
160
- Description: This cop checks for the presence of `if`, `elsif` and `unless` branches without a body.
161
- Enabled: true
162
- Lint/FloatComparison:
163
- Description: Checks for the presence of precise comparison of floating point numbers.
164
- Enabled: true
165
- Lint/MissingSuper:
166
- Description: >-
167
- This cop checks for the presence of constructors and lifecycle callbacks
168
- without calls to `super`'.
169
- Enabled: true
170
- Lint/MixedRegexpCaptureTypes:
171
- Description: Do not mix named captures and numbered captures in a Regexp literal.
172
- Enabled: true
173
- Lint/OutOfRangeRegexpRef:
174
- Description: Checks for out of range reference for Regexp because it always returns nil.
175
- Enabled: true
176
- Lint/RaiseException:
177
- Description: Checks for `raise` or `fail` statements which are raising `Exception` class.
178
- Enabled: true
179
- Lint/SelfAssignment:
180
- Description: Checks for self-assignments.
181
- Enabled: true
182
- Lint/StructNewOverride:
183
- Description: Disallow overriding the `Struct` built-in methods via `Struct.new`.
184
- Enabled: true
185
- Lint/TopLevelReturnWithArgument:
186
- Description: This cop detects top level return statements with argument.
187
- Enabled: true
188
- Lint/UnreachableLoop:
189
- Description: This cop checks for loops that will have at most one iteration.
190
- Enabled: true
191
- Style/AccessorGrouping:
192
- Description: Checks for grouping of accessors in `class` and `module` bodies.
193
- Enabled: true
194
- Style/ArrayCoercion:
195
- Description: >-
196
- Use Array() instead of explicit Array check or [*var], when dealing
197
- with a variable you want to treat as an Array, but you're not certain it's an array.
198
- Enabled: true
199
- Style/BisectedAttrAccessor:
200
- Description: >-
201
- Checks for places where `attr_reader` and `attr_writer`
202
- for the same method can be combined into single `attr_accessor`.
203
- Enabled: true
204
- Style/CaseLikeIf:
205
- Description: This cop identifies places where `if-elsif` constructions can be replaced with `case-when`.
206
- Enabled: true
207
- Style/ExplicitBlockArgument:
208
- Description: >-
209
- Consider using explicit block argument to avoid writing block literal
210
- that just passes its arguments to another block.
211
- Enabled: true
212
- Style/ExponentialNotation:
213
- Description: When using exponential notation, favor a mantissa between 1 (inclusive) and 10 (exclusive).
214
- Enabled: true
215
- Style/GlobalStdStream:
216
- Description: Enforces the use of `$stdout/$stderr/$stdin` instead of `STDOUT/STDERR/STDIN`.
217
- Enabled: true
218
- Style/HashAsLastArrayItem:
219
- Description: >-
220
- Checks for presence or absence of braces around hash literal as a last
221
- array item depending on configuration.
222
- Enabled: true
223
- Style/HashEachMethods:
224
- Description: Use Hash#each_key and Hash#each_value.
225
- Enabled: true
226
- Style/HashLikeCase:
227
- Description: >-
228
- Checks for places where `case-when` represents a simple 1:1
229
- mapping and can be replaced with a hash lookup.
230
- Enabled: true
231
- Style/HashTransformKeys:
232
- Description: Prefer `transform_keys` over `each_with_object`, `map`, or `to_h`.
233
- Enabled: true
234
- Style/HashTransformValues:
235
- Description: Prefer `transform_values` over `each_with_object`, `map`, or `to_h`.
236
- Enabled: true
237
- Style/OptionalBooleanParameter:
238
- Description: Use keyword arguments when defining method with boolean argument.
239
- Enabled: true
240
- Style/RedundantAssignment:
241
- Description: Checks for redundant assignment before returning.
242
- Enabled: true
243
- Style/RedundantFetchBlock:
244
- Description: >-
245
- Use `fetch(key, value)` instead of `fetch(key) { value }`
246
- when value has Numeric, Rational, Complex, Symbol or String type, `false`, `true`, `nil` or is a constant.
247
- Enabled: true
248
- Style/RedundantFileExtensionInRequire:
249
- Description: >-
250
- Checks for the presence of superfluous `.rb` extension in
251
- the filename provided to `require` and `require_relative`.
252
- Enabled: true
253
- Style/RedundantRegexpCharacterClass:
254
- Description: Checks for unnecessary single-element Regexp character classes.
255
- Enabled: true
256
- Style/RedundantRegexpEscape:
257
- Description: Checks for redundant escapes in Regexps.
258
- Enabled: false
259
- Style/SingleArgumentDig:
260
- Description: Avoid using single argument dig method.
261
- Enabled: true
262
- Style/SlicingWithRange:
263
- Description: Checks array slicing is done with endless ranges when suitable.
264
- Enabled: true
265
- Style/StringConcatenation:
266
- Description: Checks for places where string concatenation can be replaced with string interpolation.
267
- Enabled: true
268
-
1
+ ---
2
+ require: rubocop-rspec
3
+ AllCops:
4
+ DisplayCopNames: true
5
+ TargetRubyVersion: '2.5'
6
+ Include:
7
+ - "**/*.rb"
8
+ Exclude:
9
+ - bin/*
10
+ - ".vendor/**/*"
11
+ - Gemfile
12
+ - Rakefile
13
+ - pkg/**/*
14
+ - spec/fixtures/**/*
15
+ - vendor/**/*
16
+ Layout/LineLength:
17
+ Description: People have wide screens, use them.
18
+ Max: 240
19
+ RSpec/BeforeAfterAll:
20
+ Description: Beware of using after(:all) as it may cause state to leak between tests.
21
+ A necessary evil in acceptance testing.
22
+ Exclude:
23
+ - spec/acceptance/**/*.rb
24
+ RSpec/EmptyExampleGroup:
25
+ Description: Checks if an example group does not include any tests.
26
+ Enabled: false
27
+ RSpec/HookArgument:
28
+ Description: Prefer explicit :each argument, matching existing module's style
29
+ EnforcedStyle: each
30
+ RSpec/RepeatedDescription:
31
+ Description: Check for repeated description strings in example groups.
32
+ Enabled: false
33
+ Style/BlockDelimiters:
34
+ Description: Prefer braces for chaining. Mostly an aesthetical choice. Better to
35
+ be consistent then.
36
+ EnforcedStyle: braces_for_chaining
37
+ Style/ClassAndModuleChildren:
38
+ Description: Compact style reduces the required amount of indentation.
39
+ EnforcedStyle: compact
40
+ Style/EmptyElse:
41
+ Description: Enforce against empty else clauses, but allow `nil` for clarity.
42
+ EnforcedStyle: empty
43
+ Style/FormatString:
44
+ Description: Following the main puppet project's style, prefer the % format format.
45
+ EnforcedStyle: percent
46
+ Style/FormatStringToken:
47
+ Description: Following the main puppet project's style, prefer the simpler template
48
+ tokens over annotated ones.
49
+ EnforcedStyle: template
50
+ Style/Lambda:
51
+ Description: Prefer the keyword for easier discoverability.
52
+ EnforcedStyle: literal
53
+ Style/RegexpLiteral:
54
+ Description: Community preference. See https://github.com/voxpupuli/modulesync_config/issues/168
55
+ EnforcedStyle: percent_r
56
+ Style/TernaryParentheses:
57
+ Description: Checks for use of parentheses around ternary conditions. Enforce parentheses
58
+ on complex expressions for better readability, but seriously consider breaking
59
+ it up.
60
+ EnforcedStyle: require_parentheses_when_complex
61
+ Style/TrailingCommaInArguments:
62
+ Description: Prefer always trailing comma on multiline argument lists. This makes
63
+ diffs, and re-ordering nicer.
64
+ EnforcedStyleForMultiline: comma
65
+ Style/TrailingCommaInArrayLiteral:
66
+ EnforcedStyleForMultiline: comma
67
+ Style/TrailingCommaInHashLiteral:
68
+ EnforcedStyleForMultiline: comma
69
+ Style/SymbolArray:
70
+ Description: Using percent style obscures symbolic intent of array's contents.
71
+ EnforcedStyle: brackets
72
+ RSpec/MessageSpies:
73
+ Description: Checks that message expectations are set using spies.
74
+ EnforcedStyle: receive
75
+ Style/CollectionMethods:
76
+ Description: Preferred collection methods.
77
+ Enabled: true
78
+ Style/MethodCalledOnDoEndBlock:
79
+ Description: Avoid chaining a method call on a do...end block.
80
+ Enabled: true
81
+ Style/StringMethods:
82
+ Description: Checks if configured preferred methods are used over non-preferred.
83
+ Enabled: true
84
+ Layout/EndOfLine:
85
+ Description: Use Unix-style line endings.
86
+ EnforcedStyle: lf
87
+ Metrics/AbcSize:
88
+ Description: >-
89
+ A calculated magnitude based on number of assignments,
90
+ branches, and conditions.
91
+ Enabled: false
92
+ Metrics/BlockLength:
93
+ Description: Avoid long blocks with many lines.
94
+ Enabled: false
95
+ Metrics/ClassLength:
96
+ Description: Avoid classes longer than 100 lines of code.
97
+ Enabled: false
98
+ Metrics/CyclomaticComplexity:
99
+ Description: >-
100
+ A complexity metric that is strongly correlated to the number
101
+ of test cases needed to validate a method.
102
+ Enabled: false
103
+ Metrics/MethodLength:
104
+ Description: Avoid methods longer than 10 lines of code.
105
+ Enabled: false
106
+ Metrics/ModuleLength:
107
+ Description: Avoid modules longer than 100 lines of code.
108
+ Enabled: false
109
+ Metrics/ParameterLists:
110
+ Description: Avoid parameter lists longer than three or four parameters.
111
+ Enabled: false
112
+ Metrics/PerceivedComplexity:
113
+ Description: >-
114
+ A complexity metric geared towards measuring complexity for a
115
+ human reader.
116
+ Enabled: false
117
+ RSpec/DescribeClass:
118
+ Description: Check that the first argument to the top-level describe is a constant.
119
+ Enabled: false
120
+ RSpec/ExampleLength:
121
+ Description: Checks for long examples.
122
+ Enabled: false
123
+ RSpec/MessageExpectation:
124
+ Description: Checks for consistent message expectation style.
125
+ Enabled: false
126
+ RSpec/MultipleExpectations:
127
+ Description: Checks if examples contain too many `expect` calls.
128
+ Enabled: false
129
+ RSpec/NestedGroups:
130
+ Description: Checks for nested example groups.
131
+ Enabled: false
132
+ Style/AsciiComments:
133
+ Description: Use only ascii symbols in comments.
134
+ Enabled: false
135
+ Style/IfUnlessModifier:
136
+ Description: Don't force trailing if/unless for single-line conditionals
137
+ Enabled: false
138
+ Style/SymbolProc:
139
+ Description: Use symbols as procs instead of blocks when possible.
140
+ Enabled: false
141
+ Layout/EmptyLinesAroundAttributeAccessor:
142
+ Description: Keep blank lines around attribute accessors.
143
+ Enabled: true
144
+ Layout/SpaceAroundMethodCallOperator:
145
+ Description: Checks method call operators to not have spaces around them.
146
+ Enabled: true
147
+ Lint/BinaryOperatorWithIdenticalOperands:
148
+ Description: This cop checks for places where binary operator has identical operands.
149
+ Enabled: true
150
+ Lint/DeprecatedOpenSSLConstant:
151
+ Description: Don't use algorithm constants for `OpenSSL::Cipher` and `OpenSSL::Digest`.
152
+ Enabled: true
153
+ Lint/DuplicateElsifCondition:
154
+ Description: Do not repeat conditions used in if `elsif`.
155
+ Enabled: true
156
+ Lint/DuplicateRescueException:
157
+ Description: Checks that there are no repeated exceptions used in `rescue` expressions.
158
+ Enabled: true
159
+ Lint/EmptyConditionalBody:
160
+ Description: This cop checks for the presence of `if`, `elsif` and `unless` branches without a body.
161
+ Enabled: true
162
+ Lint/FloatComparison:
163
+ Description: Checks for the presence of precise comparison of floating point numbers.
164
+ Enabled: true
165
+ Lint/MissingSuper:
166
+ Description: >-
167
+ This cop checks for the presence of constructors and lifecycle callbacks
168
+ without calls to `super`'.
169
+ Enabled: true
170
+ Lint/MixedRegexpCaptureTypes:
171
+ Description: Do not mix named captures and numbered captures in a Regexp literal.
172
+ Enabled: true
173
+ Lint/OutOfRangeRegexpRef:
174
+ Description: Checks for out of range reference for Regexp because it always returns nil.
175
+ Enabled: true
176
+ Lint/RaiseException:
177
+ Description: Checks for `raise` or `fail` statements which are raising `Exception` class.
178
+ Enabled: true
179
+ Lint/SelfAssignment:
180
+ Description: Checks for self-assignments.
181
+ Enabled: true
182
+ Lint/StructNewOverride:
183
+ Description: Disallow overriding the `Struct` built-in methods via `Struct.new`.
184
+ Enabled: true
185
+ Lint/TopLevelReturnWithArgument:
186
+ Description: This cop detects top level return statements with argument.
187
+ Enabled: true
188
+ Lint/UnreachableLoop:
189
+ Description: This cop checks for loops that will have at most one iteration.
190
+ Enabled: true
191
+ Style/AccessorGrouping:
192
+ Description: Checks for grouping of accessors in `class` and `module` bodies.
193
+ Enabled: true
194
+ Style/ArrayCoercion:
195
+ Description: >-
196
+ Use Array() instead of explicit Array check or [*var], when dealing
197
+ with a variable you want to treat as an Array, but you're not certain it's an array.
198
+ Enabled: true
199
+ Style/BisectedAttrAccessor:
200
+ Description: >-
201
+ Checks for places where `attr_reader` and `attr_writer`
202
+ for the same method can be combined into single `attr_accessor`.
203
+ Enabled: true
204
+ Style/CaseLikeIf:
205
+ Description: This cop identifies places where `if-elsif` constructions can be replaced with `case-when`.
206
+ Enabled: true
207
+ Style/ExplicitBlockArgument:
208
+ Description: >-
209
+ Consider using explicit block argument to avoid writing block literal
210
+ that just passes its arguments to another block.
211
+ Enabled: true
212
+ Style/ExponentialNotation:
213
+ Description: When using exponential notation, favor a mantissa between 1 (inclusive) and 10 (exclusive).
214
+ Enabled: true
215
+ Style/GlobalStdStream:
216
+ Description: Enforces the use of `$stdout/$stderr/$stdin` instead of `STDOUT/STDERR/STDIN`.
217
+ Enabled: true
218
+ Style/HashAsLastArrayItem:
219
+ Description: >-
220
+ Checks for presence or absence of braces around hash literal as a last
221
+ array item depending on configuration.
222
+ Enabled: true
223
+ Style/HashEachMethods:
224
+ Description: Use Hash#each_key and Hash#each_value.
225
+ Enabled: true
226
+ Style/HashLikeCase:
227
+ Description: >-
228
+ Checks for places where `case-when` represents a simple 1:1
229
+ mapping and can be replaced with a hash lookup.
230
+ Enabled: true
231
+ Style/HashTransformKeys:
232
+ Description: Prefer `transform_keys` over `each_with_object`, `map`, or `to_h`.
233
+ Enabled: true
234
+ Style/HashTransformValues:
235
+ Description: Prefer `transform_values` over `each_with_object`, `map`, or `to_h`.
236
+ Enabled: true
237
+ Style/OptionalBooleanParameter:
238
+ Description: Use keyword arguments when defining method with boolean argument.
239
+ Enabled: true
240
+ Style/RedundantAssignment:
241
+ Description: Checks for redundant assignment before returning.
242
+ Enabled: true
243
+ Style/RedundantFetchBlock:
244
+ Description: >-
245
+ Use `fetch(key, value)` instead of `fetch(key) { value }`
246
+ when value has Numeric, Rational, Complex, Symbol or String type, `false`, `true`, `nil` or is a constant.
247
+ Enabled: true
248
+ Style/RedundantFileExtensionInRequire:
249
+ Description: >-
250
+ Checks for the presence of superfluous `.rb` extension in
251
+ the filename provided to `require` and `require_relative`.
252
+ Enabled: true
253
+ Style/RedundantRegexpCharacterClass:
254
+ Description: Checks for unnecessary single-element Regexp character classes.
255
+ Enabled: true
256
+ Style/RedundantRegexpEscape:
257
+ Description: Checks for redundant escapes in Regexps.
258
+ Enabled: false
259
+ Style/SingleArgumentDig:
260
+ Description: Avoid using single argument dig method.
261
+ Enabled: true
262
+ Style/SlicingWithRange:
263
+ Description: Checks array slicing is done with endless ranges when suitable.
264
+ Enabled: true
265
+ Style/StringConcatenation:
266
+ Description: Checks for places where string concatenation can be replaced with string interpolation.
267
+ Enabled: true
268
+