delorean_lang 0.5.1 → 0.5.2

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.
Files changed (41) hide show
  1. checksums.yaml +5 -5
  2. data/.gitlab-ci.yml +1 -2
  3. data/.rubocop.yml +45 -5
  4. data/.rubocop_todo.yml +1 -634
  5. data/Gemfile +3 -1
  6. data/README.md +22 -0
  7. data/Rakefile +3 -1
  8. data/delorean.gemspec +18 -17
  9. data/lib/delorean/abstract_container.rb +4 -2
  10. data/lib/delorean/base.rb +30 -27
  11. data/lib/delorean/cache.rb +2 -0
  12. data/lib/delorean/cache/adapters.rb +2 -0
  13. data/lib/delorean/cache/adapters/base.rb +2 -0
  14. data/lib/delorean/cache/adapters/ruby_cache.rb +5 -0
  15. data/lib/delorean/const.rb +5 -3
  16. data/lib/delorean/debug.rb +6 -5
  17. data/lib/delorean/delorean.rb +466 -147
  18. data/lib/delorean/delorean.treetop +13 -1
  19. data/lib/delorean/engine.rb +61 -50
  20. data/lib/delorean/error.rb +2 -1
  21. data/lib/delorean/model.rb +12 -9
  22. data/lib/delorean/nodes.rb +130 -67
  23. data/lib/delorean/ruby.rb +2 -0
  24. data/lib/delorean/ruby/whitelists.rb +2 -0
  25. data/lib/delorean/ruby/whitelists/base.rb +7 -3
  26. data/lib/delorean/ruby/whitelists/default.rb +6 -6
  27. data/lib/delorean/ruby/whitelists/empty.rb +3 -2
  28. data/lib/delorean/ruby/whitelists/matchers.rb +2 -0
  29. data/lib/delorean/ruby/whitelists/matchers/arguments.rb +2 -0
  30. data/lib/delorean/ruby/whitelists/matchers/method.rb +5 -2
  31. data/lib/delorean/ruby/whitelists/whitelist_error.rb +2 -0
  32. data/lib/delorean/version.rb +3 -1
  33. data/lib/delorean_lang.rb +3 -1
  34. data/spec/cache_spec.rb +4 -2
  35. data/spec/dev_spec.rb +68 -69
  36. data/spec/eval_spec.rb +824 -729
  37. data/spec/func_spec.rb +172 -176
  38. data/spec/parse_spec.rb +516 -522
  39. data/spec/ruby/whitelist_spec.rb +6 -3
  40. data/spec/spec_helper.rb +26 -23
  41. metadata +27 -27
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: dccec41d942326a7ff9ffa4591b0ab36ce305974
4
- data.tar.gz: 1fe60929e61d040e7ca33a3672476efc62852b3d
2
+ SHA256:
3
+ metadata.gz: e29d667cac3f69abefe148354a0a37bca9ac1495103221d749449ee4e51de9a0
4
+ data.tar.gz: 102bbdb388d92b79d94c951a61d64062cb568efd446fdf26d94987af5df10caf
5
5
  SHA512:
6
- metadata.gz: b7f9d418f8f625dc408c164dd4a0f2447559a392194d8c1a2264e0fa110fd33d616b353074d3e08d4715a96efd0d7eace5c2cedfd0e345ab3adb178658b5f2a2
7
- data.tar.gz: 96d147e01620fbb668f3ae4cf8b088628a981862e894c63008fb2dcb8d65b64326991e7d5e1fb5ea88a5959e41cceb1575b8595b36eb7c88ac46ae81e8c743ab
6
+ metadata.gz: 47b8fa79d74976ff622adc7a666b50f13a7176aeccda389ca35edaded6083a181ca0c19e9403b1aa31cdaff883a64c55e9a1c933c0fedbc028992253ac702f01
7
+ data.tar.gz: b7de8c4e0e6743cda25c0fa7c2b88bbab4d7ba3d2058f66bff84544db0d618c84e84c30ab722a6991a049140ec45a9b5077e071f61f17955966aa0e1e35b3efa
@@ -1,7 +1,6 @@
1
- image: ruby:2.4.2
1
+ image: thepry/docker-ruby-ci:2.4.2-latest
2
2
 
3
3
  before_script:
4
- - gem install bundler
5
4
  - bundle install --jobs $(nproc) --path vendor "${FLAGS[@]}"
6
5
 
7
6
  rubocop:
@@ -7,25 +7,26 @@ AllCops:
7
7
  - 'bin/{rails,rake}'
8
8
  - 'vendor/**/*'
9
9
  - !ruby/regexp /old_and_unused\.rb$/
10
- - lib/delorean/delorean.rb
10
+ - 'lib/delorean/delorean.rb' # Auto-generated
11
11
 
12
12
  Style/StringLiterals:
13
- Enabled: false
13
+ Enabled: true
14
+ EnforcedStyle: single_quotes
14
15
 
15
16
  Metrics/LineLength:
16
17
  Max: 80
17
18
  Exclude:
18
- - 'lib/delorean/delorean.rb'
19
19
  - 'spec/func_spec.rb'
20
20
  - 'spec/parse_spec.rb'
21
21
 
22
22
  Metrics/ModuleLength:
23
+ Max: 100
23
24
  Exclude:
24
- - 'spec/eval_spec.rb'
25
+ - 'spec/**/*'
25
26
 
26
27
  Metrics/BlockLength:
27
28
  Exclude:
28
- - 'spec/eval_spec.rb'
29
+ - 'spec/**/*'
29
30
 
30
31
  Style/TrailingCommaInArguments:
31
32
  Enabled: false
@@ -35,3 +36,42 @@ Style/TrailingCommaInArrayLiteral:
35
36
 
36
37
  Style/TrailingCommaInHashLiteral:
37
38
  Enabled: false
39
+
40
+ Style/FrozenStringLiteralComment:
41
+ EnforcedStyle: always
42
+
43
+ Layout/IndentHeredoc:
44
+ Exclude:
45
+ - 'spec/eval_spec.rb'
46
+
47
+ Style/Documentation:
48
+ Enabled: false
49
+
50
+ Lint/UnusedMethodArgument:
51
+ AllowUnusedKeywordArguments: true
52
+
53
+ Naming/VariableNumber:
54
+ Enabled: false
55
+
56
+ Style/WordArray:
57
+ Exclude:
58
+ - 'spec/**/*'
59
+
60
+ Layout/MultilineArrayBraceLayout:
61
+ Exclude:
62
+ - 'spec/**/*'
63
+
64
+ Layout/MultilineMethodCallBraceLayout:
65
+ Exclude:
66
+ - 'spec/**/*'
67
+
68
+ Naming/BinaryOperatorParameterName:
69
+ Exclude:
70
+ - 'lib/delorean/base.rb'
71
+
72
+ Style/PerlBackrefs:
73
+ Enabled: false
74
+
75
+ Naming/HeredocDelimiterCase:
76
+ Enabled: false
77
+
@@ -6,313 +6,6 @@
6
6
  # Note that changes in the inspected code, or installation of new
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
- # Offense count: 1
10
- # Cop supports --auto-correct.
11
- # Configuration parameters: TreatCommentsAsGroupSeparators, Include.
12
- # Include: **/*.gemfile, **/Gemfile, **/gems.rb
13
- Bundler/OrderedGems:
14
- Exclude:
15
- - 'Gemfile'
16
-
17
- # Offense count: 2
18
- # Cop supports --auto-correct.
19
- # Configuration parameters: TreatCommentsAsGroupSeparators, Include.
20
- # Include: **/*.gemspec
21
- Gemspec/OrderedDependencies:
22
- Exclude:
23
- - 'delorean.gemspec'
24
-
25
- # Offense count: 5
26
- # Cop supports --auto-correct.
27
- # Configuration parameters: EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
28
- # SupportedHashRocketStyles: key, separator, table
29
- # SupportedColonStyles: key, separator, table
30
- # SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
31
- Layout/AlignHash:
32
- Exclude:
33
- - 'spec/dev_spec.rb'
34
- - 'spec/eval_spec.rb'
35
-
36
- # Offense count: 2
37
- # Cop supports --auto-correct.
38
- # Configuration parameters: EnforcedStyle, IndentationWidth.
39
- # SupportedStyles: with_first_parameter, with_fixed_indentation
40
- Layout/AlignParameters:
41
- Exclude:
42
- - 'lib/delorean/base.rb'
43
- - 'lib/delorean/engine.rb'
44
-
45
- # Offense count: 209
46
- # Cop supports --auto-correct.
47
- Layout/ClosingParenthesisIndentation:
48
- Exclude:
49
- - 'spec/dev_spec.rb'
50
- - 'spec/eval_spec.rb'
51
- - 'spec/func_spec.rb'
52
- - 'spec/parse_spec.rb'
53
-
54
- # Offense count: 1
55
- # Cop supports --auto-correct.
56
- # Configuration parameters: EnforcedStyle.
57
- # SupportedStyles: leading, trailing
58
- Layout/DotPosition:
59
- Exclude:
60
- - 'spec/func_spec.rb'
61
-
62
- # Offense count: 1
63
- # Cop supports --auto-correct.
64
- Layout/ElseAlignment:
65
- Exclude:
66
- - 'lib/delorean/nodes.rb'
67
-
68
- # Offense count: 8
69
- # Cop supports --auto-correct.
70
- Layout/EmptyLineAfterGuardClause:
71
- Exclude:
72
- - 'lib/delorean/base.rb'
73
- - 'lib/delorean/cache/adapters/ruby_cache.rb'
74
- - 'lib/delorean/engine.rb'
75
- - 'lib/delorean/model.rb'
76
- - 'lib/delorean/nodes.rb'
77
- - 'lib/delorean/ruby/whitelists/matchers/method.rb'
78
-
79
- # Offense count: 1
80
- # Cop supports --auto-correct.
81
- # Configuration parameters: AllowAdjacentOneLineDefs, NumberOfEmptyLines.
82
- Layout/EmptyLineBetweenDefs:
83
- Exclude:
84
- - 'lib/delorean/nodes.rb'
85
-
86
- # Offense count: 5
87
- # Cop supports --auto-correct.
88
- Layout/EmptyLines:
89
- Exclude:
90
- - 'delorean.gemspec'
91
- - 'lib/delorean/delorean.rb'
92
- - 'lib/delorean/ruby/whitelists/default.rb'
93
- - 'spec/func_spec.rb'
94
-
95
- # Offense count: 2
96
- # Cop supports --auto-correct.
97
- Layout/EmptyLinesAroundArguments:
98
- Exclude:
99
- - 'spec/func_spec.rb'
100
-
101
- # Offense count: 17
102
- # Cop supports --auto-correct.
103
- # Configuration parameters: EnforcedStyle.
104
- # SupportedStyles: empty_lines, no_empty_lines
105
- Layout/EmptyLinesAroundBlockBody:
106
- Exclude:
107
- - 'spec/dev_spec.rb'
108
- - 'spec/eval_spec.rb'
109
- - 'spec/func_spec.rb'
110
- - 'spec/parse_spec.rb'
111
- - 'spec/spec_helper.rb'
112
-
113
- # Offense count: 1
114
- # Cop supports --auto-correct.
115
- # Configuration parameters: EnforcedStyle.
116
- # SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines, beginning_only, ending_only
117
- Layout/EmptyLinesAroundClassBody:
118
- Exclude:
119
- - 'lib/delorean/engine.rb'
120
-
121
- # Offense count: 28
122
- # Cop supports --auto-correct.
123
- # Configuration parameters: EnforcedStyle.
124
- # SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines
125
- Layout/EmptyLinesAroundModuleBody:
126
- Exclude:
127
- - 'lib/delorean/base.rb'
128
- - 'lib/delorean/delorean.rb'
129
- - 'lib/delorean/error.rb'
130
-
131
- # Offense count: 1
132
- # Cop supports --auto-correct.
133
- # Configuration parameters: EnforcedStyleAlignWith, AutoCorrect, Severity.
134
- # SupportedStylesAlignWith: keyword, variable, start_of_line
135
- Layout/EndAlignment:
136
- Exclude:
137
- - 'lib/delorean/nodes.rb'
138
-
139
- # Offense count: 2
140
- # Cop supports --auto-correct.
141
- # Configuration parameters: EnforcedStyle, IndentationWidth.
142
- # SupportedStyles: consistent, consistent_relative_to_receiver, special_for_inner_method_call, special_for_inner_method_call_in_parentheses
143
- Layout/FirstParameterIndentation:
144
- Exclude:
145
- - 'spec/parse_spec.rb'
146
-
147
- # Offense count: 2
148
- # Cop supports --auto-correct.
149
- # Configuration parameters: EnforcedStyle, IndentationWidth.
150
- # SupportedStyles: special_inside_parentheses, consistent, align_brackets
151
- Layout/IndentArray:
152
- Exclude:
153
- - 'spec/eval_spec.rb'
154
-
155
- # Offense count: 2
156
- # Cop supports --auto-correct.
157
- # Configuration parameters: EnforcedStyle.
158
- # SupportedStyles: auto_detection, squiggly, active_support, powerpack, unindent
159
- Layout/IndentHeredoc:
160
- Exclude:
161
- - 'spec/eval_spec.rb'
162
-
163
- # Offense count: 1
164
- # Cop supports --auto-correct.
165
- # Configuration parameters: EnforcedStyle.
166
- # SupportedStyles: normal, rails
167
- Layout/IndentationConsistency:
168
- Exclude:
169
- - 'lib/delorean/nodes.rb'
170
-
171
- # Offense count: 1
172
- # Cop supports --auto-correct.
173
- # Configuration parameters: Width, IgnoredPatterns.
174
- Layout/IndentationWidth:
175
- Exclude:
176
- - 'lib/delorean/nodes.rb'
177
-
178
- # Offense count: 5
179
- # Cop supports --auto-correct.
180
- # Configuration parameters: EnforcedStyle.
181
- # SupportedStyles: symmetrical, new_line, same_line
182
- Layout/MultilineArrayBraceLayout:
183
- Exclude:
184
- - 'lib/delorean/nodes.rb'
185
- - 'spec/eval_spec.rb'
186
-
187
- # Offense count: 9
188
- # Cop supports --auto-correct.
189
- Layout/MultilineBlockLayout:
190
- Exclude:
191
- - 'lib/delorean/base.rb'
192
- - 'lib/delorean/debug.rb'
193
- - 'lib/delorean/nodes.rb'
194
- - 'lib/delorean/ruby/whitelists/matchers/method.rb'
195
- - 'spec/dev_spec.rb'
196
- - 'spec/ruby/whitelist_spec.rb'
197
- - 'spec/spec_helper.rb'
198
-
199
- # Offense count: 1
200
- # Cop supports --auto-correct.
201
- # Configuration parameters: EnforcedStyle.
202
- # SupportedStyles: symmetrical, new_line, same_line
203
- Layout/MultilineHashBraceLayout:
204
- Exclude:
205
- - 'spec/eval_spec.rb'
206
-
207
- # Offense count: 213
208
- # Cop supports --auto-correct.
209
- # Configuration parameters: EnforcedStyle.
210
- # SupportedStyles: symmetrical, new_line, same_line
211
- Layout/MultilineMethodCallBraceLayout:
212
- Exclude:
213
- - 'spec/dev_spec.rb'
214
- - 'spec/eval_spec.rb'
215
- - 'spec/func_spec.rb'
216
- - 'spec/parse_spec.rb'
217
-
218
- # Offense count: 1
219
- # Cop supports --auto-correct.
220
- # Configuration parameters: EnforcedStyle, IndentationWidth.
221
- # SupportedStyles: aligned, indented
222
- Layout/MultilineOperationIndentation:
223
- Exclude:
224
- - 'lib/delorean/nodes.rb'
225
-
226
- # Offense count: 224
227
- # Cop supports --auto-correct.
228
- Layout/SpaceAfterComma:
229
- Exclude:
230
- - 'lib/delorean/base.rb'
231
- - 'lib/delorean/delorean.rb'
232
- - 'spec/eval_spec.rb'
233
- - 'spec/func_spec.rb'
234
-
235
- # Offense count: 7
236
- # Cop supports --auto-correct.
237
- # Configuration parameters: EnforcedStyle.
238
- # SupportedStyles: space, no_space
239
- Layout/SpaceAroundEqualsInParameterDefault:
240
- Exclude:
241
- - 'lib/delorean/engine.rb'
242
- - 'lib/delorean/nodes.rb'
243
- - 'spec/spec_helper.rb'
244
-
245
- # Offense count: 231
246
- # Cop supports --auto-correct.
247
- # Configuration parameters: AllowForAlignment.
248
- Layout/SpaceAroundOperators:
249
- Exclude:
250
- - 'lib/delorean/delorean.rb'
251
- - 'lib/delorean/model.rb'
252
- - 'lib/delorean/nodes.rb'
253
- - 'lib/delorean/ruby/whitelists/default.rb'
254
- - 'spec/eval_spec.rb'
255
- - 'spec/func_spec.rb'
256
- - 'spec/spec_helper.rb'
257
-
258
- # Offense count: 2
259
- # Cop supports --auto-correct.
260
- # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
261
- # SupportedStyles: space, no_space
262
- # SupportedStylesForEmptyBraces: space, no_space
263
- Layout/SpaceBeforeBlockBraces:
264
- Exclude:
265
- - 'delorean.gemspec'
266
- - 'lib/delorean/engine.rb'
267
-
268
- # Offense count: 2
269
- # Cop supports --auto-correct.
270
- # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBrackets.
271
- # SupportedStyles: space, no_space, compact
272
- # SupportedStylesForEmptyBrackets: space, no_space
273
- Layout/SpaceInsideArrayLiteralBrackets:
274
- Exclude:
275
- - 'spec/spec_helper.rb'
276
-
277
- # Offense count: 18
278
- # Cop supports --auto-correct.
279
- # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
280
- # SupportedStyles: space, no_space
281
- # SupportedStylesForEmptyBraces: space, no_space
282
- Layout/SpaceInsideBlockBraces:
283
- Exclude:
284
- - 'lib/delorean/engine.rb'
285
- - 'lib/delorean/nodes.rb'
286
- - 'spec/spec_helper.rb'
287
-
288
- # Offense count: 139
289
- # Cop supports --auto-correct.
290
- # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
291
- # SupportedStyles: space, no_space, compact
292
- # SupportedStylesForEmptyBraces: space, no_space
293
- Layout/SpaceInsideHashLiteralBraces:
294
- Exclude:
295
- - 'lib/delorean/engine.rb'
296
- - 'spec/eval_spec.rb'
297
- - 'spec/func_spec.rb'
298
- - 'spec/spec_helper.rb'
299
-
300
- # Offense count: 2
301
- # Cop supports --auto-correct.
302
- # Configuration parameters: EnforcedStyle.
303
- # SupportedStyles: space, no_space
304
- Layout/SpaceInsideParens:
305
- Exclude:
306
- - 'lib/delorean/engine.rb'
307
-
308
- # Offense count: 1
309
- # Cop supports --auto-correct.
310
- # Configuration parameters: EnforcedStyle.
311
- # SupportedStyles: final_newline, final_blank_line
312
- Layout/TrailingBlankLines:
313
- Exclude:
314
- - 'lib/delorean/delorean.rb'
315
-
316
9
  # Offense count: 3
317
10
  Lint/HandleExceptions:
318
11
  Exclude:
@@ -323,13 +16,6 @@ Lint/InterpolationCheck:
323
16
  Exclude:
324
17
  - 'spec/parse_spec.rb'
325
18
 
326
- # Offense count: 1
327
- # Cop supports --auto-correct.
328
- Lint/ScriptPermission:
329
- Exclude:
330
- - 'Rakefile'
331
-
332
- # Offense count: 1
333
19
  Lint/ShadowedException:
334
20
  Exclude:
335
21
  - 'lib/delorean/engine.rb'
@@ -339,24 +25,6 @@ Lint/UnderscorePrefixedVariableName:
339
25
  Exclude:
340
26
  - 'lib/delorean/base.rb'
341
27
 
342
- # Offense count: 23
343
- # Cop supports --auto-correct.
344
- # Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods.
345
- Lint/UnusedMethodArgument:
346
- Exclude:
347
- - 'lib/delorean/abstract_container.rb'
348
- - 'lib/delorean/cache/adapters/base.rb'
349
- - 'lib/delorean/cache/adapters/ruby_cache.rb'
350
- - 'lib/delorean/nodes.rb'
351
-
352
- # Offense count: 7
353
- Lint/UselessAssignment:
354
- Exclude:
355
- - 'lib/delorean/base.rb'
356
- - 'spec/eval_spec.rb'
357
- - 'spec/func_spec.rb'
358
- - 'spec/spec_helper.rb'
359
-
360
28
  # Offense count: 65
361
29
  # Configuration parameters: CheckForMethodsWithNoSideEffects.
362
30
  Lint/Void:
@@ -384,28 +52,17 @@ Metrics/BlockNesting:
384
52
  # Offense count: 2
385
53
  # Configuration parameters: CountComments.
386
54
  Metrics/ClassLength:
387
- Max: 257
55
+ Max: 280
388
56
 
389
57
  # Offense count: 29
390
58
  Metrics/CyclomaticComplexity:
391
59
  Max: 61
392
60
 
393
- # Offense count: 106
394
- # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
395
- # URISchemes: http, https
396
- Metrics/LineLength:
397
- Max: 111
398
-
399
61
  # Offense count: 43
400
62
  # Configuration parameters: CountComments, ExcludedMethods.
401
63
  Metrics/MethodLength:
402
64
  Max: 302
403
65
 
404
- # Offense count: 1
405
- # Configuration parameters: CountComments.
406
- Metrics/ModuleLength:
407
- Max: 3395
408
-
409
66
  # Offense count: 27
410
67
  Metrics/PerceivedComplexity:
411
68
  Max: 97
@@ -415,37 +72,6 @@ Naming/AccessorMethodName:
415
72
  Exclude:
416
73
  - 'lib/delorean/debug.rb'
417
74
 
418
- # Offense count: 3
419
- Naming/BinaryOperatorParameterName:
420
- Exclude:
421
- - 'lib/delorean/base.rb'
422
-
423
- # Offense count: 3
424
- # Configuration parameters: EnforcedStyle.
425
- # SupportedStyles: lowercase, uppercase
426
- Naming/HeredocDelimiterCase:
427
- Exclude:
428
- - 'lib/delorean/nodes.rb'
429
- - 'spec/eval_spec.rb'
430
-
431
- # Offense count: 1
432
- # Configuration parameters: EnforcedStyleForLeadingUnderscores.
433
- # SupportedStylesForLeadingUnderscores: disallowed, required, optional
434
- Naming/MemoizedInstanceVariableName:
435
- Exclude:
436
- - 'lib/delorean/base.rb'
437
-
438
- # Offense count: 1
439
- # Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist, MethodDefinitionMacros.
440
- # NamePrefix: is_, has_, have_
441
- # NamePrefixBlacklist: is_, has_, have_
442
- # NameWhitelist: is_a?
443
- # MethodDefinitionMacros: define_method, define_singleton_method
444
- Naming/PredicateName:
445
- Exclude:
446
- - 'spec/**/*'
447
- - 'lib/delorean/engine.rb'
448
-
449
75
  # Offense count: 12
450
76
  # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
451
77
  # AllowedNames: io, id, to, by, on, in, at, ip, db
@@ -457,59 +83,6 @@ Naming/UncommunicativeMethodParamName:
457
83
  - 'lib/delorean/nodes.rb'
458
84
  - 'spec/spec_helper.rb'
459
85
 
460
- # Offense count: 2
461
- # Configuration parameters: EnforcedStyle.
462
- # SupportedStyles: snake_case, normalcase, non_integer
463
- Naming/VariableNumber:
464
- Exclude:
465
- - 'spec/cache_spec.rb'
466
-
467
- # Offense count: 3
468
- # Cop supports --auto-correct.
469
- Performance/RedundantBlockCall:
470
- Exclude:
471
- - 'lib/delorean/model.rb'
472
-
473
- # Offense count: 2
474
- # Cop supports --auto-correct.
475
- Performance/RedundantMatch:
476
- Exclude:
477
- - 'lib/delorean/engine.rb'
478
-
479
- # Offense count: 1
480
- # Cop supports --auto-correct.
481
- # Configuration parameters: EnforcedStyle.
482
- # SupportedStyles: always, conditionals
483
- Style/AndOr:
484
- Exclude:
485
- - 'lib/delorean/model.rb'
486
-
487
- # Offense count: 17
488
- # Cop supports --auto-correct.
489
- # Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods.
490
- # SupportedStyles: line_count_based, semantic, braces_for_chaining
491
- # ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
492
- # FunctionalMethods: let, let!, subject, watch
493
- # IgnoredMethods: lambda, proc, it
494
- Style/BlockDelimiters:
495
- Exclude:
496
- - 'lib/delorean/debug.rb'
497
- - 'lib/delorean/engine.rb'
498
- - 'lib/delorean/nodes.rb'
499
- - 'spec/dev_spec.rb'
500
- - 'spec/eval_spec.rb'
501
- - 'spec/func_spec.rb'
502
- - 'spec/parse_spec.rb'
503
-
504
- # Offense count: 26
505
- # Cop supports --auto-correct.
506
- # Configuration parameters: EnforcedStyle.
507
- # SupportedStyles: braces, no_braces, context_dependent
508
- Style/BracesAroundHashParameters:
509
- Exclude:
510
- - 'spec/eval_spec.rb'
511
- - 'spec/func_spec.rb'
512
- - 'spec/spec_helper.rb'
513
86
 
514
87
  # Offense count: 5
515
88
  Style/ClassVars:
@@ -518,46 +91,6 @@ Style/ClassVars:
518
91
  - 'lib/delorean/nodes.rb'
519
92
  - 'spec/spec_helper.rb'
520
93
 
521
- # Offense count: 1
522
- # Cop supports --auto-correct.
523
- # Configuration parameters: Keywords.
524
- # Keywords: TODO, FIXME, OPTIMIZE, HACK, REVIEW
525
- Style/CommentAnnotation:
526
- Exclude:
527
- - 'lib/delorean/model.rb'
528
-
529
- # Offense count: 95
530
- # Cop supports --auto-correct.
531
- # Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions.
532
- # SupportedStyles: assign_to_condition, assign_inside_condition
533
- Style/ConditionalAssignment:
534
- Exclude:
535
- - 'lib/delorean/delorean.rb'
536
-
537
- # Offense count: 111
538
- Style/Documentation:
539
- Enabled: false
540
-
541
- # Offense count: 2
542
- # Cop supports --auto-correct.
543
- # Configuration parameters: EnforcedStyle.
544
- # SupportedStyles: compact, expanded
545
- Style/EmptyMethod:
546
- Exclude:
547
- - 'lib/delorean/ruby/whitelists/empty.rb'
548
- - 'spec/spec_helper.rb'
549
-
550
- # Offense count: 1
551
- Style/EvalWithLocation:
552
- Exclude:
553
- - 'lib/delorean/engine.rb'
554
-
555
- # Offense count: 1
556
- # Cop supports --auto-correct.
557
- Style/ExpandPathArguments:
558
- Exclude:
559
- - 'delorean.gemspec'
560
-
561
94
  # Offense count: 11
562
95
  # Configuration parameters: MinBodyLength.
563
96
  Style/GuardClause:
@@ -566,25 +99,11 @@ Style/GuardClause:
566
99
  - 'lib/delorean/engine.rb'
567
100
  - 'lib/delorean/model.rb'
568
101
 
569
- # Offense count: 4
570
- # Cop supports --auto-correct.
571
- Style/LineEndConcatenation:
572
- Exclude:
573
- - 'lib/delorean/nodes.rb'
574
-
575
102
  # Offense count: 1
576
103
  Style/MultilineBlockChain:
577
104
  Exclude:
578
105
  - 'lib/delorean/engine.rb'
579
106
 
580
- # Offense count: 3
581
- # Cop supports --auto-correct.
582
- Style/MultilineIfModifier:
583
- Exclude:
584
- - 'lib/delorean/base.rb'
585
- - 'lib/delorean/engine.rb'
586
- - 'lib/delorean/ruby/whitelists/base.rb'
587
-
588
107
  # Offense count: 6
589
108
  Style/MultilineTernaryOperator:
590
109
  Exclude:
@@ -592,160 +111,8 @@ Style/MultilineTernaryOperator:
592
111
  - 'lib/delorean/engine.rb'
593
112
  - 'lib/delorean/nodes.rb'
594
113
 
595
- # Offense count: 13
596
- # Cop supports --auto-correct.
597
- Style/MutableConstant:
598
- Exclude:
599
- - 'lib/delorean/const.rb'
600
- - 'lib/delorean/ruby/whitelists/default.rb'
601
- - 'lib/delorean/version.rb'
602
- - 'spec/spec_helper.rb'
603
-
604
- # Offense count: 4
605
- # Cop supports --auto-correct.
606
- # Configuration parameters: Strict.
607
- Style/NumericLiterals:
608
- MinDigits: 11
609
-
610
- # Offense count: 1
611
- # Cop supports --auto-correct.
612
- # Configuration parameters: AutoCorrect, EnforcedStyle, IgnoredMethods.
613
- # SupportedStyles: predicate, comparison
614
- Style/NumericPredicate:
615
- Exclude:
616
- - 'spec/**/*'
617
- - 'lib/delorean/engine.rb'
618
-
619
- # Offense count: 75
620
- # Cop supports --auto-correct.
621
- Style/ParallelAssignment:
622
- Exclude:
623
- - 'lib/delorean/delorean.rb'
624
- - 'lib/delorean/engine.rb'
625
- - 'lib/delorean/nodes.rb'
626
-
627
- # Offense count: 1
628
- # Cop supports --auto-correct.
629
- # Configuration parameters: AllowSafeAssignment, AllowInMultilineConditions.
630
- Style/ParenthesesAroundCondition:
631
- Exclude:
632
- - 'lib/delorean/model.rb'
633
-
634
- # Offense count: 19
635
- # Cop supports --auto-correct.
636
- # Configuration parameters: PreferredDelimiters.
637
- Style/PercentLiteralDelimiters:
638
- Exclude:
639
- - 'delorean.gemspec'
640
- - 'spec/eval_spec.rb'
641
- - 'spec/func_spec.rb'
642
-
643
- # Offense count: 4
644
- # Cop supports --auto-correct.
645
- Style/PerlBackrefs:
646
- Exclude:
647
- - 'lib/delorean/engine.rb'
648
-
649
- # Offense count: 26
650
- # Cop supports --auto-correct.
651
- # Configuration parameters: EnforcedStyle.
652
- # SupportedStyles: short, verbose
653
- Style/PreferredHashMethods:
654
- Exclude:
655
- - 'lib/delorean/delorean.rb'
656
-
657
- # Offense count: 1
658
- # Cop supports --auto-correct.
659
- Style/RedundantBegin:
660
- Exclude:
661
- - 'lib/delorean/base.rb'
662
-
663
- # Offense count: 1
664
- # Cop supports --auto-correct.
665
- # Configuration parameters: AllowMultipleReturnValues.
666
- Style/RedundantReturn:
667
- Exclude:
668
- - 'lib/delorean/base.rb'
669
-
670
- # Offense count: 3
671
- # Cop supports --auto-correct.
672
- Style/RedundantSelf:
673
- Exclude:
674
- - 'lib/delorean/base.rb'
675
- - 'lib/delorean/model.rb'
676
- - 'lib/delorean/nodes.rb'
677
-
678
- # Offense count: 9
679
- # Cop supports --auto-correct.
680
- # Configuration parameters: EnforcedStyle.
681
- # SupportedStyles: implicit, explicit
682
- Style/RescueStandardError:
683
- Exclude:
684
- - 'lib/delorean/base.rb'
685
- - 'lib/delorean/engine.rb'
686
- - 'spec/eval_spec.rb'
687
- - 'spec/parse_spec.rb'
688
-
689
- # Offense count: 1
690
- # Cop supports --auto-correct.
691
- # Configuration parameters: AllowAsExpressionSeparator.
692
- Style/Semicolon:
693
- Exclude:
694
- - 'lib/delorean/engine.rb'
695
-
696
- # Offense count: 5
697
- # Cop supports --auto-correct.
698
- # Configuration parameters: EnforcedStyle.
699
- # SupportedStyles: only_raise, only_fail, semantic
700
- Style/SignalException:
701
- Exclude:
702
- - 'spec/parse_spec.rb'
703
-
704
- # Offense count: 1
705
- # Cop supports --auto-correct.
706
- # Configuration parameters: EnforcedStyle.
707
- # SupportedStyles: use_perl_names, use_english_names
708
- Style/SpecialGlobalVars:
709
- Exclude:
710
- - 'delorean.gemspec'
711
114
 
712
115
  # Offense count: 1
713
116
  Style/StructInheritance:
714
117
  Exclude:
715
118
  - 'lib/delorean/base.rb'
716
-
717
- # Offense count: 1
718
- # Cop supports --auto-correct.
719
- # Configuration parameters: ExactNameMatch, AllowPredicates, AllowDSLWriters, IgnoreClassMethods, Whitelist.
720
- # Whitelist: to_ary, to_a, to_c, to_enum, to_h, to_hash, to_i, to_int, to_io, to_open, to_path, to_proc, to_r, to_regexp, to_str, to_s, to_sym
721
- Style/TrivialAccessors:
722
- Exclude:
723
- - 'lib/delorean/debug.rb'
724
-
725
- # Offense count: 2
726
- # Cop supports --auto-correct.
727
- Style/UnneededPercentQ:
728
- Exclude:
729
- - 'delorean.gemspec'
730
-
731
- # Offense count: 40
732
- # Cop supports --auto-correct.
733
- # Configuration parameters: EnforcedStyle, MinSize, WordRegex.
734
- # SupportedStyles: percent, brackets
735
- Style/WordArray:
736
- Exclude:
737
- - 'spec/dev_spec.rb'
738
- - 'spec/eval_spec.rb'
739
- - 'spec/func_spec.rb'
740
-
741
- # Offense count: 1
742
- # Cop supports --auto-correct.
743
- Style/ZeroLengthPredicate:
744
- Exclude:
745
- - 'lib/delorean/engine.rb'
746
-
747
- # Offense count: 106
748
- # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
749
- # URISchemes: http, https
750
- Metrics/LineLength:
751
- Max: 111