rubocop-brands_insurance 1.4.0.pre.rc.2 → 1.4.0.pre.rc.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.adoc +0 -1
- data/config/default.yml +0 -7
- data/lib/rubocop/brands_insurance/version.rb +1 -1
- data/lib/rubocop/cop/brands_insurance_cops.rb +0 -1
- metadata +1 -4
- data/docs/cops/layout/README.adoc +0 -7
- data/docs/cops/layout/multiline_array_line_breaks/README.adoc +0 -44
- data/lib/rubocop/cop/brands_insurance/layout/multiline_array_line_breaks.rb +0 -28
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a8f11dcd441570d4e6573a18c06ec7aea8b1843c8d498b45cfdbe1e2d8ebdef0
|
4
|
+
data.tar.gz: 79cd3dd5f7cf1d32ebec7c401022f2c991ea99af5c47027bbac6f25b444931ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c8cdf895613d815d6f41bd2d318843cd652706923c48b88289c47a2dcbfe4929adb818dcc8b8e5fe9f47557253766ebc26f87f4e9b513ba65af2d76228f143b0
|
7
|
+
data.tar.gz: aa9dd85adc9a5f2a68ce2b1887409d0047c2b4f38e59268216d1b7ac49632857450423b59224ae9cb1f5b74dea130c3f460711f0809c3802837e0f158e289139
|
data/README.adoc
CHANGED
data/config/default.yml
CHANGED
@@ -1,10 +1,3 @@
|
|
1
|
-
BrandsInsurance/Layout/MultilineArrayLineBreaks:
|
2
|
-
Description: 'Fork of base Layout/MultilineArrayLineBreaks rule'
|
3
|
-
Enabled: true
|
4
|
-
VersionAdded: '1.3.0'
|
5
|
-
AllowMultilineFinalElement: true
|
6
|
-
AllowPercentArray: true
|
7
|
-
|
8
1
|
BrandsInsurance/Style/DisallowedMethods:
|
9
2
|
Description: 'Disallows the usage of `#abort` and `#tap` methods'
|
10
3
|
Enabled: true
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop-brands_insurance
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.0.pre.rc.
|
4
|
+
version: 1.4.0.pre.rc.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brands Insurance
|
@@ -35,8 +35,6 @@ files:
|
|
35
35
|
- LICENSE.txt
|
36
36
|
- README.adoc
|
37
37
|
- config/default.yml
|
38
|
-
- docs/cops/layout/README.adoc
|
39
|
-
- docs/cops/layout/multiline_array_line_breaks/README.adoc
|
40
38
|
- docs/cops/style/README.adoc
|
41
39
|
- docs/cops/style/disallowed_methods/README.adoc
|
42
40
|
- lib/rubocop-brands_insurance.rb
|
@@ -46,7 +44,6 @@ files:
|
|
46
44
|
- lib/rubocop/cop/brands_insurance/generator.rb
|
47
45
|
- lib/rubocop/cop/brands_insurance/generator/cop_readme_injector.rb
|
48
46
|
- lib/rubocop/cop/brands_insurance/generator/dept_readme_injector.rb
|
49
|
-
- lib/rubocop/cop/brands_insurance/layout/multiline_array_line_breaks.rb
|
50
47
|
- lib/rubocop/cop/brands_insurance/style/disallowed_methods.rb
|
51
48
|
- lib/rubocop/cop/brands_insurance_cops.rb
|
52
49
|
homepage: https://github.com/BrandsInsurance/expert-chainsaw/
|
@@ -1,44 +0,0 @@
|
|
1
|
-
= ``Layout/MultilineArrayLineBreaks``
|
2
|
-
|
3
|
-
== Description
|
4
|
-
|
5
|
-
Extends the built-in link:https://docs.rubocop.org/rubocop/1.49/cops_layout.html#layoutmultilinearraylinebreaks[``Layout/MultilineArrayLineBreaks``]
|
6
|
-
and adds the ``AllowPercentArray`` option
|
7
|
-
|
8
|
-
== Examples
|
9
|
-
|
10
|
-
[source,ruby]
|
11
|
-
----
|
12
|
-
# bad
|
13
|
-
%w[
|
14
|
-
1
|
15
|
-
2
|
16
|
-
3
|
17
|
-
4
|
18
|
-
]
|
19
|
-
|
20
|
-
# good
|
21
|
-
%w[
|
22
|
-
1 2
|
23
|
-
3 4
|
24
|
-
]
|
25
|
-
----
|
26
|
-
|
27
|
-
== Configurable Attributes
|
28
|
-
|
29
|
-
|===
|
30
|
-
|Name |Default value |Configurable values
|
31
|
-
|
32
|
-
|AllowMultilineFinalElement
|
33
|
-
|false
|
34
|
-
|Boolean
|
35
|
-
|
36
|
-
|AllowPercentArray
|
37
|
-
|false
|
38
|
-
|Boolean
|
39
|
-
|
40
|
-
|===
|
41
|
-
|
42
|
-
== References
|
43
|
-
|
44
|
-
https://github.com/BrandsInsurance/expert-chainsaw/issues/1032
|
@@ -1,28 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module RuboCop
|
4
|
-
module Cop
|
5
|
-
module BrandsInsurance
|
6
|
-
module Layout
|
7
|
-
class MultilineArrayLineBreaks < RuboCop::Cop::Layout::MultilineArrayLineBreaks
|
8
|
-
# @see super
|
9
|
-
def on_array(node)
|
10
|
-
return if allowed_percent_array?(node)
|
11
|
-
|
12
|
-
super
|
13
|
-
end
|
14
|
-
|
15
|
-
private
|
16
|
-
|
17
|
-
# Check conig option
|
18
|
-
#
|
19
|
-
# @return [Boolean]
|
20
|
-
#
|
21
|
-
def allowed_percent_array?(node)
|
22
|
-
cop_config.fetch('AllowPercentArray', true) && node.percent_literal?
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|