orenns-rubocop-rails 1.0.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.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/rubocop.yml +342 -0
  3. metadata +81 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 4201bafe03b13303802f391c32d1c84ba272b8a73b071d2dfb2a28f19c58209a
4
+ data.tar.gz: b0e8fab2b364a71f12aa59938f8ed842b85b137c9616257f7529bf08c419c2b4
5
+ SHA512:
6
+ metadata.gz: ca2535003d44fbb04eeb0960d5da5a5220ab81f1c13d2f511e607d17fb4b7533458687a0d1fe6eb00ca66a553cd420d2e43c3b0e9dec23bf3eed8f08afdc5127
7
+ data.tar.gz: 23af8b6d569700249bfe56e7ea461c52113165472e04e56d90abeed16508176c91b98bd2b46ca173d0ef982ec58f9fc25cb297384a8c002ceb292f2c3aafa1f6
data/rubocop.yml ADDED
@@ -0,0 +1,342 @@
1
+ plugins:
2
+ - rubocop-performance
3
+ - rubocop-rails
4
+
5
+ inherit_mode:
6
+ merge:
7
+ - Exclude
8
+
9
+ AllCops:
10
+ NewCops: enable
11
+ SuggestExtensions: false
12
+ Exclude:
13
+ - "data/**/*"
14
+ - "db/**/*"
15
+
16
+ # All cops except your using extensions are disabled by default.
17
+ Bundler:
18
+ Enabled: false
19
+ Gemspec:
20
+ Enabled: false
21
+ Layout:
22
+ Enabled: false
23
+ Lint:
24
+ Enabled: false
25
+ Metrics:
26
+ Enabled: false
27
+ Naming:
28
+ Enabled: false
29
+ Performance:
30
+ Enabled: false
31
+ Exclude:
32
+ - "test/**/*"
33
+ - "spec/**/*"
34
+ Rails:
35
+ Enabled: false
36
+ Security:
37
+ Enabled: false
38
+ Style:
39
+ Enabled: false
40
+
41
+ # Align `when` with `end`.
42
+ Layout/CaseIndentation:
43
+ Enabled: true
44
+ EnforcedStyle: end
45
+
46
+ # Align comments with method definitions.
47
+ Layout/CommentIndentation:
48
+ Enabled: true
49
+
50
+ Layout/ElseAlignment:
51
+ Enabled: true
52
+
53
+ Layout/EmptyLineAfterMagicComment:
54
+ Enabled: true
55
+
56
+ Layout/EmptyLinesAroundBlockBody:
57
+ Enabled: true
58
+
59
+ # In a regular class definition, no empty lines around the body.
60
+ Layout/EmptyLinesAroundClassBody:
61
+ Enabled: true
62
+
63
+ # In a regular method definition, no empty lines around the body.
64
+ Layout/EmptyLinesAroundMethodBody:
65
+ Enabled: true
66
+
67
+ # In a regular module definition, no empty lines around the body.
68
+ Layout/EmptyLinesAroundModuleBody:
69
+ Enabled: true
70
+
71
+ # Align `end` with the matching keyword or starting expression except for
72
+ # assignments, where it should be aligned with the LHS.
73
+ Layout/EndAlignment:
74
+ Enabled: true
75
+ EnforcedStyleAlignWith: variable
76
+
77
+ # Method definitions after `private` or `protected` isolated calls need one
78
+ # extra level of indentation.
79
+ #
80
+ # We break this rule in context, though, e.g. for private-only concerns,
81
+ # so we leave it disabled.
82
+ Layout/IndentationConsistency:
83
+ Enabled: false
84
+ EnforcedStyle: indented_internal_methods
85
+
86
+ # Detect hard tabs, no hard tabs.
87
+ Layout/IndentationStyle:
88
+ Enabled: true
89
+
90
+ # Two spaces, no tabs (for indentation).
91
+ #
92
+ # Doesn't behave properly with private-only concerns, so it's disabled.
93
+ Layout/IndentationWidth:
94
+ Enabled: false
95
+
96
+ Layout/LeadingCommentSpace:
97
+ Enabled: true
98
+
99
+ Layout/SpaceAfterColon:
100
+ Enabled: true
101
+
102
+ Layout/SpaceAfterComma:
103
+ Enabled: true
104
+
105
+ Layout/SpaceAroundEqualsInParameterDefault:
106
+ Enabled: true
107
+
108
+ Layout/SpaceAroundKeyword:
109
+ Enabled: true
110
+
111
+ # Use `foo {}` not `foo{}`.
112
+ Layout/SpaceBeforeBlockBraces:
113
+ Enabled: true
114
+
115
+ Layout/SpaceBeforeComma:
116
+ Enabled: true
117
+
118
+ Layout/SpaceBeforeFirstArg:
119
+ Enabled: true
120
+
121
+ # Use `[ a, [ b, c ] ]` not `[a, [b, c]]`
122
+ # Use `[]` not `[ ]`
123
+ Layout/SpaceInsideArrayLiteralBrackets:
124
+ Enabled: true
125
+ EnforcedStyle: no_space
126
+ EnforcedStyleForEmptyBrackets: no_space
127
+
128
+ # Use `%w[ a b ]` not `%w[ a b ]`.
129
+ Layout/SpaceInsideArrayPercentLiteral:
130
+ Enabled: true
131
+
132
+ # Use `foo { bar }` not `foo {bar}`.
133
+ # Use `foo { }` not `foo {}`.
134
+ Layout/SpaceInsideBlockBraces:
135
+ Enabled: true
136
+ EnforcedStyleForEmptyBraces: space
137
+
138
+ # Use `{ a: 1 }` not `{a:1}`.
139
+ # Use `{}` not `{ }`.
140
+ Layout/SpaceInsideHashLiteralBraces:
141
+ Enabled: true
142
+ EnforcedStyle: space
143
+ EnforcedStyleForEmptyBraces: no_space
144
+
145
+ # Use `foo(bar)` not `foo( bar )`
146
+ Layout/SpaceInsideParens:
147
+ Enabled: true
148
+
149
+ # Requiring a space is not yet supported as of 0.59.2
150
+ # Use `%w[ foo ]` not `%w[foo]`
151
+ Layout/SpaceInsidePercentLiteralDelimiters:
152
+ Enabled: false
153
+ #EnforcedStyle: space
154
+
155
+ # Use `hash[:key]` not `hash[ :key ]`
156
+ Layout/SpaceInsideReferenceBrackets:
157
+ Enabled: true
158
+
159
+ # Blank lines should not have any spaces.
160
+ Layout/TrailingEmptyLines:
161
+ Enabled: true
162
+
163
+ # No trailing whitespace.
164
+ Layout/TrailingWhitespace:
165
+ Enabled: true
166
+
167
+ Lint/RedundantStringCoercion:
168
+ Enabled: true
169
+
170
+ # Use my_method(my_arg) not my_method( my_arg ) or my_method my_arg.
171
+ Lint/RequireParentheses:
172
+ Enabled: true
173
+
174
+ Lint/UriEscapeUnescape:
175
+ Enabled: true
176
+
177
+ Performance/FlatMap:
178
+ Enabled: true
179
+
180
+ # Prefer assert_not over assert !
181
+ Rails/AssertNot:
182
+ Include:
183
+ - "test/**/*"
184
+ - "spec/**/*"
185
+
186
+ # Prefer assert_not_x over refute_x
187
+ Rails/RefuteMethods:
188
+ Include:
189
+ - "test/**/*"
190
+ - "spec/**/*"
191
+
192
+ # We generally prefer &&/|| but like low-precedence and/or in context
193
+ Style/AndOr:
194
+ Enabled: false
195
+
196
+ # Prefer Foo.method over Foo::method
197
+ Style/ColonMethodCall:
198
+ Enabled: true
199
+
200
+ Style/DefWithParentheses:
201
+ Enabled: true
202
+
203
+ # Use Ruby >= 1.9 syntax for hashes. Prefer { a: :b } over { :a => :b }.
204
+ Style/HashSyntax:
205
+ Enabled: true
206
+ EnforcedShorthandSyntax: either
207
+
208
+ # Defining a method with parameters needs parentheses.
209
+ Style/MethodDefParentheses:
210
+ Enabled: true
211
+
212
+ Style/ParenthesesAroundCondition:
213
+ Enabled: true
214
+
215
+ Style/PercentLiteralDelimiters:
216
+ Enabled: true
217
+ PreferredDelimiters:
218
+ default: "()"
219
+ "%i": "[]"
220
+ "%I": "[]"
221
+ "%r": "{}"
222
+ "%w": "[]"
223
+ "%W": "[]"
224
+
225
+ # Use quotes for string literals when they are enough.
226
+ Style/RedundantPercentQ:
227
+ Enabled: false
228
+
229
+ Style/RedundantReturn:
230
+ Enabled: true
231
+ AllowMultipleReturnValues: false
232
+
233
+ Style/Semicolon:
234
+ Enabled: true
235
+ AllowAsExpressionSeparator: true
236
+
237
+ Style/StabbyLambdaParentheses:
238
+ Enabled: true
239
+
240
+ # Use `"foo"` not `'foo'` unless escaping is required
241
+ Style/StringLiterals:
242
+ Enabled: true
243
+ EnforcedStyle: single_quotes
244
+ Include:
245
+ - "app/**/*"
246
+ - "config/**/*"
247
+ - "lib/**/*"
248
+ - "test/**/*"
249
+ - "spec/**/*"
250
+ - "Gemfile"
251
+
252
+ Style/TrailingCommaInArrayLiteral:
253
+ Enabled: true
254
+
255
+ Style/TrailingCommaInHashLiteral:
256
+ Enabled: true
257
+
258
+ Layout/EmptyLinesAroundAccessModifier:
259
+ Enabled: true
260
+
261
+ Layout/EmptyLineBetweenDefs:
262
+ Enabled: true
263
+
264
+ Layout/LineLength:
265
+ Enabled: true
266
+ Exclude:
267
+ - "db/**/*"
268
+ - "config/routes.rb"
269
+ - "bin/**/*"
270
+
271
+ Metrics/AbcSize:
272
+ Enabled: true
273
+ Max: 17
274
+ Exclude:
275
+ - "db/**/*"
276
+ - "config/routes.rb"
277
+ - "bin/**/*"
278
+
279
+ Metrics/BlockLength:
280
+ Enabled: true
281
+ Exclude:
282
+ - "db/**/*"
283
+ - "spec/**/*"
284
+ - "config/routes.rb"
285
+ - "bin/**/*"
286
+
287
+ Metrics/BlockNesting:
288
+ Enabled: true
289
+ Max: 1
290
+ Exclude:
291
+ - "db/**/*"
292
+ - "config/routes.rb"
293
+ - "bin/**/*"
294
+
295
+ Metrics/CyclomaticComplexity:
296
+ Enabled: true
297
+ Exclude:
298
+ - "db/**/*"
299
+ - "config/routes.rb"
300
+ - "bin/**/*"
301
+
302
+ Metrics/MethodLength:
303
+ Enabled: true
304
+ Max: 8
305
+ Exclude:
306
+ - "db/**/*"
307
+ - "config/routes.rb"
308
+ - "bin/**/*"
309
+
310
+ Metrics/PerceivedComplexity:
311
+ Enabled: true
312
+ Exclude:
313
+ - "db/**/*"
314
+ - "config/routes.rb"
315
+ - "bin/**/*"
316
+
317
+ Rails/HasManyOrHasOneDependent:
318
+ Enabled: false
319
+
320
+ Rails/HasAndBelongsToMany:
321
+ Enabled: false
322
+
323
+ Rails/UniqueValidationWithoutIndex:
324
+ Enabled: false
325
+
326
+ Rails/Output:
327
+ Exclude:
328
+ - 'db/**/*'
329
+
330
+ Style/Documentation:
331
+ Enabled: false
332
+
333
+ Style/FrozenStringLiteralComment:
334
+ Enabled: false
335
+
336
+ Style/MethodCallWithArgsParentheses:
337
+ Enabled: true
338
+ EnforcedStyle: omit_parentheses
339
+
340
+ Layout/EmptyLineAfterGuardClause:
341
+ Enabled: true
342
+
metadata ADDED
@@ -0,0 +1,81 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: orenns-rubocop-rails
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Javier Ornelas Valles
8
+ bindir: bin
9
+ cert_chain: []
10
+ date: 2025-03-20 00:00:00.000000000 Z
11
+ dependencies:
12
+ - !ruby/object:Gem::Dependency
13
+ name: rubocop
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - ">="
17
+ - !ruby/object:Gem::Version
18
+ version: '1.74'
19
+ type: :runtime
20
+ prerelease: false
21
+ version_requirements: !ruby/object:Gem::Requirement
22
+ requirements:
23
+ - - ">="
24
+ - !ruby/object:Gem::Version
25
+ version: '1.74'
26
+ - !ruby/object:Gem::Dependency
27
+ name: rubocop-performance
28
+ requirement: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: '1.24'
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: '1.24'
40
+ - !ruby/object:Gem::Dependency
41
+ name: rubocop-rails
42
+ requirement: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: '2.30'
47
+ type: :runtime
48
+ prerelease: false
49
+ version_requirements: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: '2.30'
54
+ email: javier.ornelasv@gmail.com
55
+ executables: []
56
+ extensions: []
57
+ extra_rdoc_files: []
58
+ files:
59
+ - rubocop.yml
60
+ homepage: https://github.com/JavierOrnelasV/orenns-rubocop-rails
61
+ licenses:
62
+ - MIT
63
+ metadata: {}
64
+ rdoc_options: []
65
+ require_paths:
66
+ - lib
67
+ required_ruby_version: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - ">="
70
+ - !ruby/object:Gem::Version
71
+ version: 2.4.0
72
+ required_rubygems_version: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ requirements: []
78
+ rubygems_version: 3.6.6
79
+ specification_version: 4
80
+ summary: Orenn's Ruby styling for Rails
81
+ test_files: []