sharp_style_rubocop 0.1.1 → 0.1.3
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/config/default.yml +77 -0
- data/lib/sharp_style_rubocop/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 331e11ff5cfa1a0d2a9014cc3e4a76c8d36dcddf9c70011bc65153ea2abd66fc
|
|
4
|
+
data.tar.gz: 1596218f4ff1c1c71f464ae125c1633f542c355ae7eb2a553b263a6ddace1e72
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 03e6d091a2bae3680440f64336b4ff1240f542a9a15108b521ef9c99bb9debfb997e3b1ddb38ab50a782cb2b4634b3ec3bcd41a9c1fb4491f02c86a93219b3de
|
|
7
|
+
data.tar.gz: 5a7a67274a079711acd64fb52566e97c99a2c068b57808d1e180b1da894b4265a83ce07645b239427d440acc30c53b14aad0c66b384b3aec2ccc2f099dd9db0c
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
+
## [0.1.3] - 2026-10-29
|
|
4
|
+
|
|
5
|
+
- Exclude `db/migrate/**/*`, `db/schema.rb` and `db/*_schema.rb` from `Style/MethodCallWithArgsParentheses` since Rails generates them without parentheses.
|
|
6
|
+
- Allow `send_data`, `send_file`, `flunk`, and `skip` without parentheses in `Style/MethodCallWithArgsParentheses`.
|
|
7
|
+
- Remove `describe` from the RSpec `AllowedMethods` in `Style/MethodCallWithArgsParentheses`.
|
|
8
|
+
- Add RSpec, RSpec::Matchers, Rails, ActiveSupport, and Rails middleware receivers to `Style/MethodCallWithArgsParentheses` `AllowedReceivers`.
|
|
9
|
+
|
|
10
|
+
## [0.1.2] - 2026-10-29
|
|
11
|
+
|
|
12
|
+
- Enable `Layout/FirstMethodArgumentLineBreak`, `Layout/FirstMethodParameterLineBreak`, `Layout/MultilineMethodArgumentLineBreaks`, and `Layout/MultilineMethodParameterLineBreaks` for readability.
|
|
13
|
+
- Enable `Style/MethodCallWithArgsParentheses`, allowing Kernel keyword-like methods and common Rails, RSpec, Minitest, and gemspec DSL methods.
|
|
14
|
+
|
|
3
15
|
## [0.1.1] - 2026-10-28
|
|
4
16
|
|
|
5
17
|
- Set `Layout/ArgumentAlignment` to `with_fixed_indentation` as a Preview default for RuboCop 2.0.
|
data/config/default.yml
CHANGED
|
@@ -76,6 +76,14 @@ Layout/FirstArrayElementIndentation:
|
|
|
76
76
|
Layout/FirstHashElementIndentation:
|
|
77
77
|
EnforcedStyle: consistent
|
|
78
78
|
|
|
79
|
+
# Enabled for readability. Counterpart Layout/MultilineMethodArgumentLineBreaks is also needed.
|
|
80
|
+
Layout/FirstMethodArgumentLineBreak:
|
|
81
|
+
Enabled: true
|
|
82
|
+
|
|
83
|
+
# Enabled for readability. Counterpart Layout/MultilineMethodParameterLineBreaks is also needed.
|
|
84
|
+
Layout/FirstMethodParameterLineBreak:
|
|
85
|
+
Enabled: true
|
|
86
|
+
|
|
79
87
|
# Key is default for both, but also allow table alignment
|
|
80
88
|
Layout/HashAlignment:
|
|
81
89
|
EnforcedHashRocketStyle:
|
|
@@ -85,10 +93,18 @@ Layout/HashAlignment:
|
|
|
85
93
|
- key
|
|
86
94
|
- table
|
|
87
95
|
|
|
96
|
+
# Enabled for readability. Counterpart Layout/FirstMethodArgumentLineBreak is also needed.
|
|
97
|
+
Layout/MultilineMethodArgumentLineBreaks:
|
|
98
|
+
Enabled: true
|
|
99
|
+
|
|
88
100
|
# Prevent wasting whitespace
|
|
89
101
|
Layout/MultilineMethodCallIndentation:
|
|
90
102
|
EnforcedStyle: indented
|
|
91
103
|
|
|
104
|
+
# Enabled for readability. Counterpart Layout/FirstMethodParameterLineBreak is also needed.
|
|
105
|
+
Layout/MultilineMethodParameterLineBreaks:
|
|
106
|
+
Enabled: true
|
|
107
|
+
|
|
92
108
|
# Prevent wasting whitespace
|
|
93
109
|
Layout/MultilineOperationIndentation:
|
|
94
110
|
EnforcedStyle: indented
|
|
@@ -246,6 +262,67 @@ Style/IfUnlessModifier:
|
|
|
246
262
|
Style/Lambda:
|
|
247
263
|
Enabled: false
|
|
248
264
|
|
|
265
|
+
# Prefer parentheses, IgnoreMacros (default) already allows class-body and
|
|
266
|
+
# block-level DSLs such as attr_*, Gemfile, Rakefile, and RSpec's it/let.
|
|
267
|
+
# These are keyword-like methods and DSLs called with a receiver or in a def.
|
|
268
|
+
Style/MethodCallWithArgsParentheses:
|
|
269
|
+
Enabled: true
|
|
270
|
+
# Rails migrations and schema.rb are generated without parentheses
|
|
271
|
+
Exclude:
|
|
272
|
+
- 'db/migrate/**/*'
|
|
273
|
+
- 'db/schema.rb'
|
|
274
|
+
- 'db/*_schema.rb'
|
|
275
|
+
AllowedMethods:
|
|
276
|
+
# Gemspec
|
|
277
|
+
- add_dependency
|
|
278
|
+
# Kernel
|
|
279
|
+
- abort
|
|
280
|
+
- exit
|
|
281
|
+
- fail
|
|
282
|
+
- p
|
|
283
|
+
- pp
|
|
284
|
+
- print
|
|
285
|
+
- puts
|
|
286
|
+
- raise
|
|
287
|
+
- require
|
|
288
|
+
- require_relative
|
|
289
|
+
- throw
|
|
290
|
+
- warn
|
|
291
|
+
- yield
|
|
292
|
+
# Rails controllers
|
|
293
|
+
- head
|
|
294
|
+
- redirect_to
|
|
295
|
+
- render
|
|
296
|
+
- send_data
|
|
297
|
+
- send_file
|
|
298
|
+
# Minitest
|
|
299
|
+
- flunk
|
|
300
|
+
- skip
|
|
301
|
+
# RSpec
|
|
302
|
+
- and
|
|
303
|
+
- not_to
|
|
304
|
+
- or
|
|
305
|
+
- to
|
|
306
|
+
- to_not
|
|
307
|
+
AllowedPatterns:
|
|
308
|
+
# Minitest
|
|
309
|
+
- ^(assert|refute)(_|$)
|
|
310
|
+
- ^(must|wont)_
|
|
311
|
+
# AllowedReceivers is only set when the installed RuboCop supports it (rubocop/rubocop#16193)
|
|
312
|
+
<% if RuboCop::ConfigLoader.default_configuration.for_cop("Style/MethodCallWithArgsParentheses").key?("AllowedReceivers") %>
|
|
313
|
+
AllowedReceivers:
|
|
314
|
+
# RSpec
|
|
315
|
+
- RSpec
|
|
316
|
+
- RSpec::Matchers
|
|
317
|
+
- config
|
|
318
|
+
# Rails
|
|
319
|
+
- ActiveSupport
|
|
320
|
+
- ActiveSupport::Notifications
|
|
321
|
+
- Rails.application.config
|
|
322
|
+
- Rails.application.config.middleware
|
|
323
|
+
- config.middleware
|
|
324
|
+
<% end %>
|
|
325
|
+
|
|
249
326
|
# Rubocop 2.0
|
|
250
327
|
Style/ModuleFunction:
|
|
251
328
|
Enabled: false
|