meowcop 2.9.0 → 2.14.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 171cbe2c181520b8965ba51940c5743e829b1a6503e76fa13a91dfb8c494bfce
4
- data.tar.gz: b35be57e13884213d67dace11f5f20c0a4109dfa1d6397ae618a7b74d6b0f822
3
+ metadata.gz: ab2f5100dde0dd7677f41d91aff45144b69610a4f5a62eb7cdfcde0c6bc9ed1a
4
+ data.tar.gz: a60a8bd30c7f1a324c774c6d97aca3607d4de0b8fc3bf1224def8bced8f932ba
5
5
  SHA512:
6
- metadata.gz: c003b19be3d59fdd5998c60d813ece37b836aed045812023ce86594cb2ea4cc3c8482db0c09dada3a89954d286892f7133caea1891792ad74ba9fb64fb2b6413
7
- data.tar.gz: 760f0f57edc42f6e840b7cb0f0b5a84f2d784093a8982875e074d57c8effff6c16b88cc4899dfc6bbf236c76d0a28654ebcf60b12d11a5c83c76a0f2e8fd8c01
6
+ metadata.gz: b496f4c92960c565e096f6356ee006e9739196496810807a4bfe3a1aa03c91ca8b165935199c7c8bcddfae3adb9766aec5eb9dfd2876370f6d548321eb4d53ad
7
+ data.tar.gz: a9380cf21cfdc68c27d7d6d28c3ad1432f3dd3c8a7f4d62b9413d4b1e98729eef6c88e71795d8d7bc66282734e18e86ad2816e9b7fc9269d5c367095190bac2c
data/README.md CHANGED
@@ -49,10 +49,6 @@ inherit_gem:
49
49
  meowcop:
50
50
  - config/rubocop.yml
51
51
 
52
- # Modify the version if you don't use MRI 2.6.
53
- AllCops:
54
- TargetRubyVersion: 2.6
55
-
56
52
  # You can customize RuboCop settings.
57
53
  # For example.
58
54
  # Style/FrozenStringLiteralComment:
@@ -60,8 +56,6 @@ AllCops:
60
56
  # EnforcedStyle: always
61
57
  ```
62
58
 
63
- ### Example
64
-
65
59
  See this [example](examples/.rubocop.yml).
66
60
 
67
61
  ## Usage
@@ -106,6 +106,8 @@ Layout/EmptyLineAfterGuardClause:
106
106
  Enabled: false
107
107
  Layout/EmptyLinesAroundAccessModifier:
108
108
  Enabled: false
109
+ Layout/EmptyLinesAroundAttributeAccessor:
110
+ Enabled: false
109
111
  Layout/EmptyLinesAroundBeginBody:
110
112
  Enabled: false
111
113
  Layout/EmptyLinesAroundBlockBody:
@@ -180,6 +182,8 @@ Layout/SpaceAroundEqualsInParameterDefault:
180
182
  Enabled: false
181
183
  Layout/SpaceAroundKeyword:
182
184
  Enabled: false
185
+ Layout/SpaceAroundMethodCallOperator:
186
+ Enabled: false
183
187
  Layout/SpaceAroundOperators:
184
188
  Enabled: false
185
189
  Layout/SpaceBeforeBlockBraces:
@@ -256,10 +260,14 @@ Naming/MethodParameterName:
256
260
  # === Disabled cops: BEGIN ===
257
261
  Style/AccessModifierDeclarations:
258
262
  Enabled: false
263
+ Style/AccessorGrouping:
264
+ Enabled: false
259
265
  Style/Alias:
260
266
  Enabled: false
261
267
  Style/AndOr:
262
268
  Enabled: false
269
+ Style/ArrayCoercion:
270
+ Enabled: false
263
271
  Style/ArrayJoin:
264
272
  Enabled: false
265
273
  Style/AsciiComments:
@@ -272,12 +280,16 @@ Style/BarePercentLiterals:
272
280
  Enabled: false
273
281
  Style/BeginBlock:
274
282
  Enabled: false
283
+ Style/BisectedAttrAccessor:
284
+ Enabled: false
275
285
  Style/BlockComments:
276
286
  Enabled: false
277
287
  Style/BlockDelimiters:
278
288
  Enabled: false
279
289
  Style/CaseEquality:
280
290
  Enabled: false
291
+ Style/CaseLikeIf:
292
+ Enabled: false
281
293
  Style/CharacterLiteral:
282
294
  Enabled: false
283
295
  Style/ClassAndModuleChildren:
@@ -286,6 +298,8 @@ Style/ClassCheck:
286
298
  Enabled: false
287
299
  Style/ClassMethods:
288
300
  Enabled: false
301
+ Style/ClassMethodsDefinitions:
302
+ Enabled: false
289
303
  Style/ClassVars:
290
304
  Enabled: false
291
305
  Style/CollectionMethods:
@@ -294,6 +308,8 @@ Style/ColonMethodCall:
294
308
  Enabled: false
295
309
  Style/ColonMethodDefinition:
296
310
  Enabled: false
311
+ Style/CombinableLoops:
312
+ Enabled: false
297
313
  Style/CommandLiteral:
298
314
  Enabled: false
299
315
  Style/CommentAnnotation:
@@ -348,6 +364,8 @@ Style/EvenOdd:
348
364
  Enabled: false
349
365
  Style/ExpandPathArguments:
350
366
  Enabled: false
367
+ Style/ExplicitBlockArgument:
368
+ Enabled: false
351
369
  Style/ExponentialNotation:
352
370
  Enabled: false
353
371
  Style/FloatDivision:
@@ -360,12 +378,18 @@ Style/FormatStringToken:
360
378
  Enabled: false
361
379
  Style/FrozenStringLiteralComment:
362
380
  Enabled: false
381
+ Style/GlobalStdStream:
382
+ Enabled: false
363
383
  Style/GlobalVars:
364
384
  Enabled: false
365
385
  Style/GuardClause:
366
386
  Enabled: false
387
+ Style/HashAsLastArrayItem:
388
+ Enabled: false
367
389
  Style/HashEachMethods:
368
390
  Enabled: false
391
+ Style/HashLikeCase:
392
+ Enabled: false
369
393
  Style/HashSyntax:
370
394
  Enabled: false
371
395
  Style/HashTransformKeys:
@@ -392,6 +416,8 @@ Style/InverseMethods:
392
416
  Enabled: false
393
417
  Style/IpAddresses:
394
418
  Enabled: false
419
+ Style/KeywordParametersOrder:
420
+ Enabled: false
395
421
  Style/Lambda:
396
422
  Enabled: false
397
423
  Style/LambdaCall:
@@ -406,8 +432,6 @@ Style/MethodCalledOnDoEndBlock:
406
432
  Enabled: false
407
433
  Style/MethodDefParentheses:
408
434
  Enabled: false
409
- Style/MethodMissingSuper:
410
- Enabled: false
411
435
  Style/MinMax:
412
436
  Enabled: false
413
437
  Style/MissingElse:
@@ -470,6 +494,8 @@ Style/OptionHash:
470
494
  Enabled: false
471
495
  Style/OptionalArguments:
472
496
  Enabled: false
497
+ Style/OptionalBooleanParameter:
498
+ Enabled: false
473
499
  Style/OrAssignment:
474
500
  Enabled: false
475
501
  Style/ParallelAssignment:
@@ -490,6 +516,8 @@ Style/RaiseArgs:
490
516
  Enabled: false
491
517
  Style/RandomWithOffset:
492
518
  Enabled: false
519
+ Style/RedundantAssignment:
520
+ Enabled: false
493
521
  Style/RedundantBegin:
494
522
  Enabled: false
495
523
  Style/RedundantCapitalW:
@@ -500,6 +528,10 @@ Style/RedundantConditional:
500
528
  Enabled: false
501
529
  Style/RedundantException:
502
530
  Enabled: false
531
+ Style/RedundantFetchBlock:
532
+ Enabled: false
533
+ Style/RedundantFileExtensionInRequire:
534
+ Enabled: false
503
535
  Style/RedundantFreeze:
504
536
  Enabled: false
505
537
  Style/RedundantInterpolation:
@@ -508,10 +540,16 @@ Style/RedundantParentheses:
508
540
  Enabled: false
509
541
  Style/RedundantPercentQ:
510
542
  Enabled: false
543
+ Style/RedundantRegexpCharacterClass:
544
+ Enabled: false
545
+ Style/RedundantRegexpEscape:
546
+ Enabled: false
511
547
  Style/RedundantReturn:
512
548
  Enabled: false
513
549
  Style/RedundantSelf:
514
550
  Enabled: false
551
+ Style/RedundantSelfAssignment:
552
+ Enabled: false
515
553
  Style/RedundantSort:
516
554
  Enabled: false
517
555
  Style/RedundantSortBy:
@@ -536,16 +574,24 @@ Style/Send:
536
574
  Enabled: false
537
575
  Style/SignalException:
538
576
  Enabled: false
577
+ Style/SingleArgumentDig:
578
+ Enabled: false
539
579
  Style/SingleLineBlockParams:
540
580
  Enabled: false
541
581
  Style/SingleLineMethods:
542
582
  Enabled: false
583
+ Style/SlicingWithRange:
584
+ Enabled: false
585
+ Style/SoleNestedConditional:
586
+ Enabled: false
543
587
  Style/SpecialGlobalVars:
544
588
  Enabled: false
545
589
  Style/StabbyLambdaParentheses:
546
590
  Enabled: false
547
591
  Style/StderrPuts:
548
592
  Enabled: false
593
+ Style/StringConcatenation:
594
+ Enabled: false
549
595
  Style/StringLiterals:
550
596
  Enabled: false
551
597
  Style/StringLiteralsInInterpolation:
@@ -3,10 +3,6 @@ inherit_gem:
3
3
  meowcop:
4
4
  - config/rubocop.yml
5
5
 
6
- # Modify the version if you don't use MRI 2.6.
7
- AllCops:
8
- TargetRubyVersion: 2.6
9
-
10
6
  # You can customize RuboCop settings.
11
7
  # For example.
12
8
  # Style/FrozenStringLiteralComment:
@@ -1,6 +1,9 @@
1
1
  require "meowcop/version"
2
2
  require 'meowcop/cli'
3
3
 
4
- module Meowcop
4
+ module MeowCop
5
5
  # Your code goes here...
6
6
  end
7
+
8
+ # Ensure backward compatibility
9
+ Meowcop = MeowCop
@@ -23,17 +23,24 @@
23
23
  # THE SOFTWARE.
24
24
  require 'fileutils'
25
25
 
26
- module Meowcop
26
+ module MeowCop
27
27
  class CLI
28
28
  CONFIG_FILE_NAME = ".rubocop.yml".freeze
29
29
 
30
+ EXIT_SUCCESS = 0
31
+ EXIT_FAILURE = 1
32
+
33
+ Options = Struct.new(:version, :help)
34
+
30
35
  def self.start(args)
31
36
  action_name = args.shift || 'help'
32
37
 
33
38
  instance = self.new
39
+
34
40
  unless instance.public_methods(false).include?(action_name.to_sym)
35
- puts "Could not find command #{action_name}."
36
- action_name = 'help'
41
+ puts "Could not find command '#{action_name}'."
42
+ instance.help(args)
43
+ return EXIT_FAILURE
37
44
  end
38
45
 
39
46
  instance.public_send(action_name, args)
@@ -44,30 +51,33 @@ module Meowcop
44
51
  FileUtils.copy_file(config_file_path, CONFIG_FILE_NAME)
45
52
  puts "Meow! #{CONFIG_FILE_NAME} has been #{action} successfully."
46
53
 
47
- return 0
54
+ EXIT_SUCCESS
48
55
  end
49
56
 
50
57
  def run(args)
51
58
  require 'rubocop'
52
59
 
53
- cli = RuboCop::CLI.new
54
- args = [
55
- '--config', config_file_path,
56
- *args
57
- ]
58
- cli.run(args)
60
+ RuboCop::CLI.new.run(['--config', config_file_path, *args])
59
61
  end
60
62
 
61
63
  def help(_args)
62
- msg = <<-END
63
- MeowCop commands:
64
- init - Setup .rubocop.yml
65
- help - Show this message
66
- run - Run RuboCop with MeowCop
67
- END
68
- puts msg
69
-
70
- return 0
64
+ puts <<-END
65
+ Usage: meowcop <command>
66
+
67
+ Commands:
68
+ init Setup .rubocop.yml
69
+ run Run RuboCop with MeowCop
70
+ version Show version
71
+ help Show help
72
+ END
73
+
74
+ EXIT_SUCCESS
75
+ end
76
+
77
+ def version(_args)
78
+ puts VERSION
79
+
80
+ EXIT_SUCCESS
71
81
  end
72
82
 
73
83
  private
@@ -1,3 +1,3 @@
1
- module Meowcop
2
- VERSION = "2.9.0".freeze
1
+ module MeowCop
2
+ VERSION = "2.14.0".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: meowcop
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.9.0
4
+ version: 2.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sleeek Corporation
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-04-17 00:00:00.000000000 Z
11
+ date: 2020-09-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.82.0
19
+ version: 0.90.0
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 1.0.0
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 0.82.0
29
+ version: 0.90.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 1.0.0
@@ -137,7 +137,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
139
  requirements: []
140
- rubygems_version: 3.1.2
140
+ rubygems_version: 3.1.4
141
141
  signing_key:
142
142
  specification_version: 4
143
143
  summary: A RuboCop configuration focusing Lint