rubocop-amagi 0.0.1 → 1.0.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: 7e16fa7c9de973af69f4380c414b2986acaa8005468aa28c675866e193ef48c1
4
- data.tar.gz: 1a5c157800ec349b5515de7c68f25ae6adb52e541344811b5ea12b4ee1864eb4
3
+ metadata.gz: 3948acf3c16d99d00f4d0d583691b817cebde99fd51e13d2103c584973ebe1d3
4
+ data.tar.gz: 04c64ff3bceb28524d44d2bbabef49562a3b33bc315376440bdf619d3c842523
5
5
  SHA512:
6
- metadata.gz: 4602a46cf2f198767cba81b136129b4ee2fd63cdf9183fc9353f0581ebbf35a7239d6386721b1ebb7f14dea38f74a73f1bcf1f5a9ce1e43494e918927b6fbfd9
7
- data.tar.gz: 7221bef12df05bae099ea4927b991bde3d33e4ce4b40c7ea580e8f16eb1db89f9e671cb9135de33dc770ec1fce295d4d0e2cbb4904dfbb4098e41d21776c6ef3
6
+ metadata.gz: 5ca7aeaaaca366eb83baa552c9093aea4c2e48830206e37bfb90f693e9f80044a9865df0b76f73a9ea677efcfffe2a3f15818917daf507dd857ce018b293af91
7
+ data.tar.gz: c637e37d4602e07552482f11862b950771bc2d92b56890dc280914d8ef7062d913d544c1cc5fa945cb19f5d8215e269d80c91daa5c898d39a8d8ce36aa19be23
@@ -0,0 +1,40 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This cop will checks the constant for the duplicate values in a file
4
+ # if two constants have same values it may give wrong constant name if we fetch constants using values
5
+
6
+ module RuboCop
7
+ module Cop
8
+ module CustomCops
9
+ class DuplicateConstantCop < Cop
10
+
11
+ # on every file reset the hash
12
+ def on_new_investigation
13
+ @occurance = {}
14
+ end
15
+
16
+ # on getting constant assignment
17
+ # check if there is any constant already present with the same value
18
+ # in that particular file
19
+ # ignore if the const value is other than string
20
+ # example of node on_casgn
21
+ # (casgn nil :MILLI_SECOND
22
+ # (int 1000000))
23
+ # node.children[1] consists of const name(ex: MILLI_SECOND)
24
+ # node.children[2] consists of type and value (ex: (int 1000000))
25
+ # node.children[2].source gives the value of the constant
26
+ def on_casgn(node)
27
+ const = node.children[1]
28
+ value = node.children[2].source
29
+ # if value is already present return error
30
+ if @occurance[value].present?
31
+ add_offense(node, location: :expression, message: "Duplicate value #{value} for the const #{const}. Value already present in the file as #{@occurance[value]}")
32
+ # populate hash only if the value type string
33
+ elsif node.children[2].str_type?
34
+ @occurance[value] = const
35
+ end
36
+ end
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,67 @@
1
+ module RuboCop
2
+ module Cop
3
+ module CustomCops
4
+ class PutLoggerFormatCop < Cop
5
+ # Constant required for Rubocop
6
+ MSG = 'Log Format should be <module/class>#method_name:<space><message>'.freeze
7
+ def get_classname(node)
8
+ # for getting complete names of controllers
9
+ @name = ""
10
+ if node.children[0] == nil
11
+ @name += node.children[1].to_s + "::"
12
+ else
13
+ get_classname(node.children[0])
14
+ @name += node.children[1].to_s + "::"
15
+ end
16
+ return @name[0...-2]
17
+ end
18
+
19
+ def on_module(node)
20
+ # gives module name for a particular node
21
+ @class_name = node.children[0].children[1]
22
+ end
23
+
24
+ def on_class(node)
25
+ # gives class name for a particular node
26
+ @class_name = get_classname(node.children[0])
27
+ end
28
+
29
+ def on_def(node)
30
+ # gives method_name for each node
31
+ @method_name = node.children[0]
32
+ end
33
+
34
+ def on_defs(node)
35
+ # gives method_name for class methods
36
+ @method_name = node.children[1]
37
+ end
38
+
39
+ def on_block(node)
40
+ # give name of a block defined without any method
41
+ @method_name = node.children[0].children[1].to_s if node.parent&.parent && node.parent.parent&.class_type?
42
+ end
43
+
44
+ def on_send(node)
45
+ if node.children[1] == :puts
46
+ str = get_string(node.children[2])
47
+ if str != "#{@class_name}##{@method_name}:"
48
+ # add offense if format not correct
49
+ add_offense(node, location: :expression)
50
+ end
51
+ end
52
+ end
53
+
54
+ def get_string(node)
55
+ string = if node&.str_type?
56
+ node.children[0].to_s
57
+ elsif node&.dstr_type?
58
+ node.children[0].children[0].to_s
59
+ else
60
+ 'false_string'
61
+ end
62
+ string.partition(' ').first
63
+ end
64
+ end
65
+ end
66
+ end
67
+ end
@@ -0,0 +1,59 @@
1
+ # Amagi Rubocop CustomCop Rules
2
+
3
+ ## How to use CustomCops?
4
+ ***
5
+ **Using any cop**
6
+ ---
7
+ Open .rubocop.yml in your working directory and set the enabled option as true.
8
+ ~~~ruby
9
+ CustomCop/Copname:
10
+ Enabled: true
11
+ ~~~
12
+ ### PutLoggerFormatCop
13
+ PutLoggerFormatCop ensures that the message format received on encountering **puts** is of the standard format
14
+ ~~~ruby
15
+ "<module/class>#method_name:<space><message>".
16
+ ~~~
17
+ Enabling the cop inside .rubocop.yml :
18
+ ~~~ruby
19
+ CustomCop/PutLoggerFormatCop:
20
+ Enabled: true
21
+ ~~~
22
+
23
+ ### DuplicateConstantCop
24
+ DuplicateConstantCop ensures that there is no two constants in a file which has same string value
25
+
26
+ #### Reason to add this cop
27
+ if we have a same value for two constants and we try to fetch constant name using its value which ends in picking up the same constant always ignoring the other one.
28
+
29
+ ~~~ruby
30
+ # not allowed
31
+ TEST = "abc"
32
+ TEST1 = "abc"
33
+ ~~~
34
+
35
+ ~~~ruby
36
+ # allowed
37
+ TEST = "abc"
38
+ TEST1 = "abcd"
39
+ ~~~
40
+
41
+ ~~~ruby
42
+ # allowed
43
+ TEST = 10
44
+ TEST1 = 10
45
+ ~~~
46
+
47
+ ~~~ruby
48
+ # allowed
49
+ TEST = ["abc", "def"]
50
+ TEST1 = ["abc", "def"]
51
+ ~~~
52
+
53
+ Enabled by default
54
+
55
+ to disable it add the following lines in .rubocop.yml of your repo:
56
+ ~~~ruby
57
+ CustomCop/DuplicateConstantCop:
58
+ Enabled: false
59
+ ~~~
data/rubocop.yml CHANGED
@@ -1,117 +1,130 @@
1
+ inherit_gem:
2
+ rubocop-shopify: rubocop.yml
3
+
1
4
  AllCops:
2
5
  TargetRubyVersion: 2.7.1
3
6
  Exclude:
4
7
  - 'vendor/**/*'
5
8
  - 'node_modules/**/*'
6
- DisabledByDefault: true
9
+
10
+ require:
11
+ - './lib/cops/logger_format_cop.rb'
12
+ - './lib/cops/duplicate_constant_cop.rb'
13
+ - 'rubocop-rails'
14
+
15
+ CustomCops/PutLoggerFormatCop:
16
+ Enabled: false
17
+
18
+ CustomCops/DuplicateConstantCop:
19
+ Enabled: true
7
20
 
8
21
  Bundler/DuplicatedGem:
9
22
  Enabled: true
10
23
 
11
24
  Bundler/OrderedGems:
12
- Enabled: true
25
+ Enabled: false
13
26
 
14
27
  Layout/AccessModifierIndentation:
15
- Enabled: true
28
+ Enabled: false
16
29
 
17
30
  Layout/ArgumentAlignment:
18
- Enabled: true
31
+ Enabled: false
19
32
 
20
33
  Layout/ArrayAlignment:
21
- Enabled: true
34
+ Enabled: false
22
35
 
23
36
  Layout/AssignmentIndentation:
24
- Enabled: true
37
+ Enabled: false
25
38
 
26
39
  Layout/BlockAlignment:
27
- Enabled: true
40
+ Enabled: false
28
41
 
29
42
  Layout/BlockEndNewline:
30
- Enabled: true
43
+ Enabled: false
31
44
 
32
45
  Layout/CaseIndentation:
33
- Enabled: true
46
+ Enabled: false
34
47
 
35
48
  Layout/ClosingHeredocIndentation:
36
- Enabled: true
49
+ Enabled: false
37
50
 
38
51
  Layout/ClosingParenthesisIndentation:
39
- Enabled: true
52
+ Enabled: false
40
53
 
41
54
  Layout/CommentIndentation:
42
- Enabled: true
55
+ Enabled: false
43
56
 
44
57
  Layout/DefEndAlignment:
45
- Enabled: true
58
+ Enabled: false
46
59
 
47
60
  Layout/DotPosition:
48
- Enabled: true
61
+ Enabled: false
49
62
 
50
63
  Layout/ElseAlignment:
51
- Enabled: true
64
+ Enabled: false
52
65
 
53
66
  Layout/EmptyComment:
54
- Enabled: true
67
+ Enabled: false
55
68
 
56
69
  Layout/EmptyLineAfterGuardClause:
57
- Enabled: true
70
+ Enabled: false
58
71
 
59
72
  Layout/EmptyLineBetweenDefs:
60
73
  Enabled: true
61
74
 
62
75
  Layout/EmptyLines:
63
- Enabled: true
76
+ Enabled: false
64
77
 
65
78
  Layout/EmptyLinesAroundAccessModifier:
66
- Enabled: true
79
+ Enabled: false
67
80
 
68
81
  Layout/EmptyLinesAroundBeginBody:
69
- Enabled: true
82
+ Enabled: false
70
83
 
71
84
  Layout/EmptyLinesAroundBlockBody:
72
- Enabled: true
85
+ Enabled: false
73
86
 
74
87
  Layout/EmptyLinesAroundClassBody:
75
- Enabled: true
88
+ Enabled: false
76
89
 
77
90
  Layout/EmptyLinesAroundExceptionHandlingKeywords:
78
- Enabled: true
91
+ Enabled: false
79
92
 
80
93
  Layout/EmptyLineAfterMagicComment:
81
94
  Enabled: true
82
95
 
83
96
  Layout/EmptyLinesAroundMethodBody:
84
- Enabled: true
97
+ Enabled: false
85
98
 
86
99
  Layout/EmptyLinesAroundModuleBody:
87
- Enabled: true
100
+ Enabled: false
88
101
 
89
102
  Layout/EndAlignment:
90
103
  Enabled: true
91
104
 
92
105
  Layout/EndOfLine:
93
- Enabled: true
106
+ Enabled: false
94
107
 
95
108
  Layout/ExtraSpacing:
96
- Enabled: true
109
+ Enabled: false
97
110
 
98
111
  Layout/FirstArgumentIndentation:
99
- Enabled: true
112
+ Enabled: false
100
113
 
101
114
  Layout/FirstArrayElementIndentation:
102
- Enabled: true
115
+ Enabled: false
103
116
 
104
117
  Layout/FirstHashElementIndentation:
105
- Enabled: true
118
+ Enabled: false
106
119
 
107
120
  Layout/HashAlignment:
108
- Enabled: true
121
+ Enabled: false
109
122
 
110
123
  Layout/HeredocIndentation:
111
- Enabled: true
124
+ Enabled: false
112
125
 
113
126
  Layout/IndentationConsistency:
114
- Enabled: true
127
+ Enabled: false
115
128
 
116
129
  Layout/IndentationStyle:
117
130
  Enabled: true
@@ -127,88 +140,88 @@ Layout/LeadingCommentSpace:
127
140
  Enabled: true
128
141
 
129
142
  Layout/LeadingEmptyLines:
130
- Enabled: true
143
+ Enabled: false
131
144
 
132
145
  Layout/LineLength:
133
- Enabled: true
146
+ Enabled: false
134
147
 
135
148
  Layout/MultilineArrayBraceLayout:
136
- Enabled: true
149
+ Enabled: false
137
150
 
138
151
  Layout/MultilineBlockLayout:
139
- Enabled: true
152
+ Enabled: false
140
153
 
141
154
  Layout/MultilineHashBraceLayout:
142
- Enabled: true
155
+ Enabled: false
143
156
 
144
157
  Layout/MultilineMethodCallBraceLayout:
145
- Enabled: true
158
+ Enabled: false
146
159
 
147
160
  Layout/MultilineMethodCallIndentation:
148
- Enabled: true
161
+ Enabled: false
149
162
 
150
163
  Layout/MultilineOperationIndentation:
151
- Enabled: true
164
+ Enabled: false
152
165
 
153
166
  Layout/RescueEnsureAlignment:
154
167
  Enabled: true
155
168
 
156
169
  Layout/SpaceAfterColon:
157
- Enabled: true
170
+ Enabled: false
158
171
 
159
172
  Layout/SpaceAfterComma:
160
173
  Enabled: true
161
174
 
162
175
  Layout/SpaceAfterMethodName:
163
- Enabled: true
176
+ Enabled: false
164
177
 
165
178
  Layout/SpaceAfterNot:
166
- Enabled: true
179
+ Enabled: false
167
180
 
168
181
  Layout/SpaceAfterSemicolon:
169
- Enabled: true
182
+ Enabled: false
170
183
 
171
184
  Layout/SpaceAroundBlockParameters:
172
- Enabled: true
185
+ Enabled: false
173
186
 
174
187
  Layout/SpaceAroundEqualsInParameterDefault:
175
- Enabled: true
188
+ Enabled: false
176
189
 
177
190
  Layout/SpaceAroundKeyword:
178
- Enabled: true
191
+ Enabled: false
179
192
 
180
193
  Layout/SpaceAroundOperators:
181
- Enabled: true
194
+ Enabled: false
182
195
 
183
196
  Layout/SpaceBeforeBlockBraces:
184
- Enabled: true
197
+ Enabled: false
185
198
 
186
199
  Layout/SpaceBeforeComma:
187
- Enabled: true
200
+ Enabled: false
188
201
 
189
202
  Layout/SpaceBeforeComment:
190
- Enabled: true
203
+ Enabled: false
191
204
 
192
205
  Layout/SpaceBeforeFirstArg:
193
- Enabled: true
206
+ Enabled: false
194
207
 
195
208
  Layout/SpaceInsideArrayLiteralBrackets:
196
- Enabled: true
209
+ Enabled: false
197
210
 
198
211
  Layout/SpaceInsideArrayPercentLiteral:
199
- Enabled: true
212
+ Enabled: false
200
213
 
201
214
  Layout/SpaceInsideBlockBraces:
202
- Enabled: true
215
+ Enabled: false
203
216
 
204
217
  Layout/SpaceInsideHashLiteralBraces:
205
- Enabled: true
218
+ Enabled: false
206
219
 
207
220
  Layout/SpaceInsideParens:
208
- Enabled: true
221
+ Enabled: false
209
222
 
210
223
  Layout/SpaceInsideStringInterpolation:
211
- Enabled: true
224
+ Enabled: false
212
225
 
213
226
  Layout/TrailingEmptyLines:
214
227
  Enabled: true
@@ -220,7 +233,7 @@ Lint/AmbiguousBlockAssociation:
220
233
  Enabled: true
221
234
 
222
235
  Lint/AmbiguousRegexpLiteral:
223
- Enabled: true
236
+ Enabled: false
224
237
 
225
238
  Lint/AmbiguousOperator:
226
239
  Enabled: true
@@ -229,7 +242,7 @@ Lint/AssignmentInCondition:
229
242
  Enabled: true
230
243
 
231
244
  Lint/BinaryOperatorWithIdenticalOperands:
232
- Enabled: true
245
+ Enabled: false
233
246
 
234
247
  Lint/DeprecatedClassMethods:
235
248
  Enabled: true
@@ -258,10 +271,10 @@ Lint/EmptyWhen:
258
271
  AllowComments: true
259
272
 
260
273
  Lint/EnsureReturn:
261
- Enabled: true
274
+ Enabled: false
262
275
 
263
276
  Lint/ErbNewArguments:
264
- Enabled: true
277
+ Enabled: false
265
278
 
266
279
  Lint/ImplicitStringConcatenation:
267
280
  Enabled: true
@@ -273,40 +286,40 @@ Lint/LiteralAsCondition:
273
286
  Enabled: true
274
287
 
275
288
  Lint/Loop:
276
- Enabled: true
289
+ Enabled: false
277
290
 
278
291
  Lint/MissingSuper:
279
- Enabled: true
292
+ Enabled: false
280
293
 
281
294
  Lint/NestedMethodDefinition:
282
- Enabled: true
295
+ Enabled: false
283
296
 
284
297
  Lint/NonDeterministicRequireOrder:
285
- Enabled: true
298
+ Enabled: false
286
299
 
287
300
  Lint/NonLocalExitFromIterator:
288
301
  Enabled: true
289
302
 
290
303
  Lint/ParenthesesAsGroupedExpression:
291
- Enabled: true
304
+ Enabled: false
292
305
 
293
306
  Lint/RedundantStringCoercion:
294
307
  Enabled: true
295
308
 
296
309
  Lint/RedundantWithIndex:
297
- Enabled: true
310
+ Enabled: false
298
311
 
299
312
  Lint/RescueException:
300
313
  Enabled: true
301
314
 
302
315
  Lint/RequireParentheses:
303
- Enabled: true
316
+ Enabled: false
304
317
 
305
318
  Lint/ReturnInVoidContext:
306
- Enabled: true
319
+ Enabled: false
307
320
 
308
321
  Lint/ScriptPermission:
309
- Enabled: true
322
+ Enabled: false
310
323
 
311
324
  Lint/ShadowedArgument:
312
325
  Enabled: true
@@ -318,25 +331,25 @@ Lint/SuppressedException:
318
331
  Enabled: true
319
332
 
320
333
  Lint/ToJSON:
321
- Enabled: true
334
+ Enabled: false
322
335
 
323
336
  Lint/UnderscorePrefixedVariableName:
324
337
  Enabled: true
325
338
 
326
339
  Lint/UnifiedInteger:
327
- Enabled: true
340
+ Enabled: false
328
341
 
329
342
  Lint/UnreachableCode:
330
343
  Enabled: true
331
344
 
332
345
  Lint/UnusedBlockArgument:
333
- Enabled: true
346
+ Enabled: false
334
347
 
335
348
  Lint/UnusedMethodArgument:
336
- Enabled: true
349
+ Enabled: false
337
350
 
338
351
  Lint/UselessAssignment:
339
- Enabled: true
352
+ Enabled: false
340
353
 
341
354
  Lint/UriEscapeUnescape:
342
355
  Enabled: true
@@ -348,41 +361,75 @@ Lint/RedundantCopDisableDirective:
348
361
  Enabled: true
349
362
 
350
363
  Metrics:
351
- Enabled: true
364
+ Enabled: false
352
365
 
353
366
  Naming/AccessorMethodName:
354
- Enabled: true
367
+ Enabled: false
355
368
 
356
369
  Naming/FileName:
357
- Enabled: true
370
+ Enabled: false
358
371
 
359
372
  Naming/HeredocDelimiterNaming:
360
- Enabled: true
373
+ Enabled: false
361
374
 
362
375
  Naming/MemoizedInstanceVariableName:
363
- Enabled: true
376
+ Enabled: false
364
377
 
365
378
  Naming/MethodName:
366
- Enabled: true
379
+ Enabled: false
367
380
 
368
381
  Naming/MethodParameterName:
369
- Enabled: true
382
+ Enabled: false
370
383
 
371
384
  Naming/PredicateName:
372
- Enabled: true
385
+ Enabled: false
373
386
 
374
387
  Naming/RescuedExceptionsVariableName:
375
- Enabled: true
388
+ Enabled: false
376
389
 
377
390
  Naming/VariableName:
378
- Enabled: true
391
+ Enabled: false
379
392
 
380
393
  Naming/VariableNumber:
394
+ Enabled: false
395
+
396
+ Rails/ActiveRecordOverride:
381
397
  Enabled: true
382
398
 
383
- Security/Eval:
399
+ Rails/AfterCommitOverride:
400
+ Enabled: true
401
+
402
+ Rails/Blank:
403
+ Enabled: true
404
+
405
+ Rails/Date:
406
+ Enabled: true
407
+
408
+ Rails/EnvironmentComparison:
409
+ Enabled: true
410
+
411
+ Rails/Exit:
412
+ Enabled: true
413
+
414
+ Rails/FilePath:
415
+ Enabled: true
416
+ EnforcedStyle: arguments
417
+
418
+ Rails/FindEach:
419
+ Enabled: true
420
+
421
+ Rails/Output:
422
+ Enabled: true
423
+
424
+ Rails/Present:
425
+ Enabled: true
426
+
427
+ Rails/SaveBang:
384
428
  Enabled: true
385
429
 
430
+ Security/Eval:
431
+ Enabled: false
432
+
386
433
  Security/JSONLoad:
387
434
  Enabled: true
388
435
 
@@ -393,236 +440,248 @@ Security/YAMLLoad:
393
440
  Enabled: true
394
441
 
395
442
  Style/Alias:
396
- Enabled: true
443
+ Enabled: false
397
444
 
398
445
  Style/AndOr:
399
- Enabled: true
446
+ Enabled: false
400
447
 
401
448
  Style/AutoResourceCleanup:
402
449
  Enabled: true
403
450
 
404
451
  Style/BarePercentLiterals:
405
- Enabled: true
452
+ Enabled: false
406
453
 
407
454
  Style/BisectedAttrAccessor:
408
455
  Enabled: true
409
456
 
410
457
  Style/BlockComments:
411
- Enabled: true
458
+ Enabled: false
412
459
 
413
460
  Style/BlockDelimiters:
414
- Enabled: true
461
+ Enabled: false
415
462
 
416
463
  Style/CaseEquality:
417
- Enabled: true
464
+ Enabled: false
418
465
 
419
466
  Style/CharacterLiteral:
420
- Enabled: true
467
+ Enabled: false
421
468
 
422
469
  Style/ClassAndModuleChildren:
423
- Enabled: true
470
+ Enabled: false
424
471
 
425
472
  Style/ClassCheck:
426
- Enabled: true
473
+ Enabled: false
427
474
 
428
475
  Style/ClassMethods:
429
- Enabled: true
476
+ Enabled: false
430
477
 
431
478
  Style/ClassVars:
432
- Enabled: true
479
+ Enabled: false
433
480
 
434
481
  Style/ColonMethodCall:
435
- Enabled: true
482
+ Enabled: false
436
483
 
437
484
  Style/CommandLiteral:
438
- Enabled: true
485
+ Enabled: false
439
486
 
440
487
  Style/CommentAnnotation:
441
- Enabled: true
488
+ Enabled: false
442
489
 
443
490
  Style/CommentedKeyword:
444
- Enabled: true
491
+ Enabled: false
445
492
 
446
493
  Style/ConditionalAssignment:
447
- Enabled: true
494
+ Enabled: false
448
495
 
449
496
  Style/DateTime:
450
497
  Enabled: true
451
498
 
452
499
  Style/DefWithParentheses:
453
- Enabled: true
500
+ Enabled: false
454
501
 
455
502
  Style/Dir:
456
- Enabled: true
503
+ Enabled: false
457
504
 
458
505
  Style/Documentation:
459
- Enabled: true
506
+ Enabled: false
460
507
 
461
508
  Style/DoubleNegation:
462
- Enabled: true
509
+ Enabled: false
463
510
 
464
511
  Style/EachWithObject:
465
- Enabled: true
512
+ Enabled: false
466
513
 
467
514
  Style/EmptyBlockParameter:
468
- Enabled: true
515
+ Enabled: false
469
516
 
470
517
  Style/EmptyElse:
471
- Enabled: true
518
+ Enabled: false
472
519
 
473
520
  Style/EmptyLiteral:
474
- Enabled: true
521
+ Enabled: false
475
522
 
476
523
  Style/EmptyMethod:
477
524
  Enabled: true
478
525
  EnforcedStyle: expanded
479
526
 
480
527
  Style/EvalWithLocation:
481
- Enabled: true
528
+ Enabled: false
482
529
 
483
530
  Style/EvenOdd:
484
- Enabled: true
531
+ Enabled: false
485
532
 
486
533
  Style/ExpandPathArguments:
487
- Enabled: true
534
+ Enabled: false
488
535
 
489
536
  Style/FloatDivision:
490
- Enabled: true
537
+ Enabled: false
491
538
 
492
539
  Style/For:
493
- Enabled: true
540
+ Enabled: false
494
541
 
495
542
  Style/FormatString:
496
- Enabled: true
543
+ Enabled: false
497
544
 
498
545
  Style/FormatStringToken:
499
- Enabled: true
546
+ Enabled: false
500
547
 
501
548
  Style/FrozenStringLiteralComment:
502
- Enabled: true
549
+ Enabled: false
503
550
 
504
551
  Style/GlobalVars:
505
- Enabled: true
552
+ Enabled: false
506
553
 
507
554
  Style/GuardClause:
508
- Enabled: true
555
+ Enabled: false
509
556
 
510
557
  Style/HashSyntax:
511
- Enabled: true
558
+ Enabled: false
512
559
 
513
560
  Style/IdenticalConditionalBranches:
514
- Enabled: true
561
+ Enabled: false
515
562
 
516
563
  Style/IfInsideElse:
517
- Enabled: true
564
+ Enabled: false
518
565
 
519
566
  Style/IfUnlessModifier:
520
- Enabled: true
567
+ Enabled: false
521
568
 
522
569
  Style/ImplicitRuntimeError:
523
570
  Enabled: true
524
571
 
525
572
  Style/InfiniteLoop:
526
- Enabled: true
573
+ Enabled: false
527
574
 
528
575
  Style/InverseMethods:
529
- Enabled: true
576
+ Enabled: false
530
577
 
531
578
  Style/IpAddresses:
532
579
  Enabled: true
533
580
 
534
581
  Style/Lambda:
535
- Enabled: true
582
+ Enabled: false
536
583
 
537
584
  Style/LineEndConcatenation:
538
- Enabled: true
585
+ Enabled: false
539
586
 
540
587
  Style/MethodCallWithoutArgsParentheses:
541
- Enabled: true
588
+ Enabled: false
542
589
 
543
590
  Style/MethodCallWithArgsParentheses:
544
- Enabled: true
591
+ Enabled: false
545
592
 
546
593
  Style/MethodDefParentheses:
547
- Enabled: true
594
+ Enabled: false
548
595
 
549
596
  Style/MixinUsage:
550
- Enabled: true
597
+ Enabled: false
598
+
599
+ Style/MultilineIfThen:
600
+ Enabled: false
601
+
602
+ Style/MultilineTernaryOperator:
603
+ Enabled: false
604
+
605
+ Style/MultipleComparison:
606
+ Enabled: false
551
607
 
552
608
  Style/MutableConstant:
553
609
  Enabled: true
554
610
 
555
611
  Style/NegatedIf:
556
- Enabled: true
612
+ Enabled: false
557
613
 
558
614
  Style/NegatedWhile:
559
- Enabled: true
615
+ Enabled: false
560
616
 
561
617
  Style/NestedParenthesizedCalls:
562
- Enabled: true
618
+ Enabled: false
563
619
 
564
620
  Style/NestedTernaryOperator:
565
- Enabled: true
621
+ Enabled: false
566
622
 
567
623
  Style/Next:
568
- Enabled: true
624
+ Enabled: false
569
625
 
570
626
  Style/NilComparison:
571
- Enabled: true
627
+ Enabled: false
572
628
 
573
629
  Style/NonNilCheck:
574
- Enabled: true
630
+ Enabled: false
575
631
 
576
632
  Style/Not:
577
- Enabled: true
633
+ Enabled: false
578
634
 
579
635
  Style/NumericLiterals:
580
- Enabled: true
636
+ Enabled: false
581
637
 
582
638
  Style/NumericPredicate:
583
- Enabled: true
639
+ Enabled: false
584
640
 
585
641
  Style/OneLineConditional:
586
- Enabled: true
642
+ Enabled: false
587
643
 
588
644
  Style/OptionalArguments:
589
- Enabled: true
645
+ Enabled: false
590
646
 
591
647
  Style/OrAssignment:
592
- Enabled: true
648
+ Enabled: false
593
649
 
594
650
  Style/ParallelAssignment:
595
- Enabled: true
651
+ Enabled: false
596
652
 
597
653
  Style/ParenthesesAroundCondition:
598
- Enabled: true
654
+ Enabled: false
599
655
 
600
656
  Style/PercentLiteralDelimiters:
601
- Enabled: true
657
+ Enabled: false
602
658
 
603
659
  Style/PerlBackrefs:
604
- Enabled: true
660
+ Enabled: false
605
661
 
606
662
  Style/PreferredHashMethods:
607
- Enabled: true
663
+ Enabled: false
608
664
 
609
665
  Style/Proc:
610
- Enabled: true
666
+ Enabled: false
667
+
668
+ Style/RaiseArgs:
669
+ Enabled: false
611
670
 
612
671
  Style/RandomWithOffset:
613
- Enabled: true
672
+ Enabled: false
614
673
 
615
674
  Style/RedundantBegin:
616
- Enabled: true
675
+ Enabled: false
617
676
 
618
677
  Style/RedundantCondition:
619
- Enabled: true
678
+ Enabled: false
620
679
 
621
680
  Style/RedundantConditional:
622
- Enabled: true
681
+ Enabled: false
623
682
 
624
683
  Style/RedundantFreeze:
625
- Enabled: true
684
+ Enabled: false
626
685
 
627
686
  Style/RedundantInterpolation:
628
687
  Enabled: true
@@ -635,19 +694,19 @@ Style/RedundantParentheses:
635
694
  Enabled: true
636
695
 
637
696
  Style/RedundantReturn:
638
- Enabled: true
697
+ Enabled: false
639
698
 
640
699
  Style/RedundantSelf:
641
- Enabled: true
700
+ Enabled: false
642
701
 
643
702
  Style/RedundantSort:
644
- Enabled: true
703
+ Enabled: false
645
704
 
646
705
  Style/RegexpLiteral:
647
- Enabled: true
706
+ Enabled: false
648
707
 
649
708
  Style/RescueModifier:
650
- Enabled: true
709
+ Enabled: false
651
710
 
652
711
  Style/RescueStandardError:
653
712
  Enabled: true
@@ -657,74 +716,74 @@ Style/SafeNavigation:
657
716
  Enabled: true
658
717
 
659
718
  Style/SelfAssignment:
660
- Enabled: true
719
+ Enabled: false
661
720
 
662
721
  Style/Semicolon:
663
- Enabled: true
722
+ Enabled: false
664
723
 
665
724
  Style/SignalException:
666
725
  Enabled: true
667
726
 
668
727
  Style/SingleLineMethods:
669
- Enabled: true
728
+ Enabled: false
670
729
 
671
730
  Style/SpecialGlobalVars:
672
- Enabled: true
731
+ Enabled: false
673
732
 
674
733
  Style/StderrPuts:
675
- Enabled: true
734
+ Enabled: false
676
735
 
677
736
  Style/SymbolArray:
678
- Enabled: true
737
+ Enabled: false
679
738
 
680
739
  Style/StringLiterals:
681
- Enabled: true
740
+ Enabled: false
682
741
 
683
742
  Style/StringLiteralsInInterpolation:
684
- Enabled: true
743
+ Enabled: false
685
744
 
686
745
  Style/SymbolLiteral:
687
- Enabled: true
746
+ Enabled: false
688
747
 
689
748
  Style/SymbolProc:
690
- Enabled: true
749
+ Enabled: false
691
750
 
692
751
  Style/TernaryParentheses:
693
- Enabled: true
752
+ Enabled: false
694
753
 
695
754
  Style/TrailingCommaInArguments:
696
755
  Enabled: true
697
756
 
698
757
  Style/TrailingCommaInArrayLiteral:
699
- Enabled: true
758
+ Enabled: false
700
759
 
701
760
  Style/TrailingCommaInHashLiteral:
702
761
  Enabled: true
703
762
  EnforcedStyleForMultiline: comma
704
763
 
705
764
  Style/TrailingUnderscoreVariable:
706
- Enabled: true
765
+ Enabled: false
707
766
 
708
767
  Style/TrivialAccessors:
709
- Enabled: true
768
+ Enabled: false
710
769
 
711
770
  Style/UnlessElse:
712
- Enabled: true
771
+ Enabled: false
713
772
 
714
773
  Style/UnpackFirst:
715
- Enabled: true
774
+ Enabled: false
716
775
 
717
776
  Style/WhileUntilDo:
718
- Enabled: true
777
+ Enabled: false
719
778
 
720
779
  Style/WhileUntilModifier:
721
- Enabled: true
780
+ Enabled: false
722
781
 
723
782
  Style/WordArray:
724
- Enabled: true
783
+ Enabled: false
725
784
 
726
785
  Style/YodaCondition:
727
- Enabled: true
786
+ Enabled: false
728
787
 
729
788
  Style/ZeroLengthPredicate:
730
789
  Enabled: true
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-amagi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cloudport Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-29 00:00:00.000000000 Z
11
+ date: 2022-07-12 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: amagi rubocop rules
14
14
  email: cloudport.team@amagi.com
@@ -16,6 +16,9 @@ executables: []
16
16
  extensions: []
17
17
  extra_rdoc_files: []
18
18
  files:
19
+ - lib/cops/duplicate_constant_cop.rb
20
+ - lib/cops/logger_format_cop.rb
21
+ - lib/cops/readme.md
19
22
  - rubocop.yml
20
23
  homepage: https://github.com/amagimedia/rubocop-amagi
21
24
  licenses:
@@ -36,7 +39,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
36
39
  - !ruby/object:Gem::Version
37
40
  version: '0'
38
41
  requirements: []
39
- rubygems_version: 3.2.26
42
+ rubygems_version: 3.2.22
40
43
  signing_key:
41
44
  specification_version: 4
42
45
  summary: amagi rubocop rules