rubocop-picket 0.1.0

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.
File without changes
File without changes
data/config/rails.yml ADDED
@@ -0,0 +1,501 @@
1
+ inherit_from:
2
+ - ./rails_pending.yml
3
+
4
+ inherit_mode:
5
+ merge:
6
+ - Exclude
7
+
8
+ require:
9
+ - rubocop-picket-rails
10
+ - rubocop-capybara
11
+ - rubocop-factory_bot
12
+ - rubocop-rails
13
+ - rubocop-rails-accessibility
14
+
15
+ # rubocop-capybara
16
+
17
+ Capybara:
18
+ Enabled: true
19
+
20
+ Capybara/ClickLinkOrButtonStyle:
21
+ Enabled: false
22
+
23
+ Capybara/CurrentPathExpectation:
24
+ Enabled: true
25
+
26
+ Capybara/MatchStyle:
27
+ Enabled: true
28
+
29
+ Capybara/NegationMatcher:
30
+ Enabled: true
31
+
32
+ Capybara/RedundantWithinFind:
33
+ Enabled: true
34
+
35
+ Capybara/SpecificActions:
36
+ Enabled: true
37
+
38
+ Capybara/SpecificFinders:
39
+ Enabled: true
40
+
41
+ Capybara/SpecificMatcher:
42
+ Enabled: true
43
+
44
+ Capybara/VisibilityMatcher:
45
+ Enabled: true
46
+
47
+ Capybara/RSpec:
48
+ Enabled: true
49
+
50
+ Capybara/RSpec/HaveSelector:
51
+ Enabled: true
52
+
53
+ Capybara/RSpec/PredicateMatcher:
54
+ Enabled: true
55
+
56
+ # rubocop-factory_bot
57
+
58
+ FactoryBot:
59
+ Enabled: true
60
+
61
+ FactoryBot/AssociationStyle:
62
+ Enabled: true
63
+
64
+ FactoryBot/AttributeDefinedStatically:
65
+ Enabled: true
66
+
67
+ FactoryBot/ConsistentParenthesesStyle:
68
+ Enabled: true
69
+
70
+ FactoryBot/CreateList:
71
+ Enabled: true
72
+
73
+ FactoryBot/ExcessiveCreateList:
74
+ Enabled: true
75
+
76
+ FactoryBot/FactoryAssociationWithStrategy:
77
+ Enabled: true
78
+
79
+ FactoryBot/FactoryClassName:
80
+ Enabled: true
81
+
82
+ FactoryBot/FactoryNameStyle:
83
+ Enabled: true
84
+
85
+ FactoryBot/IdSequence:
86
+ Enabled: true
87
+
88
+ FactoryBot/RedundantFactoryOption:
89
+ Enabled: true
90
+
91
+ FactoryBot/SyntaxMethods:
92
+ Enabled: true
93
+
94
+ # rubocop-rails
95
+
96
+ Rails:
97
+ Enabled: true
98
+
99
+ Rails/ActionControllerFlashBeforeRender:
100
+ Enabled: true
101
+
102
+ Rails/ActionControllerTestCase:
103
+ Enabled: true
104
+
105
+ Rails/ActionFilter:
106
+ Enabled: false
107
+
108
+ Rails/ActionOrder:
109
+ Enabled: true
110
+
111
+ Rails/ActiveRecordAliases:
112
+ Enabled: true
113
+
114
+ Rails/ActiveRecordCallbacksOrder:
115
+ Enabled: true
116
+
117
+ Rails/ActiveRecordOverride:
118
+ Enabled: true
119
+
120
+ Rails/ActiveSupportAliases:
121
+ Enabled: true
122
+
123
+ Rails/ActiveSupportOnLoad:
124
+ Enabled: true
125
+
126
+ Rails/AddColumnIndex:
127
+ Enabled: true
128
+
129
+ Rails/AfterCommitOverride:
130
+ Enabled: true
131
+
132
+ Rails/ApplicationController:
133
+ Enabled: true
134
+
135
+ Rails/ApplicationJob:
136
+ Enabled: true
137
+
138
+ Rails/ApplicationMailer:
139
+ Enabled: true
140
+
141
+ Rails/ApplicationRecord:
142
+ Enabled: true
143
+
144
+ Rails/ArelStar:
145
+ Enabled: true
146
+
147
+ Rails/AssertNot:
148
+ Enabled: true
149
+
150
+ Rails/AttributeDefaultBlockValue:
151
+ Enabled: true
152
+
153
+ Rails/BelongsTo:
154
+ Enabled: true
155
+
156
+ Rails/Blank:
157
+ Enabled: true
158
+
159
+ Rails/BulkChangeTable:
160
+ Enabled: true
161
+
162
+ Rails/CompactBlank:
163
+ Enabled: true
164
+
165
+ Rails/ContentTag:
166
+ Enabled: true
167
+
168
+ Rails/CreateTableWithTimestamps:
169
+ Enabled: true
170
+
171
+ Rails/DangerousColumnNames:
172
+ Enabled: true
173
+
174
+ Rails/Date:
175
+ Enabled: true
176
+
177
+ Rails/DefaultScope:
178
+ Enabled: false
179
+
180
+ Rails/Delegate:
181
+ Enabled: true
182
+
183
+ Rails/DelegateAllowBlank:
184
+ Enabled: true
185
+
186
+ Rails/DeprecatedActiveModelErrorsMethods:
187
+ Enabled: true
188
+
189
+ Rails/DotSeparatedKeys:
190
+ Enabled: true
191
+
192
+ Rails/DuplicateAssociation:
193
+ Enabled: true
194
+
195
+ Rails/DuplicateScope:
196
+ Enabled: true
197
+
198
+ Rails/DurationArithmetic:
199
+ Enabled: true
200
+
201
+ Rails/DynamicFindBy:
202
+ Enabled: true
203
+
204
+ Rails/EagerEvaluationLogMessage:
205
+ Enabled: true
206
+
207
+ Rails/EnumHash:
208
+ Enabled: true
209
+
210
+ Rails/EnumSyntax:
211
+ Enabled: true
212
+
213
+ Rails/EnumUniqueness:
214
+ Enabled: true
215
+
216
+ Rails/EnvLocal:
217
+ Enabled: true
218
+
219
+ Rails/EnvironmentComparison:
220
+ Enabled: true
221
+
222
+ Rails/EnvironmentVariableAccess:
223
+ Enabled: false
224
+
225
+ Rails/Exit:
226
+ Enabled: true
227
+
228
+ Rails/ExpandedDateRange:
229
+ Enabled: true
230
+
231
+ Rails/FilePath:
232
+ Enabled: true
233
+
234
+ Rails/FindBy:
235
+ Enabled: true
236
+
237
+ Rails/FindById:
238
+ Enabled: true
239
+
240
+ Rails/FindEach:
241
+ Enabled: true
242
+
243
+ Rails/FreezeTime:
244
+ Enabled: true
245
+
246
+ Rails/HasAndBelongsToMany:
247
+ Enabled: true
248
+
249
+ Rails/HasManyOrHasOneDependent:
250
+ Enabled: true
251
+
252
+ Rails/HelperInstanceVariable:
253
+ Enabled: true
254
+
255
+ Rails/HttpPositionalArguments:
256
+ Enabled: true
257
+
258
+ Rails/HttpStatus:
259
+ Enabled: true
260
+
261
+ Rails/I18nLazyLookup:
262
+ Enabled: true
263
+
264
+ Rails/I18nLocaleAssignment:
265
+ Enabled: true
266
+
267
+ Rails/I18nLocaleTexts:
268
+ Enabled: true
269
+
270
+ Rails/IgnoredColumnsAssignment:
271
+ Enabled: true
272
+
273
+ Rails/IgnoredSkipActionFilterOption:
274
+ Enabled: true
275
+
276
+ Rails/IndexBy:
277
+ Enabled: true
278
+
279
+ Rails/IndexWith:
280
+ Enabled: true
281
+
282
+ Rails/Inquiry:
283
+ Enabled: true
284
+
285
+ Rails/InverseOf:
286
+ Enabled: true
287
+
288
+ Rails/LexicallyScopedActionFilter:
289
+ Enabled: true
290
+
291
+ Rails/LinkToBlank:
292
+ Enabled: true
293
+
294
+ Rails/MailerName:
295
+ Enabled: true
296
+
297
+ Rails/MatchRoute:
298
+ Enabled: true
299
+
300
+ Rails/MigrationClassName:
301
+ Enabled: true
302
+
303
+ Rails/NegateInclude:
304
+ Enabled: true
305
+
306
+ Rails/NotNullColumn:
307
+ Enabled: true
308
+
309
+ Rails/OrderById:
310
+ Enabled: false
311
+
312
+ Rails/Output:
313
+ Enabled: true
314
+
315
+ Rails/OutputSafety:
316
+ Enabled: true
317
+
318
+ Rails/Pick:
319
+ Enabled: true
320
+
321
+ Rails/Pluck:
322
+ Enabled: true
323
+
324
+ Rails/PluckId:
325
+ Enabled: false
326
+
327
+ Rails/PluckInWhere:
328
+ Enabled: true
329
+
330
+ Rails/PluralizationGrammar:
331
+ Enabled: true
332
+
333
+ Rails/Presence:
334
+ Enabled: true
335
+
336
+ Rails/Present:
337
+ Enabled: true
338
+
339
+ Rails/RakeEnvironment:
340
+ Enabled: true
341
+
342
+ Rails/ReadWriteAttribute:
343
+ Enabled: true
344
+
345
+ Rails/RedundantActiveRecordAllMethod:
346
+ Enabled: true
347
+
348
+ Rails/RedundantAllowNil:
349
+ Enabled: true
350
+
351
+ Rails/RedundantForeignKey:
352
+ Enabled: true
353
+
354
+ Rails/RedundantPresenceValidationOnBelongsTo:
355
+ Enabled: true
356
+
357
+ Rails/RedundantReceiverInWithOptions:
358
+ Enabled: true
359
+
360
+ Rails/RedundantTravelBack:
361
+ Enabled: true
362
+
363
+ Rails/ReflectionClassName:
364
+ Enabled: true
365
+
366
+ Rails/RefuteMethods:
367
+ Enabled: true
368
+
369
+ Rails/RelativeDateConstant:
370
+ Enabled: true
371
+
372
+ Rails/RenderInline:
373
+ Enabled: true
374
+
375
+ Rails/RenderPlainText:
376
+ Enabled: true
377
+
378
+ Rails/RequestReferer:
379
+ Enabled: true
380
+
381
+ Rails/RequireDependency:
382
+ Enabled: false
383
+
384
+ Rails/ResponseParsedBody:
385
+ Enabled: true
386
+
387
+ Rails/ReversibleMigration:
388
+ Enabled: true
389
+
390
+ Rails/ReversibleMigrationMethodDefinition:
391
+ Enabled: false
392
+
393
+ Rails/RootJoinChain:
394
+ Enabled: true
395
+
396
+ Rails/RootPathnameMethods:
397
+ Enabled: true
398
+
399
+ Rails/RootPublicPath:
400
+ Enabled: true
401
+
402
+ Rails/SafeNavigation:
403
+ Enabled: true
404
+
405
+ Rails/SafeNavigationWithBlank:
406
+ Enabled: true
407
+
408
+ Rails/SaveBang:
409
+ Enabled: false
410
+
411
+ Rails/SchemaComment:
412
+ Enabled: false
413
+
414
+ Rails/ScopeArgs:
415
+ Enabled: true
416
+
417
+ Rails/SelectMap:
418
+ Enabled: true
419
+
420
+ Rails/ShortI18n:
421
+ Enabled: true
422
+
423
+ Rails/SkipsModelValidations:
424
+ Enabled: true
425
+
426
+ Rails/SquishedSQLHeredocs:
427
+ Enabled: true
428
+
429
+ Rails/StripHeredoc:
430
+ Enabled: true
431
+
432
+ Rails/TableNameAssignment:
433
+ Enabled: false
434
+
435
+ Rails/ThreeStateBooleanColumn:
436
+ Enabled: true
437
+
438
+ Rails/TimeZone:
439
+ Enabled: true
440
+
441
+ Rails/TimeZoneAssignment:
442
+ Enabled: true
443
+
444
+ Rails/ToFormattedS:
445
+ Enabled: true
446
+
447
+ Rails/ToSWithArgument:
448
+ Enabled: true
449
+
450
+ Rails/TopLevelHashWithIndifferentAccess:
451
+ Enabled: true
452
+
453
+ Rails/TransactionExitStatement:
454
+ Enabled: true
455
+
456
+ Rails/UniqBeforePluck:
457
+ Enabled: true
458
+
459
+ Rails/UniqueValidationWithoutIndex:
460
+ Enabled: true
461
+
462
+ Rails/UnknownEnv:
463
+ Enabled: true
464
+
465
+ Rails/UnusedIgnoredColumns:
466
+ Enabled: false
467
+
468
+ Rails/UnusedRenderContent:
469
+ Enabled: true
470
+
471
+ Rails/Validation:
472
+ Enabled: true
473
+
474
+ Rails/WhereEquals:
475
+ Enabled: true
476
+
477
+ Rails/WhereExists:
478
+ Enabled: true
479
+
480
+ Rails/WhereMissing:
481
+ Enabled: true
482
+
483
+ Rails/WhereNot:
484
+ Enabled: true
485
+
486
+ Rails/WhereNotWithMultipleConditions:
487
+ Enabled: true
488
+
489
+ Rails/WhereRange:
490
+ Enabled: true
491
+
492
+ # rubocop-rails-accessibility
493
+
494
+ RailsAccessibility/ImageHasAlt:
495
+ Enabled: true
496
+
497
+ RailsAccessibility/NoPositiveTabindex:
498
+ Enabled: true
499
+
500
+ RailsAccessibility/NoRedundantImageAlt:
501
+ Enabled: true
File without changes
File without changes
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RuboCop
4
+ module Picket
5
+ # Because RuboCop doesn't yet support plugins, we have to monkey patch in a
6
+ # bit of our configuration. Borrowed from:
7
+ # https://github.com/rubocop/rubocop-rails/blob/f36121946359615a26c9a941763abd1470693e8d/lib/rubocop/rails/inject.rb
8
+ module Inject
9
+ def self.default_defaults!
10
+ _load_config(CONFIG_DEFAULT)
11
+ end
12
+
13
+ def self.rails_defaults!
14
+ _load_config(CONFIG_RAILS)
15
+ end
16
+
17
+ def self._load_config(path)
18
+ path = path.to_s
19
+ hash = ConfigLoader.send(:load_yaml_configuration, path)
20
+ config = Config.new(hash, path).tap(&:make_excludes_absolute)
21
+ Rails.logger.debug { "configuration from #{path}" } if ConfigLoader.debug?
22
+ config = ConfigLoader.merge_with_default(config, path, unset_nil: false)
23
+ ConfigLoader.instance_variable_set(:@default_configuration, config)
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RuboCop
4
+ module Picket
5
+ module VERSION
6
+ MAJOR = 0
7
+ MINOR = 1
8
+ TINY = 0
9
+ PRE = nil
10
+
11
+ STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
12
+ end
13
+
14
+ # Returns the currently loaded version of rubocop-picket as a +Gem::Version+.
15
+ def self.gem_version
16
+ Gem::Version.new VERSION::STRING
17
+ end
18
+
19
+ # Returns the current loaded version of RuboCop Picket as a string.
20
+ def self.version
21
+ gem_version.to_s
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "picket/version"
4
+
5
+ module RuboCop
6
+ module Picket
7
+ PROJECT_ROOT = Pathname.new(__dir__).parent.parent.expand_path.freeze
8
+ CONFIG_DEFAULT = PROJECT_ROOT.join("config", "default_cops.yml").freeze
9
+ CONIG_RAILS = PROJECT_ROOT.join("config", "rails_cops.yml").freeze
10
+ end
11
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "rubocop"
4
+ require "rubocop/picket"
5
+ require "rubocop/picket/inject"
6
+
7
+ RuboCop::Picket::Inject.rails_defaults!
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "rubocop"
4
+ require "rubocop/picket"
5
+ require "rubocop/picket/inject"
6
+
7
+ RuboCop::Picket::Inject.default_defaults!
data.tar.gz.sig ADDED
@@ -0,0 +1,3 @@
1
+ b��yH�zM_ ���֚��WR6 8�v����
2
+ ?�����4���l3p �j��%�֫4DsT*5�J���U��p�^%��@�#@��Ti�:Yu9*^�
3
+ s�`PUp~��2����a�?f�l~���G�(��W<�Eo#�?���RM);��{��i%�$G��%���0���UH�nΨ�R��Kx����֠k�����(��=��~�gҥ���&Z����d�S