rubocopital 0.5.3 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7651fef82b8bde7a33fc9b00acb986a10fc26781b1fa9a7e2e7317199ed13886
4
- data.tar.gz: 0026601405735f8393291eec398feb58ba33855ba0cac7461950aa7d5d7f1b1f
3
+ metadata.gz: a44d29c545f71dd22af55d799e3ad770234f2d22ba7c7bde5a159e0fd6135c80
4
+ data.tar.gz: 92e76fcf364aa414181903a0842bdad4e1dd5c7e1649d04401d9f210a37ed404
5
5
  SHA512:
6
- metadata.gz: b093f210b6387f332025ab9574b54074b05a86c62973186ba0b8d37389ac20647cc732a066348633bce56914f345eaf2972c814f7045bfa1ef916aedabb7ae76
7
- data.tar.gz: 5dcc0a424e884ea10186394657a03f3ac8ec2ade616d7fb076ed9ac0a3d53cffac111fcd576c94e97c2e66459ca027ae5b4cfe7f7b58bad360fcd926c624dc79
6
+ metadata.gz: 9131b2ad3253b0f327d4ecaf751af263a5063782152967ea8c6ddb3fb1d496d3e47ec9ea3d4594db0b698dda5806234716de8ecec78c9f036379ab71dacccff2
7
+ data.tar.gz: a3d2aa3566cd7eb021080d1a1b5b94a8e8028123b27d56755a24610f0ef7838440673690b5abb1ef20df9d7acf6b8d4874d7ae5bcd12bdd9aba8eb50ef889811
@@ -3,6 +3,22 @@ name: Ruby
3
3
  on: [push, pull_request]
4
4
 
5
5
  jobs:
6
+ build-ruby-30:
7
+
8
+ runs-on: ubuntu-latest
9
+
10
+ steps:
11
+ - uses: actions/checkout@v1
12
+ - name: Set up Ruby 3.0
13
+ uses: actions/setup-ruby@v1
14
+ with:
15
+ ruby-version: 3.0.x
16
+ - name: Build and test with Rake
17
+ run: |
18
+ gem install bundler
19
+ bundle install --jobs 4 --retry 3
20
+ bundle exec rake
21
+
6
22
  build-ruby-26:
7
23
 
8
24
  runs-on: ubuntu-latest
@@ -1,7 +1,55 @@
1
1
  require: rubocop-performance
2
2
 
3
+ Performance/AncestorsInclude:
4
+ Enabled: true
5
+
6
+ Performance/StringInclude:
7
+ Enabled: true
8
+
3
9
  Performance/ChainArrayAllocation:
4
10
  Enabled: true
5
11
 
6
12
  Performance/OpenStruct:
7
13
  Enabled: true
14
+
15
+ Performance/Squeeze:
16
+ Enabled: true
17
+
18
+ Performance/SortReverse:
19
+ Enabled: true
20
+
21
+ Performance/ReverseFirst:
22
+ Enabled: true
23
+
24
+ Performance/RedundantStringChars:
25
+ Enabled: true
26
+
27
+ Performance/RedundantSortBlock:
28
+ Enabled: true
29
+
30
+ Performance/IoReadlines:
31
+ Enabled: true
32
+
33
+ Performance/DeleteSuffix:
34
+ Enabled: true
35
+
36
+ Performance/BindCall:
37
+ Enabled: true
38
+
39
+ Performance/BigDecimalWithNumericArgument:
40
+ Enabled: true
41
+
42
+ Performance/BlockGivenWithExplicitBlock:
43
+ Enabled: true
44
+
45
+ Performance/CollectionLiteralInLoop:
46
+ Enabled: true
47
+
48
+ Performance/ConstantRegexp:
49
+ Enabled: true
50
+
51
+ Performance/MethodObjectAsBlock:
52
+ Enabled: true
53
+
54
+ Performance/Sum:
55
+ Enabled: true
@@ -0,0 +1,113 @@
1
+ require: rubocop-rails
2
+
3
+ Rails:
4
+ Enabled: true
5
+
6
+ Rails/ApplicationController:
7
+ Enabled: true
8
+
9
+ Rails/ApplicationJob:
10
+ Enabled: false
11
+
12
+ Rails/ApplicationMailer:
13
+ Enabled: true
14
+
15
+ Rails/ApplicationRecord:
16
+ Enabled: false
17
+
18
+ Rails/BelongsTo:
19
+ Enabled: true
20
+
21
+ Rails/Date:
22
+ EnforcedStyle: flexible
23
+
24
+ Rails/EnumHash:
25
+ Enabled: true
26
+
27
+ Rails/HasAndBelongsToMany:
28
+ Enabled: false
29
+
30
+ Rails/HttpPositionalArguments:
31
+ Enabled: false
32
+
33
+ Rails/IgnoredSkipActionFilterOption:
34
+ Enabled: true
35
+
36
+ Rails/LexicallyScopedActionFilter:
37
+ Enabled: false
38
+
39
+ Rails/LinkToBlank:
40
+ Enabled: true
41
+
42
+ Rails/OutputSafety:
43
+ Enabled: false
44
+
45
+ Rails/RakeEnvironment:
46
+ Enabled: false
47
+
48
+ Rails/SafeNavigationWithBlank:
49
+ Enabled: true
50
+
51
+ Rails/SkipsModelValidations:
52
+ Enabled: false
53
+
54
+ Rails/UniqueValidationWithoutIndex:
55
+ Enabled: true
56
+
57
+ Rails/RenderPlainText:
58
+ Enabled: true
59
+
60
+ Rails/RenderInline:
61
+ Enabled: true
62
+
63
+ Rails/RedundantForeignKey:
64
+ Enabled: true
65
+
66
+ Rails/PluckInWhere:
67
+ Enabled: true
68
+
69
+ Rails/Pluck:
70
+ Enabled: true
71
+
72
+ Rails/Pick:
73
+ Enabled: true
74
+
75
+ Rails/NegateInclude:
76
+ Enabled: true
77
+
78
+ Rails/MailerName:
79
+ Enabled: true
80
+
81
+ Rails/FindById:
82
+ Enabled: true
83
+
84
+ Rails/ContentTag:
85
+ Enabled: true
86
+
87
+ Rails/MatchRoute:
88
+ Enabled: true
89
+
90
+ Rails/ShortI18n:
91
+ Enabled: true
92
+
93
+ Rails/PluckId:
94
+ Enabled: false
95
+
96
+ Rails/ActiveRecordCallbacksOrder:
97
+ Enabled: true
98
+
99
+ Rails/Inquiry:
100
+ Enabled: true
101
+
102
+ Rails/WhereExists:
103
+ Enabled: true
104
+
105
+ Rails/UnknownEnv:
106
+ Environments:
107
+ - development
108
+ - test
109
+ - review
110
+ - staging
111
+ - acceptance
112
+ - training
113
+ - production
data/.rubocop-rspec.yml CHANGED
@@ -13,6 +13,9 @@ FactoryBot/CreateList:
13
13
  Enabled: true
14
14
  EnforcedStyle: create_list
15
15
 
16
+ FactoryBot/FactoryClassName:
17
+ Enabled: true
18
+
16
19
  Rails/HttpStatus:
17
20
  Enabled: true
18
21
  EnforcedStyle: symbolic
@@ -38,6 +41,9 @@ RSpec/BeEql:
38
41
  RSpec/BeforeAfterAll:
39
42
  Enabled: true
40
43
 
44
+ RSpec/ContextMethod:
45
+ Enabled: true
46
+
41
47
  RSpec/ContextWording:
42
48
  Enabled: true
43
49
 
@@ -54,6 +60,13 @@ RSpec/DescribedClass:
54
60
  RSpec/DescribeMethod:
55
61
  Enabled: true
56
62
 
63
+ RSpec/Dialect:
64
+ Enabled: false
65
+
66
+ RSpec/EmptyLineAfterExample:
67
+ Enabled: true
68
+ AllowConsecutiveOneLiners: true
69
+
57
70
  RSpec/EmptyExampleGroup:
58
71
  Enabled: true
59
72
 
@@ -107,6 +120,9 @@ RSpec/HookArgument:
107
120
  RSpec/HooksBeforeExamples:
108
121
  Enabled: true
109
122
 
123
+ RSpec/ImplicitBlockExpectation:
124
+ Enabled: true
125
+
110
126
  RSpec/ImplicitExpect:
111
127
  Enabled: true
112
128
  EnforcedStyle: is_expected
@@ -135,6 +151,9 @@ RSpec/IteratedExpectation:
135
151
  RSpec/LeadingSubject:
136
152
  Enabled: true
137
153
 
154
+ RSpec/LeakyConstantDeclaration:
155
+ Enabled: true
156
+
138
157
  RSpec/LetBeforeExamples:
139
158
  Enabled: true
140
159
 
@@ -230,3 +249,18 @@ RSpec/VoidExpect:
230
249
 
231
250
  RSpec/Yield:
232
251
  Enabled: true
252
+
253
+ RSpec/RepeatedExampleGroupDescription:
254
+ Enabled: true
255
+
256
+ RSpec/VariableName:
257
+ Enabled: true
258
+
259
+ RSpec/VariableDefinition:
260
+ Enabled: true
261
+
262
+ RSpec/RepeatedExampleGroupBody:
263
+ Enabled: true
264
+
265
+ RSpec/EmptyHook:
266
+ Enabled: true
data/.rubocop.yml CHANGED
@@ -1,4 +1,8 @@
1
- inherit_from: default.yml
1
+ require:
2
+ - rubocop-performance
3
+ - rubocop-rails
4
+ - rubocop-rspec
5
+
6
+ inherit_from:
7
+ - default.yml
2
8
 
3
- Documentation:
4
- Enabled: false
data/CHANGELOG.md CHANGED
@@ -6,6 +6,111 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [1.0.0] - 05 Febuary 2021
10
+
11
+ ### Changed
12
+
13
+ - Upgrade Rubocop from 0.89.0 to 1.9.1
14
+ - Upgrade Rubocop-Performance from 1.7.1 to 1.9.2
15
+ - Upgrade Rubocop-Rails from 2.7.0 to 2.9.1
16
+
17
+ ## [0.7.1] - 05 October 2020
18
+
19
+ - Upgrade rubocop to 0.89.0 to prevent bug in 0.88.0
20
+
21
+ - Added Style/ExplicitBlockArgument disabled
22
+ - Added Style/GlobalStdStream disabled
23
+ - Added Style/OptionalBooleanParameter disabled
24
+ - Added Style/SingleArgumentDig disabled
25
+ - Added Style/StringConcatenation disabled
26
+
27
+ - Added Lint/BinaryOperatorWithIdenticalOperands disabled
28
+ - Added Lint/DuplicateRescueException disabled
29
+ - Added Lint/EmptyConditionalBody disabled
30
+ - Added Lint/FloatComparison disabled
31
+ - Added Lint/MissingSuper disabled
32
+ - Added Lint/OutOfRangeRegexpRef disabled
33
+ - Added Lint/SelfAssignment disabled
34
+ - Added Lint/TopLevelReturnWithArgument disabled
35
+ - Added Lint/UnreachableLoop disabled
36
+
37
+ ## [0.7.0] - 10 August 2020
38
+
39
+ - Added Rails/ActiveRecordCallbacksOrder
40
+ - Added Rails/Inquiry
41
+ - Added Rails/WhereExists
42
+
43
+ - Added Lint/RaiseException
44
+ - Added Lint/MixedRegexpCaptureTypes
45
+ - Added Lint/DeprecatedOpenSSLConstant
46
+ - Added Lint/DuplicateElsifCondition
47
+ - Added Lint/MixedRegexpCaptureTypes
48
+
49
+ - Added Performance/AncestorsInclude
50
+ - Added Performance/StringInclude
51
+ - Added Performance/Squeeze
52
+ - Added Performance/SortReverse
53
+ - Added Performance/ReverseFirst
54
+ - Added Performance/RedundantStringChars
55
+ - Added Performance/RedundantSortBlock
56
+ - Added Performance/IoReadlines
57
+ - Added Performance/ReverseFirst
58
+ - Added Performance/DeleteSuffix
59
+ - Added Performance/BindCall
60
+ - Added Performance/BigDecimalWithNumericArgument
61
+ - Added Performance/DeleteSuffix
62
+
63
+ - Added RSpec/RepeatedExampleGroupDescription
64
+ - Added RSpec/VariableName
65
+ - Added RSpec/VariableDefinition
66
+ - Added RSpec/RepeatedExampleGroupBody
67
+ - Added RSpec/EmptyHook
68
+ - Added RSpec/RepeatedExampleGroupBody
69
+
70
+ - Added Style/SlicingWithRange
71
+ - Added Style/RedundantRegexpEscape
72
+ - Added Style/RedundantRegexpCharacterClass
73
+ - Added Style/RedundantFetchBlock
74
+ - Added Style/RedundantAssignment
75
+ - Added Style/HashTransformValues
76
+ - Added Style/HashEachMethods
77
+ - Added Style/ExponentialNotation
78
+ - Added Style/BisectedAttrAccessor
79
+ - Added Style/AccessorGrouping
80
+
81
+ ## [0.6.1] - 11 March 2020
82
+
83
+ - Bumped rake dependency to a higher version to mitigate CVE-2020-8130
84
+
85
+ ## [0.6.0] - 20 January 2020
86
+
87
+ - Updated rubocop gem to `0.77.0`
88
+ - Updated rubocop-performance gem to `1.5.1`
89
+ - Added rubocop-rails gem version `2.4.0`
90
+
91
+ - Added Rails/ApplicationController
92
+ - Added Rails/ApplicationMailer
93
+ - Added Rails/EnumHash
94
+ - Added Rails/SafeNavigationWithBlank
95
+ - Added FactoryBot/FactoryClassNam
96
+ - Added RSpec/ContextMethod
97
+ - Added RSpec/EmptyLineAfterExample: with AllowConsecutiveOneLiners: true
98
+ - Added RSpec/ImplicitBlockExpectation
99
+ - Added RSpec/LeakyConstantDeclaration
100
+ - Added Style/FloatDivision: with EnforcedStyle: single_coerce
101
+ - Added Style/MultilineWhenThen
102
+ - Added Lint/SendWithMixinArgument
103
+ - Added Gemspec/RubyVersionGlobalsUsage
104
+
105
+ - Disabled Rails/RakeEnvironment
106
+ - Disabled RSpec/Dialect
107
+
108
+ - Renamed Layout/AlignHash to Layout/HashAlignment
109
+ - Renamed Layout/AlignParameters to Layout/ParameterAlignment
110
+ - Renamed Layout/IndentFirstParameter to Layout/FirstParameterIndentation
111
+
112
+ ---
113
+
9
114
  ## [0.5.1] - 30 July 2019
10
115
 
11
116
  ### Disabled
data/README.md CHANGED
@@ -7,7 +7,7 @@ This is the common configuration for ruby-style checks by [Rubocop](https://gith
7
7
  Add this line to your application's Gemfile under the `development` and `test` groups to include a specific version of this gem:
8
8
 
9
9
  ```ruby
10
- gem 'rubocopital', '~> 0.5.1', require: false
10
+ gem 'rubocopital', '~> 1.0.0', require: false
11
11
  ```
12
12
 
13
13
  And then execute:
@@ -25,6 +25,8 @@ inherit_gem:
25
25
  - default.yml
26
26
  ```
27
27
 
28
+ `default.yml` does also require the `rubocop-performance` configuration.
29
+
28
30
  If you have specific configurations that differ from the agreed upon defaults,
29
31
  you can just add them below.
30
32
 
@@ -34,7 +36,7 @@ you can just add them below.
34
36
  - default.yml
35
37
 
36
38
  AllCops:
37
- TargetRubyVersion: 2.3
39
+ TargetRubyVersion: 3.0
38
40
  DisplayCopNames: false
39
41
  DisplayStyleGuide: true
40
42
  ```
@@ -48,6 +50,16 @@ inherit_gem:
48
50
  - .rubocop-rspec.yml
49
51
  ```
50
52
 
53
+ The same applies to Rails.
54
+
55
+ ```
56
+ inherit_gem:
57
+ rubocopital:
58
+ - default.yml
59
+ - .rubocop-rails.yml
60
+ - .rubocop-rspec.yml
61
+ ```
62
+
51
63
  ## Development
52
64
 
53
65
  After checking out the repo, run `bin/setup` to install dependencies. Then, run
data/default.yml CHANGED
@@ -1,7 +1,9 @@
1
- inherit_from: .rubocop-performance.yml
1
+ inherit_from:
2
+ - .rubocop-performance.yml
3
+ - new_cops.yml
2
4
 
3
5
  AllCops:
4
- TargetRubyVersion: 2.3
6
+ TargetRubyVersion: 2.6
5
7
  Exclude:
6
8
  - db/migrate/*
7
9
  - db/seeds/*
@@ -22,7 +24,7 @@ AllCops:
22
24
  DisplayCopNames: true
23
25
  DisplayStyleGuide: true
24
26
 
25
- Layout/AlignHash:
27
+ Layout/HashAlignment:
26
28
  EnforcedHashRocketStyle: key
27
29
  # key - left alignment of keys
28
30
  # 'a' => 2
@@ -31,7 +33,6 @@ Layout/AlignHash:
31
33
  # key - left alignment of keys
32
34
  # a: 0
33
35
  # bb: 1
34
- # YC Compliant
35
36
  EnforcedLastArgumentHashStyle: ignore_implicit
36
37
  # ignore_implicit - Ignore only implicit hashes.
37
38
  # Accepts:
@@ -41,8 +42,7 @@ Layout/AlignHash:
41
42
  # function({a: 1,
42
43
  # b: 2})
43
44
 
44
- Layout/AlignParameters:
45
- # YC Compliant
45
+ Layout/ParameterAlignment:
46
46
  EnforcedStyle: with_fixed_indentation
47
47
  # The `with_fixed_indentation` style aligns the following lines with one
48
48
  # level of indentation relative to the start of the line with the method call.
@@ -51,12 +51,10 @@ Layout/AlignParameters:
51
51
  # b)
52
52
 
53
53
  Style/AndOr:
54
- # YC Compliant
55
54
  EnforcedStyle: conditionals
56
55
  # `and` and `or` are banned only in conditionals (conditionals)
57
56
 
58
57
  Style/BlockDelimiters:
59
- # YC Compliant
60
58
  EnforcedStyle: line_count_based
61
59
  # The `line_count_based` style enforces braces around single line blocks and
62
60
  # do..end around multi-line blocks.
@@ -64,11 +62,9 @@ Style/BlockDelimiters:
64
62
  - spec/**/*
65
63
 
66
64
  Style/ClassAndModuleChildren:
67
- # YC Compliant
68
65
  EnforcedStyle: compact
69
66
 
70
67
  Style/IdenticalConditionalBranches:
71
- # YC Compliant
72
68
  Enabled: false
73
69
  # Redirect_to usage in conditionals
74
70
 
@@ -80,63 +76,54 @@ Style/ExpandPathArguments:
80
76
  Enabled: false
81
77
 
82
78
  Style/NumericPredicate:
83
- # YC Compliant
84
79
  Enabled: false
85
80
  # Use .positive? instead of > 0
86
81
  # Use .zero? instead of == 0
87
82
  # Use .nonzero? instead of != 0.
88
83
 
89
84
  Style/GlobalVars:
90
- # YC Compliant
91
85
  Enabled: true
92
86
  AllowedVariables: [$ASSET_MODE]
93
87
  # Do not introduce global variables. (used for cucumber custom_env)
94
88
 
95
89
  Style/EachWithObject:
96
- # YC Compliant
97
90
  Enabled: false
98
91
 
99
92
  Style/UnpackFirst:
100
93
  Enabled: false
101
94
 
102
- Rails/Date:
103
- # YC Compliant
104
- EnforcedStyle: flexible
105
- # The value `flexible` allows usage of `Date.current`, `Date.yesterday`, etc
106
- # (but not `Date.today`) which are overridden by ActiveSupport to handle current
107
- # time zone.
95
+ Layout/EmptyLinesAroundAttributeAccessor:
96
+ Enabled: true
97
+
98
+ Layout/SpaceAroundMethodCallOperator:
99
+ Enabled: true
108
100
 
109
101
  Layout/EndAlignment:
110
- # YC Compliant
111
102
  EnforcedStyleAlignWith: variable
112
103
 
113
104
  Layout/HeredocArgumentClosingParenthesis:
114
105
  Enabled: true
115
106
 
116
- Layout/IndentFirstParameter:
107
+ Layout/FirstParameterIndentation:
117
108
  Enabled: true
118
109
  EnforcedStyle: consistent
119
110
 
111
+ Layout/LineLength:
112
+ Max: 120
113
+
120
114
  Layout/MultilineMethodCallIndentation:
121
115
  EnforcedStyle: indented
122
116
 
123
117
  Layout/MultilineOperationIndentation:
124
- # YC Compliant
125
118
  EnforcedStyle: indented
126
119
 
127
120
  Style/TrivialAccessors:
128
121
  Enabled: true
129
122
 
130
123
  Metrics/AbcSize:
131
- # YC Compliant
132
124
  Enabled: false
133
125
 
134
- Metrics/LineLength:
135
- # YC Compliant
136
- Max: 120
137
-
138
126
  Metrics/BlockLength:
139
- # YC Compliant
140
127
  CountComments: false # count full line comments?
141
128
  Max: 50
142
129
  Exclude:
@@ -144,89 +131,112 @@ Metrics/BlockLength:
144
131
  - config/routes.rb
145
132
 
146
133
  Metrics/ClassLength:
147
- # YC Compliant
148
134
  Enabled: false
149
135
 
150
136
  Metrics/MethodLength:
151
- # YC Compliant
152
137
  Max: 30
153
138
  Severity: warning
154
139
 
155
140
  Metrics/ModuleLength:
156
- # YC Compliant
157
141
  Enabled: false
158
142
 
159
- Documentation:
160
- # YC Compliant
143
+ Style/Documentation:
161
144
  Enabled: false
162
145
 
163
- Rails:
164
- # YC Compliant
165
- Enabled: true
166
146
 
167
147
  Bundler/OrderedGems:
168
- # YC Compliant
169
148
  TreatCommentsAsGroupSeparators: true
170
149
 
171
- Rails/OutputSafety:
172
- # YC Compliant
150
+ Style/EmptyMethod:
173
151
  Enabled: false
174
- # Prefer safe_join instead of html_save
175
152
 
176
- Rails/HttpPositionalArguments:
177
- # YC Compliant
178
- Enabled: false
179
- # prefer get(:new, params: {}) instead of get(:new, {})
153
+ Style/FloatDivision:
154
+ Enabled: true
155
+ EnforcedStyle: single_coerce
180
156
 
181
- Rails/SkipsModelValidations:
182
- # YC Compliant
183
- Enabled: false
157
+ Style/IpAddresses:
158
+ Enabled: true
184
159
 
185
- Rails/HasAndBelongsToMany:
186
- # YC Compliant
160
+ Style/ModuleFunction:
187
161
  Enabled: false
188
162
 
189
- # This cop checks that models subclass ApplicationRecord with Rails 5.0.
190
- Rails/ApplicationRecord:
191
- Enabled: false
163
+ Style/MultilineMethodSignature:
164
+ Enabled: true
165
+
166
+ Style/MultilineWhenThen:
167
+ Enabled: true
168
+
169
+ Style/NegatedUnless:
170
+ Enabled: true
171
+ EnforcedStyle: both
192
172
 
193
- # This cop checks that models subclass ApplicationJob with Rails 5.0.
194
- Rails/ApplicationJob:
173
+ Style/StringLiterals:
195
174
  Enabled: false
196
175
 
197
- Rails/BelongsTo:
176
+ Style/ArrayCoercion:
198
177
  Enabled: true
199
178
 
200
- Rails/IgnoredSkipActionFilterOption:
179
+ Style/CaseLikeIf:
201
180
  Enabled: true
202
181
 
203
- Rails/LinkToBlank:
182
+ Style/HashAsLastArrayItem:
204
183
  Enabled: true
205
184
 
206
- Style/EmptyMethod:
207
- # YC Compliant
208
- Enabled: false
185
+ Style/HashLikeCase:
186
+ Enabled: true
209
187
 
210
- Style/IpAddresses:
188
+ Style/HashTransformKeys:
211
189
  Enabled: true
212
190
 
213
- Style/ModuleFunction:
214
- # YC Compliant
215
- Enabled: false
191
+ Style/HashTransformValues:
192
+ Enabled: true
216
193
 
217
- Style/MultilineMethodSignature:
194
+ Style/RedundantAssignment:
218
195
  Enabled: true
219
196
 
220
- Style/NegatedUnless:
197
+ Style/RedundantFetchBlock:
221
198
  Enabled: true
222
- EnforcedStyle: both
223
199
 
224
- Style/StringLiterals:
225
- # YC Compliant
226
- Enabled: false
200
+ Style/RedundantFileExtensionInRequire:
201
+ Enabled: true
202
+
203
+ Style/RedundantRegexpCharacterClass:
204
+ Enabled: true
205
+
206
+ Style/RedundantRegexpEscape:
207
+ Enabled: true
208
+
209
+ Style/SlicingWithRange:
210
+ Enabled: true
211
+
212
+ Style/HashEachMethods:
213
+ Enabled: true
214
+
215
+ Style/ExponentialNotation:
216
+ Enabled: true
217
+
218
+ Style/BisectedAttrAccessor:
219
+ Enabled: true
220
+
221
+ Style/AccessorGrouping:
222
+ Enabled: true
227
223
 
228
224
  Style/StringLiteralsInInterpolation:
229
- # YC Compliant
225
+ Enabled: false
226
+
227
+ Style/ExplicitBlockArgument:
228
+ Enabled: false
229
+
230
+ Style/GlobalStdStream:
231
+ Enabled: false
232
+
233
+ Style/OptionalBooleanParameter:
234
+ Enabled: false
235
+
236
+ Style/SingleArgumentDig:
237
+ Enabled: false
238
+
239
+ Style/StringConcatenation:
230
240
  Enabled: false
231
241
 
232
242
  Lint/DisjunctiveAssignmentInConstructor:
@@ -238,18 +248,59 @@ Lint/HeredocMethodCallPosition:
238
248
  Lint/SafeNavigationWithEmpty:
239
249
  Enabled: true
240
250
 
251
+ Lint/SendWithMixinArgument:
252
+ Enabled: true
253
+
241
254
  Lint/ToJSON:
242
255
  Enabled: true
243
256
 
244
- Rails/UnknownEnv:
245
- Environments:
246
- - development
247
- - test
248
- - review
249
- - staging
250
- - acceptance
251
- - training
252
- - production
257
+ Gemspec/RubyVersionGlobalsUsage:
258
+ Enabled: true
259
+
260
+ Gemspec/RequiredRubyVersion:
261
+ Enabled: false
262
+
263
+ Lint/NonDeterministicRequireOrder:
264
+ Enabled: false
265
+
266
+ Lint/RaiseException:
267
+ Enabled: true
268
+
269
+ Lint/MixedRegexpCaptureTypes:
270
+ Enabled: true
271
+
272
+ Lint/DeprecatedOpenSSLConstant:
273
+ Enabled: true
274
+
275
+ Lint/StructNewOverride:
276
+ Enabled: true
277
+
278
+ Lint/DuplicateElsifCondition:
279
+ Enabled: true
280
+
281
+ Lint/BinaryOperatorWithIdenticalOperands:
282
+ Enabled: false
283
+
284
+ Lint/DuplicateRescueException:
285
+ Enabled: false
286
+
287
+ Lint/EmptyConditionalBody:
288
+ Enabled: false
289
+
290
+ Lint/FloatComparison:
291
+ Enabled: false
292
+
293
+ Lint/MissingSuper:
294
+ Enabled: false
295
+
296
+ Lint/OutOfRangeRegexpRef:
297
+ Enabled: false
298
+
299
+ Lint/SelfAssignment:
300
+ Enabled: false
301
+
302
+ Lint/TopLevelReturnWithArgument:
303
+ Enabled: false
253
304
 
254
- Rails/LexicallyScopedActionFilter:
305
+ Lint/UnreachableLoop:
255
306
  Enabled: false
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Rubocopital
4
- VERSION = "0.5.3"
4
+ VERSION = "1.0.0"
5
5
  end
data/new_cops.yml ADDED
@@ -0,0 +1,99 @@
1
+ Lint/DuplicateRequire: # (new in 0.90)
2
+ Enabled: false
3
+ Lint/EmptyFile: # (new in 0.90)
4
+ Enabled: false
5
+ Lint/TrailingCommaInAttributeDeclaration: # (new in 0.90)
6
+ Enabled: false
7
+ Lint/UselessMethodDefinition: # (new in 0.90)
8
+ Enabled: false
9
+ Style/CombinableLoops: # (new in 0.90)
10
+ Enabled: false
11
+ Style/KeywordParametersOrder: # (new in 0.90)
12
+ Enabled: false
13
+ Style/RedundantSelfAssignment: # (new in 0.90)
14
+ Enabled: false
15
+ Style/SoleNestedConditional: # (new in 0.89)
16
+ Enabled: false
17
+
18
+ Layout/BeginEndAlignment: # (new in 0.91)
19
+ Enabled: false
20
+ Lint/ConstantDefinitionInBlock: # (new in 0.91)
21
+ Enabled: false
22
+ Lint/IdentityComparison: # (new in 0.91)
23
+ Enabled: false
24
+ Lint/UselessTimes: # (new in 0.91)
25
+ Enabled: false
26
+
27
+ Lint/HashCompareByIdentity: # (new in 0.93)
28
+ Enabled: false
29
+ Lint/RedundantSafeNavigation: # (new in 0.93)
30
+ Enabled: false
31
+ Style/ClassEqualityComparison: # (new in 0.93)
32
+ Enabled: false
33
+
34
+ Lint/DuplicateRegexpCharacterClassElement: # (new in 1.1)
35
+ Enabled: false
36
+ Lint/EmptyBlock: # (new in 1.1)
37
+ Enabled: false
38
+ Lint/ToEnumArguments: # (new in 1.1)
39
+ Enabled: false
40
+ Lint/UnmodifiedReduceAccumulator: # (new in 1.1)
41
+ Enabled: false
42
+ Style/ArgumentsForwarding: # (new in 1.1)
43
+ Enabled: false
44
+ Style/DocumentDynamicEvalDefinition: # (new in 1.1)
45
+ Enabled: false
46
+ Style/SwapValues: # (new in 1.1)
47
+ Enabled: false
48
+
49
+ Layout/SpaceBeforeBrackets: # (new in 1.7)
50
+ Enabled: false
51
+ Lint/AmbiguousAssignment: # (new in 1.7)
52
+ Enabled: false
53
+ Lint/DeprecatedConstants: # (new in 1.8)
54
+ Enabled: false
55
+ Lint/DuplicateBranch: # (new in 1.3)
56
+ Enabled: false
57
+ Lint/EmptyClass: # (new in 1.3)
58
+ Enabled: false
59
+ Lint/LambdaWithoutLiteralBlock: # (new in 1.8)
60
+ Enabled: false
61
+ Lint/NoReturnInBeginEndBlocks: # (new in 1.2)
62
+ Enabled: false
63
+ Lint/NumberedParameterAssignment: # (new in 1.9)
64
+ Enabled: false
65
+ Lint/OrAssignmentToConstant: # (new in 1.9)
66
+ Enabled: false
67
+ Lint/RedundantDirGlobSort: # (new in 1.8)
68
+ Enabled: false
69
+ Lint/SymbolConversion: # (new in 1.9)
70
+ Enabled: false
71
+ Lint/TripleQuotes: # (new in 1.9)
72
+ Enabled: false
73
+ Lint/UnexpectedBlockArity: # (new in 1.5)
74
+ Enabled: false
75
+ Style/CollectionCompact: # (new in 1.2)
76
+ Enabled: false
77
+ Style/EndlessMethod: # (new in 1.8)
78
+ Enabled: false
79
+ Style/HashExcept: # (new in 1.7)
80
+ Enabled: false
81
+ Style/IfWithBooleanLiteralBranches: # (new in 1.9)
82
+ Enabled: false
83
+ Style/NegatedIfElseCondition: # (new in 1.2)
84
+ Enabled: false
85
+ Style/NilLambda: # (new in 1.3)
86
+ Enabled: false
87
+ Style/RedundantArgument: # (new in 1.4)
88
+ Enabled: false
89
+
90
+ Rails/AfterCommitOverride: # (new in 2.8)
91
+ Enabled: false
92
+ Rails/AttributeDefaultBlockValue: # (new in 2.9)
93
+ Enabled: false
94
+ Rails/SquishedSQLHeredocs: # (new in 2.8)
95
+ Enabled: false
96
+ Rails/WhereEquals: # (new in 2.9)
97
+ Enabled: false
98
+ Rails/WhereNot: # (new in 2.8)
99
+ Enabled: false
data/rubocopital.gemspec CHANGED
@@ -32,11 +32,12 @@ Gem::Specification.new do |spec|
32
32
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
33
33
  spec.require_paths = ["lib"]
34
34
 
35
- spec.add_runtime_dependency "rubocop", "~> 0.70.0"
36
- spec.add_runtime_dependency "rubocop-performance", "1.0.0"
37
- spec.add_runtime_dependency "rubocop-rspec", "1.32.0"
35
+ spec.add_runtime_dependency "rubocop", "~> 1.9.0"
36
+ spec.add_runtime_dependency "rubocop-performance", "~> 1.9.2"
37
+ spec.add_runtime_dependency "rubocop-rails", "2.9.1"
38
+ spec.add_runtime_dependency "rubocop-rspec", "2.2.0"
38
39
 
39
40
  spec.add_development_dependency "bundler"
40
- spec.add_development_dependency "rake", "~> 10.0"
41
+ spec.add_development_dependency "rake", ">= 12.3.3"
41
42
  spec.add_development_dependency "rspec", "~> 3.0"
42
43
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocopital
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcel Eeken
8
8
  - Martijn Bleeker
9
- autorequire:
9
+ autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2019-12-06 00:00:00.000000000 Z
12
+ date: 2021-02-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rubocop
@@ -17,42 +17,56 @@ dependencies:
17
17
  requirements:
18
18
  - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: 0.70.0
20
+ version: 1.9.0
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - "~>"
26
26
  - !ruby/object:Gem::Version
27
- version: 0.70.0
27
+ version: 1.9.0
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: rubocop-performance
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - "~>"
33
+ - !ruby/object:Gem::Version
34
+ version: 1.9.2
35
+ type: :runtime
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - "~>"
40
+ - !ruby/object:Gem::Version
41
+ version: 1.9.2
42
+ - !ruby/object:Gem::Dependency
43
+ name: rubocop-rails
30
44
  requirement: !ruby/object:Gem::Requirement
31
45
  requirements:
32
46
  - - '='
33
47
  - !ruby/object:Gem::Version
34
- version: 1.0.0
48
+ version: 2.9.1
35
49
  type: :runtime
36
50
  prerelease: false
37
51
  version_requirements: !ruby/object:Gem::Requirement
38
52
  requirements:
39
53
  - - '='
40
54
  - !ruby/object:Gem::Version
41
- version: 1.0.0
55
+ version: 2.9.1
42
56
  - !ruby/object:Gem::Dependency
43
57
  name: rubocop-rspec
44
58
  requirement: !ruby/object:Gem::Requirement
45
59
  requirements:
46
60
  - - '='
47
61
  - !ruby/object:Gem::Version
48
- version: 1.32.0
62
+ version: 2.2.0
49
63
  type: :runtime
50
64
  prerelease: false
51
65
  version_requirements: !ruby/object:Gem::Requirement
52
66
  requirements:
53
67
  - - '='
54
68
  - !ruby/object:Gem::Version
55
- version: 1.32.0
69
+ version: 2.2.0
56
70
  - !ruby/object:Gem::Dependency
57
71
  name: bundler
58
72
  requirement: !ruby/object:Gem::Requirement
@@ -71,16 +85,16 @@ dependencies:
71
85
  name: rake
72
86
  requirement: !ruby/object:Gem::Requirement
73
87
  requirements:
74
- - - "~>"
88
+ - - ">="
75
89
  - !ruby/object:Gem::Version
76
- version: '10.0'
90
+ version: 12.3.3
77
91
  type: :development
78
92
  prerelease: false
79
93
  version_requirements: !ruby/object:Gem::Requirement
80
94
  requirements:
81
- - - "~>"
95
+ - - ">="
82
96
  - !ruby/object:Gem::Version
83
- version: '10.0'
97
+ version: 12.3.3
84
98
  - !ruby/object:Gem::Dependency
85
99
  name: rspec
86
100
  requirement: !ruby/object:Gem::Requirement
@@ -110,6 +124,7 @@ files:
110
124
  - ".gitlab-ci.yml"
111
125
  - ".rspec"
112
126
  - ".rubocop-performance.yml"
127
+ - ".rubocop-rails.yml"
113
128
  - ".rubocop-rspec.yml"
114
129
  - ".rubocop.yml"
115
130
  - ".travis.yml"
@@ -123,6 +138,7 @@ files:
123
138
  - default.yml
124
139
  - lib/rubocopital.rb
125
140
  - lib/rubocopital/version.rb
141
+ - new_cops.yml
126
142
  - project.yml
127
143
  - rubocopital.gemspec
128
144
  homepage: https://github.com/youngcapital/rubocopital
@@ -132,7 +148,7 @@ metadata:
132
148
  hompeage_uri: https://github.com/youngcapital/rubocopital
133
149
  source_code_uri: https://github.com/youngcapital/rubocopital
134
150
  changelog_uri: https://github.com/youngcapital/rubocopital/blob/master/CHANGELOG.md
135
- post_install_message:
151
+ post_install_message:
136
152
  rdoc_options: []
137
153
  require_paths:
138
154
  - lib
@@ -147,8 +163,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
147
163
  - !ruby/object:Gem::Version
148
164
  version: '0'
149
165
  requirements: []
150
- rubygems_version: 3.0.6
151
- signing_key:
166
+ rubygems_version: 3.1.4
167
+ signing_key:
152
168
  specification_version: 4
153
169
  summary: Shared rubocop configuration
154
170
  test_files: []