sharp_style_rubocop 0.1.0 → 0.1.2
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 +9 -2
- data/README.md +4 -0
- data/config/default.yml +68 -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: e25900b007681538276c65458f57da20f26ca1017763a40f413e9e6b58bcb764
|
|
4
|
+
data.tar.gz: 40e2585bc3b0b48007ef04fd1b364e912c48124916bcbfbc943f6a57bfca39bf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5fbff938af9697f3faa234adc1529c31e0dc4800bfde7bcda08469ff011a9ad10d4afbfc41207e6c61cc1ac53f66fdebee6c0adb1a1ce4c8b2808bb51031010f
|
|
7
|
+
data.tar.gz: ae37752084b65413ba056b80807b368474a941f1610d0afe58165dcb9df1c95630941c390f7eba29b16274a71368bdb594c99c5164372f6b35dfa4f2ef9e12f7
|
data/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
## [0.1.2] - 2026-10-29
|
|
4
|
+
|
|
5
|
+
- Enable `Layout/FirstMethodArgumentLineBreak`, `Layout/FirstMethodParameterLineBreak`, `Layout/MultilineMethodArgumentLineBreaks`, and `Layout/MultilineMethodParameterLineBreaks` for readability.
|
|
6
|
+
- Enable `Style/MethodCallWithArgsParentheses`, allowing Kernel keyword-like methods and common Rails, RSpec, Minitest, and gemspec DSL methods.
|
|
7
|
+
|
|
8
|
+
## [0.1.1] - 2026-10-28
|
|
9
|
+
|
|
10
|
+
- Set `Layout/ArgumentAlignment` to `with_fixed_indentation` as a Preview default for RuboCop 2.0.
|
|
11
|
+
- Disable `Naming/HeredocDelimiterNaming` as a Preview default for RuboCop 2.0.
|
|
5
12
|
|
|
6
13
|
## [0.1.0] - 2026-10-27
|
|
7
14
|
|
data/README.md
CHANGED
|
@@ -4,6 +4,10 @@ My RuboCop style, packaged as a gem so every project can share the same rules.
|
|
|
4
4
|
|
|
5
5
|
It bundles a RuboCop configuration (`config/default.yml`) along with the `rubocop-performance` and `rubocop-rspec` plugins it uses.
|
|
6
6
|
|
|
7
|
+
See the following links for information on why I chose many of these changes:
|
|
8
|
+
- [RuboCop 1.91: The Journey to 2.0 Begins](https://metaredux.com/posts/2026/09/11/rubocop-1-91.html)
|
|
9
|
+
- [Rubocop issue #15363](https://github.com/rubocop/rubocop/issues/15363)
|
|
10
|
+
|
|
7
11
|
## Installation
|
|
8
12
|
|
|
9
13
|
Add the gem to your Gemfile:
|
data/config/default.yml
CHANGED
|
@@ -48,6 +48,10 @@ Style:
|
|
|
48
48
|
Bundler/OrderedGems:
|
|
49
49
|
Enabled: true
|
|
50
50
|
|
|
51
|
+
# Rubocop 2.0
|
|
52
|
+
Layout/ArgumentAlignment:
|
|
53
|
+
EnforcedStyle: with_fixed_indentation
|
|
54
|
+
|
|
51
55
|
# Align 'when/else' with 'end', prevents wasting whitespace
|
|
52
56
|
Layout/CaseIndentation:
|
|
53
57
|
EnforcedStyle: end
|
|
@@ -72,6 +76,14 @@ Layout/FirstArrayElementIndentation:
|
|
|
72
76
|
Layout/FirstHashElementIndentation:
|
|
73
77
|
EnforcedStyle: consistent
|
|
74
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
|
+
|
|
75
87
|
# Key is default for both, but also allow table alignment
|
|
76
88
|
Layout/HashAlignment:
|
|
77
89
|
EnforcedHashRocketStyle:
|
|
@@ -81,10 +93,18 @@ Layout/HashAlignment:
|
|
|
81
93
|
- key
|
|
82
94
|
- table
|
|
83
95
|
|
|
96
|
+
# Enabled for readability. Counterpart Layout/FirstMethodArgumentLineBreak is also needed.
|
|
97
|
+
Layout/MultilineMethodArgumentLineBreaks:
|
|
98
|
+
Enabled: true
|
|
99
|
+
|
|
84
100
|
# Prevent wasting whitespace
|
|
85
101
|
Layout/MultilineMethodCallIndentation:
|
|
86
102
|
EnforcedStyle: indented
|
|
87
103
|
|
|
104
|
+
# Enabled for readability. Counterpart Layout/FirstMethodParameterLineBreak is also needed.
|
|
105
|
+
Layout/MultilineMethodParameterLineBreaks:
|
|
106
|
+
Enabled: true
|
|
107
|
+
|
|
88
108
|
# Prevent wasting whitespace
|
|
89
109
|
Layout/MultilineOperationIndentation:
|
|
90
110
|
EnforcedStyle: indented
|
|
@@ -158,6 +178,10 @@ Metrics/ParameterLists:
|
|
|
158
178
|
Metrics/PerceivedComplexity:
|
|
159
179
|
Max: 12
|
|
160
180
|
|
|
181
|
+
# Rubocop 2.0
|
|
182
|
+
Naming/HeredocDelimiterNaming:
|
|
183
|
+
Enabled: false
|
|
184
|
+
|
|
161
185
|
# Be kind
|
|
162
186
|
Naming/InclusiveLanguage:
|
|
163
187
|
Enabled: true
|
|
@@ -238,6 +262,50 @@ Style/IfUnlessModifier:
|
|
|
238
262
|
Style/Lambda:
|
|
239
263
|
Enabled: false
|
|
240
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
|
+
AllowedMethods:
|
|
271
|
+
# Gemspec
|
|
272
|
+
- add_dependency
|
|
273
|
+
# Kernel
|
|
274
|
+
- abort
|
|
275
|
+
- exit
|
|
276
|
+
- fail
|
|
277
|
+
- p
|
|
278
|
+
- pp
|
|
279
|
+
- print
|
|
280
|
+
- puts
|
|
281
|
+
- raise
|
|
282
|
+
- require
|
|
283
|
+
- require_relative
|
|
284
|
+
- throw
|
|
285
|
+
- warn
|
|
286
|
+
- yield
|
|
287
|
+
# Rails controllers
|
|
288
|
+
- head
|
|
289
|
+
- redirect_to
|
|
290
|
+
- render
|
|
291
|
+
# RSpec
|
|
292
|
+
- and
|
|
293
|
+
- describe
|
|
294
|
+
- not_to
|
|
295
|
+
- or
|
|
296
|
+
- to
|
|
297
|
+
- to_not
|
|
298
|
+
AllowedPatterns:
|
|
299
|
+
# Minitest
|
|
300
|
+
- ^(assert|refute)(_|$)
|
|
301
|
+
- ^(must|wont)_
|
|
302
|
+
# AllowedReceivers is only set when the installed RuboCop supports it (rubocop/rubocop#16193)
|
|
303
|
+
<% if RuboCop::ConfigLoader.default_configuration.for_cop("Style/MethodCallWithArgsParentheses").key?("AllowedReceivers") %>
|
|
304
|
+
AllowedReceivers:
|
|
305
|
+
# RSpec.configure block
|
|
306
|
+
- config
|
|
307
|
+
<% end %>
|
|
308
|
+
|
|
241
309
|
# Rubocop 2.0
|
|
242
310
|
Style/ModuleFunction:
|
|
243
311
|
Enabled: false
|