ruboclean 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +2 -2
- data/.rubocop.yml +78 -0
- data/Gemfile.lock +9 -9
- data/README.md +1 -1
- data/lib/ruboclean/grouper.rb +3 -3
- data/lib/ruboclean/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f1cfe738ba362d670fed8004290f7f8953620c6aeada68b505603f8d858e5cf6
|
4
|
+
data.tar.gz: 24d77678bd60fc6e71418ad9f8ab44d30353a162d3c0a86588eb7ee8948b15ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fc1a89179e6c16677bb6188e6f2a90c48797bf80157dd1ab1d6833e9f4b9ed78b3877e890433c982dfd08013db56123c55aafa9e01aec36f454428b45299b751
|
7
|
+
data.tar.gz: 58ba7d50f237c17fa81253961603649ce5d6ddb8165d697770dbc2090ec2f13d3de8dc5d1f34fa2ed1e0eb464602335e8f52d7afd771245f68be2f9d4e80fc31
|
data/.github/workflows/ci.yml
CHANGED
@@ -4,7 +4,7 @@ env:
|
|
4
4
|
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
|
5
5
|
|
6
6
|
name: Continuous Integration
|
7
|
-
on: [pull_request]
|
7
|
+
on: [push, pull_request]
|
8
8
|
|
9
9
|
jobs:
|
10
10
|
test:
|
@@ -13,7 +13,7 @@ jobs:
|
|
13
13
|
steps:
|
14
14
|
- uses: actions/checkout@v1
|
15
15
|
|
16
|
-
- uses:
|
16
|
+
- uses: ruby/setup-ruby@v1
|
17
17
|
with:
|
18
18
|
ruby-version: ${{ env.RUBY_VERSION }}
|
19
19
|
|
data/.rubocop.yml
CHANGED
@@ -1,26 +1,77 @@
|
|
1
1
|
---
|
2
2
|
|
3
|
+
Layout/BeginEndAlignment:
|
4
|
+
Enabled: true
|
5
|
+
|
3
6
|
Layout/EmptyLinesAroundAttributeAccessor:
|
4
7
|
Enabled: true
|
5
8
|
|
6
9
|
Layout/SpaceAroundMethodCallOperator:
|
7
10
|
Enabled: true
|
8
11
|
|
12
|
+
Lint/BinaryOperatorWithIdenticalOperands:
|
13
|
+
Enabled: true
|
14
|
+
|
15
|
+
Lint/ConstantDefinitionInBlock:
|
16
|
+
Enabled: true
|
17
|
+
|
9
18
|
Lint/DeprecatedOpenSSLConstant:
|
10
19
|
Enabled: true
|
11
20
|
|
12
21
|
Lint/DuplicateElsifCondition:
|
13
22
|
Enabled: true
|
14
23
|
|
24
|
+
Lint/DuplicateRequire:
|
25
|
+
Enabled: true
|
26
|
+
|
27
|
+
Lint/DuplicateRescueException:
|
28
|
+
Enabled: true
|
29
|
+
|
30
|
+
Lint/EmptyConditionalBody:
|
31
|
+
Enabled: true
|
32
|
+
|
33
|
+
Lint/EmptyFile:
|
34
|
+
Enabled: true
|
35
|
+
|
36
|
+
Lint/FloatComparison:
|
37
|
+
Enabled: true
|
38
|
+
|
39
|
+
Lint/IdentityComparison:
|
40
|
+
Enabled: true
|
41
|
+
|
42
|
+
Lint/MissingSuper:
|
43
|
+
Enabled: true
|
44
|
+
|
15
45
|
Lint/MixedRegexpCaptureTypes:
|
16
46
|
Enabled: true
|
17
47
|
|
48
|
+
Lint/OutOfRangeRegexpRef:
|
49
|
+
Enabled: true
|
50
|
+
|
18
51
|
Lint/RaiseException:
|
19
52
|
Enabled: true
|
20
53
|
|
54
|
+
Lint/SelfAssignment:
|
55
|
+
Enabled: true
|
56
|
+
|
21
57
|
Lint/StructNewOverride:
|
22
58
|
Enabled: true
|
23
59
|
|
60
|
+
Lint/TopLevelReturnWithArgument:
|
61
|
+
Enabled: true
|
62
|
+
|
63
|
+
Lint/TrailingCommaInAttributeDeclaration:
|
64
|
+
Enabled: true
|
65
|
+
|
66
|
+
Lint/UnreachableLoop:
|
67
|
+
Enabled: true
|
68
|
+
|
69
|
+
Lint/UselessMethodDefinition:
|
70
|
+
Enabled: true
|
71
|
+
|
72
|
+
Lint/UselessTimes:
|
73
|
+
Enabled: true
|
74
|
+
|
24
75
|
Style/AccessorGrouping:
|
25
76
|
Enabled: true
|
26
77
|
|
@@ -33,9 +84,18 @@ Style/BisectedAttrAccessor:
|
|
33
84
|
Style/CaseLikeIf:
|
34
85
|
Enabled: true
|
35
86
|
|
87
|
+
Style/CombinableLoops:
|
88
|
+
Enabled: true
|
89
|
+
|
90
|
+
Style/ExplicitBlockArgument:
|
91
|
+
Enabled: true
|
92
|
+
|
36
93
|
Style/ExponentialNotation:
|
37
94
|
Enabled: true
|
38
95
|
|
96
|
+
Style/GlobalStdStream:
|
97
|
+
Enabled: true
|
98
|
+
|
39
99
|
Style/HashAsLastArrayItem:
|
40
100
|
Enabled: true
|
41
101
|
|
@@ -51,6 +111,12 @@ Style/HashTransformKeys:
|
|
51
111
|
Style/HashTransformValues:
|
52
112
|
Enabled: true
|
53
113
|
|
114
|
+
Style/KeywordParametersOrder:
|
115
|
+
Enabled: true
|
116
|
+
|
117
|
+
Style/OptionalBooleanParameter:
|
118
|
+
Enabled: true
|
119
|
+
|
54
120
|
Style/RedundantAssignment:
|
55
121
|
Enabled: true
|
56
122
|
|
@@ -66,5 +132,17 @@ Style/RedundantRegexpCharacterClass:
|
|
66
132
|
Style/RedundantRegexpEscape:
|
67
133
|
Enabled: true
|
68
134
|
|
135
|
+
Style/RedundantSelfAssignment:
|
136
|
+
Enabled: true
|
137
|
+
|
138
|
+
Style/SingleArgumentDig:
|
139
|
+
Enabled: true
|
140
|
+
|
69
141
|
Style/SlicingWithRange:
|
70
142
|
Enabled: true
|
143
|
+
|
144
|
+
Style/SoleNestedConditional:
|
145
|
+
Enabled: true
|
146
|
+
|
147
|
+
Style/StringConcatenation:
|
148
|
+
Enabled: true
|
data/Gemfile.lock
CHANGED
@@ -9,25 +9,25 @@ GEM
|
|
9
9
|
ast (2.4.1)
|
10
10
|
docile (1.3.2)
|
11
11
|
json (2.3.1)
|
12
|
-
minitest (5.14.
|
12
|
+
minitest (5.14.2)
|
13
13
|
parallel (1.19.2)
|
14
|
-
parser (2.7.1.
|
14
|
+
parser (2.7.1.5)
|
15
15
|
ast (~> 2.4.1)
|
16
16
|
rainbow (3.0.0)
|
17
|
-
rake (
|
18
|
-
regexp_parser (1.
|
17
|
+
rake (13.0.1)
|
18
|
+
regexp_parser (1.8.1)
|
19
19
|
rexml (3.2.4)
|
20
|
-
rubocop (0.
|
20
|
+
rubocop (0.92.0)
|
21
21
|
parallel (~> 1.10)
|
22
|
-
parser (>= 2.7.1.
|
22
|
+
parser (>= 2.7.1.5)
|
23
23
|
rainbow (>= 2.2.2, < 4.0)
|
24
24
|
regexp_parser (>= 1.7)
|
25
25
|
rexml
|
26
|
-
rubocop-ast (>= 0.
|
26
|
+
rubocop-ast (>= 0.5.0)
|
27
27
|
ruby-progressbar (~> 1.7)
|
28
28
|
unicode-display_width (>= 1.4.0, < 2.0)
|
29
|
-
rubocop-ast (0.
|
30
|
-
parser (>= 2.7.1.
|
29
|
+
rubocop-ast (0.7.1)
|
30
|
+
parser (>= 2.7.1.5)
|
31
31
|
ruby-progressbar (1.10.1)
|
32
32
|
simplecov (0.17.1)
|
33
33
|
docile (~> 1.1)
|
data/README.md
CHANGED
data/lib/ruboclean/grouper.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
module Ruboclean
|
4
4
|
# Groups the rubocop configuration items into three categories:
|
5
|
-
# -
|
5
|
+
# - base: base configuration like 'require', 'inherit_from', etc
|
6
6
|
# - namespaces: every item which does **not** include an "/"
|
7
7
|
# - cops: every item which **includes** an "/"
|
8
8
|
class Grouper
|
@@ -21,11 +21,11 @@ module Ruboclean
|
|
21
21
|
private
|
22
22
|
|
23
23
|
def empty_groups
|
24
|
-
{
|
24
|
+
{ base: {}, namespaces: {}, cops: {} }
|
25
25
|
end
|
26
26
|
|
27
27
|
def find_target_group(key)
|
28
|
-
return :
|
28
|
+
return :base if key.start_with?(/[a-z]/)
|
29
29
|
return :cops if key.include?('/')
|
30
30
|
|
31
31
|
:namespaces
|
data/lib/ruboclean/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruboclean
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- lxxxvi
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-10-12 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Cleans and orders settings in .rubocop.yml
|
14
14
|
email:
|
@@ -45,7 +45,7 @@ metadata:
|
|
45
45
|
homepage_uri: https://github.com/lxxxvi/ruboclean
|
46
46
|
source_code_uri: https://github.com/lxxxvi/ruboclean
|
47
47
|
changelog_uri: https://github.com/lxxxvi/ruboclean/blob/master/CHANGELOG.md
|
48
|
-
post_install_message:
|
48
|
+
post_install_message:
|
49
49
|
rdoc_options: []
|
50
50
|
require_paths:
|
51
51
|
- lib
|
@@ -61,7 +61,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
61
61
|
version: '0'
|
62
62
|
requirements: []
|
63
63
|
rubygems_version: 3.1.2
|
64
|
-
signing_key:
|
64
|
+
signing_key:
|
65
65
|
specification_version: 4
|
66
66
|
summary: Cleans and orders settings in .rubocop.yml
|
67
67
|
test_files: []
|