hubbado-style 1.9.0 → 1.10.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.
- checksums.yaml +4 -4
- data/ChangeLog.md +14 -0
- data/default.yml +5 -2
- data/hubbado-style.gemspec +1 -1
- data/lib/hubbado/style/multiline_method_argument_line_breaks.rb +20 -0
- data/lib/hubbado/style.rb +1 -0
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: aef7908b85f5ddac6f278227fb16d6c6f5bdc094049afbdb256944fa147ec0fc
|
|
4
|
+
data.tar.gz: '09856970e6e6c46e15862af65b11febdf6d2539c88b1008b396666a2c2ffc4d5'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0dd975fa210b2f6ef3758871520510845aaa0c8e8f62943e031224a03fbe8b86059b671380469b791ea1d3b9afa29328b1195abd732c1c07595b2602a29c5b82
|
|
7
|
+
data.tar.gz: 6fecac2a901935077870c08c417f0f479c6cf93fd48ff2d7ec0f072e351438be3e4e843e3b89ad488e4b3e00c1309fc2b86bf1812aa99e5ef80899945b3a844a
|
data/ChangeLog.md
CHANGED
|
@@ -4,6 +4,20 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
|
5
5
|
and this project adheres to [Semantic Versioning](http://semver.org/).
|
|
6
6
|
|
|
7
|
+
# [1.10.0 - 2026-11-20]
|
|
8
|
+
## Changed
|
|
9
|
+
- Hubbado/MultilineMethodArgumentLineBreaks replaces
|
|
10
|
+
Layout/MultilineMethodArgumentLineBreaks. It counts each keyword argument as
|
|
11
|
+
one argument also where a block argument such as `&stream` follows the
|
|
12
|
+
keywords, which RuboCop's cop does not
|
|
13
|
+
|
|
14
|
+
## Migration
|
|
15
|
+
- Rename a `.rubocop.yml` override or a disable of
|
|
16
|
+
Layout/MultilineMethodArgumentLineBreaks to
|
|
17
|
+
Hubbado/MultilineMethodArgumentLineBreaks
|
|
18
|
+
- Run `rubocop -a --only Hubbado/MultilineMethodArgumentLineBreaks`. Every
|
|
19
|
+
offence can be corrected automatically
|
|
20
|
+
|
|
7
21
|
# [1.9.0 - 2026-11-20]
|
|
8
22
|
## Changed
|
|
9
23
|
- Layout/FirstArrayElementLineBreak, Layout/MultilineArrayLineBreaks,
|
data/default.yml
CHANGED
|
@@ -157,8 +157,7 @@ Layout/MultilineMethodCallIndentation:
|
|
|
157
157
|
IndentationWidth: 2
|
|
158
158
|
|
|
159
159
|
Layout/MultilineMethodArgumentLineBreaks:
|
|
160
|
-
Enabled:
|
|
161
|
-
AllowMultilineFinalElement: true
|
|
160
|
+
Enabled: false
|
|
162
161
|
|
|
163
162
|
Layout/MultilineMethodParameterLineBreaks:
|
|
164
163
|
Enabled: true
|
|
@@ -186,6 +185,10 @@ Lint/ConstantDefinitionInBlock:
|
|
|
186
185
|
Lint/UnusedMethodArgument:
|
|
187
186
|
Enabled: false
|
|
188
187
|
|
|
188
|
+
Hubbado/MultilineMethodArgumentLineBreaks:
|
|
189
|
+
Enabled: true
|
|
190
|
+
AllowMultilineFinalElement: true
|
|
191
|
+
|
|
189
192
|
Hubbado/UnusedMethodArgument:
|
|
190
193
|
Enabled: true
|
|
191
194
|
Severity: warning
|
data/hubbado-style.gemspec
CHANGED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Puts each argument of a multi-line call on its own line, counting each keyword argument as one,
|
|
2
|
+
# also where a block argument such as `&stream` follows the keywords
|
|
3
|
+
module RuboCop
|
|
4
|
+
module Cop
|
|
5
|
+
module Hubbado
|
|
6
|
+
class MultilineMethodArgumentLineBreaks < Layout::MultilineMethodArgumentLineBreaks
|
|
7
|
+
def on_send(node)
|
|
8
|
+
return if node.method?(:[]=)
|
|
9
|
+
|
|
10
|
+
arguments = node.arguments.flat_map do |argument|
|
|
11
|
+
argument.hash_type? && !argument.braces? ? argument.children : [argument]
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
check_line_breaks(node, arguments, ignore_last: ignore_last_element?)
|
|
15
|
+
end
|
|
16
|
+
alias on_csend on_send
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
data/lib/hubbado/style.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: hubbado-style
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.10.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Hubbado Devs
|
|
@@ -77,6 +77,7 @@ files:
|
|
|
77
77
|
- default.yml
|
|
78
78
|
- hubbado-style.gemspec
|
|
79
79
|
- lib/hubbado/style.rb
|
|
80
|
+
- lib/hubbado/style/multiline_method_argument_line_breaks.rb
|
|
80
81
|
- lib/hubbado/style/unused_method_argument.rb
|
|
81
82
|
homepage: https://github.com/hubbado/hubbado-style
|
|
82
83
|
licenses:
|