rubocopital 0.5.3 → 0.6.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: f4b9b93e191e11f11d8f3874a361d37593c1cc8b7a19b6fcce3c71274ec2bbed
4
+ data.tar.gz: 1ab3f6fbb9d458fc666c226bb502f1697ebd06e11b2d9d0727bdaa90764908fa
5
5
  SHA512:
6
- metadata.gz: b093f210b6387f332025ab9574b54074b05a86c62973186ba0b8d37389ac20647cc732a066348633bce56914f345eaf2972c814f7045bfa1ef916aedabb7ae76
7
- data.tar.gz: 5dcc0a424e884ea10186394657a03f3ac8ec2ade616d7fb076ed9ac0a3d53cffac111fcd576c94e97c2e66459ca027ae5b4cfe7f7b58bad360fcd926c624dc79
6
+ metadata.gz: 69c149158bd67d8f1dd693c1c34ee126fcc7eb2a1d009c0fd90edda18308acaba079771aabf48382ed0e6568de4e9d4d419ed284999255d362e9955df50d91b2
7
+ data.tar.gz: dc529b9341797105580a1a55dfedabe82457ad0fb4ea21b32a5dde8f03afeec16a2759946ad2607b17e7f4cbac111f4d4229607c8880438c7ccf839d80cec5a9
@@ -0,0 +1,62 @@
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/UnknownEnv:
55
+ Environments:
56
+ - development
57
+ - test
58
+ - review
59
+ - staging
60
+ - acceptance
61
+ - training
62
+ - 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
 
data/.rubocop.yml CHANGED
@@ -1,4 +1,9 @@
1
+ require:
2
+ - rubocop-performance
3
+ - rubocop-rails
4
+ - rubocop-rspec
5
+
1
6
  inherit_from: default.yml
2
7
 
3
- Documentation:
8
+ Style/Documentation:
4
9
  Enabled: false
data/CHANGELOG.md CHANGED
@@ -6,6 +6,35 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.6.0] - 20 January 2020
10
+
11
+ - Updated rubocop gem to `0.77.0`
12
+ - Updated rubocop-performance gem to `1.5.1`
13
+ - Added rubocop-rails gem version `2.4.0`
14
+
15
+ - Added Rails/ApplicationController
16
+ - Added Rails/ApplicationMailer
17
+ - Added Rails/EnumHash
18
+ - Added Rails/SafeNavigationWithBlank
19
+ - Added FactoryBot/FactoryClassNam
20
+ - Added RSpec/ContextMethod
21
+ - Added RSpec/EmptyLineAfterExample: with AllowConsecutiveOneLiners: true
22
+ - Added RSpec/ImplicitBlockExpectation
23
+ - Added RSpec/LeakyConstantDeclaration
24
+ - Added Style/FloatDivision: with EnforcedStyle: single_coerce
25
+ - Added Style/MultilineWhenThen
26
+ - Added Lint/SendWithMixinArgument
27
+ - Added Gemspec/RubyVersionGlobalsUsage
28
+
29
+ - Disabled Rails/RakeEnvironment
30
+ - Disabled RSpec/Dialect
31
+
32
+ - Renamed Layout/AlignHash to Layout/HashAlignment
33
+ - Renamed Layout/AlignParameters to Layout/ParameterAlignment
34
+ - Renamed Layout/IndentFirstParameter to Layout/FirstParameterIndentation
35
+
36
+ ---
37
+
9
38
  ## [0.5.1] - 30 July 2019
10
39
 
11
40
  ### Disabled
data/README.md CHANGED
@@ -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
 
@@ -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
@@ -22,7 +22,7 @@ AllCops:
22
22
  DisplayCopNames: true
23
23
  DisplayStyleGuide: true
24
24
 
25
- Layout/AlignHash:
25
+ Layout/HashAlignment:
26
26
  EnforcedHashRocketStyle: key
27
27
  # key - left alignment of keys
28
28
  # 'a' => 2
@@ -31,7 +31,6 @@ Layout/AlignHash:
31
31
  # key - left alignment of keys
32
32
  # a: 0
33
33
  # bb: 1
34
- # YC Compliant
35
34
  EnforcedLastArgumentHashStyle: ignore_implicit
36
35
  # ignore_implicit - Ignore only implicit hashes.
37
36
  # Accepts:
@@ -41,8 +40,7 @@ Layout/AlignHash:
41
40
  # function({a: 1,
42
41
  # b: 2})
43
42
 
44
- Layout/AlignParameters:
45
- # YC Compliant
43
+ Layout/ParameterAlignment:
46
44
  EnforcedStyle: with_fixed_indentation
47
45
  # The `with_fixed_indentation` style aligns the following lines with one
48
46
  # level of indentation relative to the start of the line with the method call.
@@ -51,12 +49,10 @@ Layout/AlignParameters:
51
49
  # b)
52
50
 
53
51
  Style/AndOr:
54
- # YC Compliant
55
52
  EnforcedStyle: conditionals
56
53
  # `and` and `or` are banned only in conditionals (conditionals)
57
54
 
58
55
  Style/BlockDelimiters:
59
- # YC Compliant
60
56
  EnforcedStyle: line_count_based
61
57
  # The `line_count_based` style enforces braces around single line blocks and
62
58
  # do..end around multi-line blocks.
@@ -64,11 +60,9 @@ Style/BlockDelimiters:
64
60
  - spec/**/*
65
61
 
66
62
  Style/ClassAndModuleChildren:
67
- # YC Compliant
68
63
  EnforcedStyle: compact
69
64
 
70
65
  Style/IdenticalConditionalBranches:
71
- # YC Compliant
72
66
  Enabled: false
73
67
  # Redirect_to usage in conditionals
74
68
 
@@ -80,40 +74,29 @@ Style/ExpandPathArguments:
80
74
  Enabled: false
81
75
 
82
76
  Style/NumericPredicate:
83
- # YC Compliant
84
77
  Enabled: false
85
78
  # Use .positive? instead of > 0
86
79
  # Use .zero? instead of == 0
87
80
  # Use .nonzero? instead of != 0.
88
81
 
89
82
  Style/GlobalVars:
90
- # YC Compliant
91
83
  Enabled: true
92
84
  AllowedVariables: [$ASSET_MODE]
93
85
  # Do not introduce global variables. (used for cucumber custom_env)
94
86
 
95
87
  Style/EachWithObject:
96
- # YC Compliant
97
88
  Enabled: false
98
89
 
99
90
  Style/UnpackFirst:
100
91
  Enabled: false
101
92
 
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.
108
-
109
93
  Layout/EndAlignment:
110
- # YC Compliant
111
94
  EnforcedStyleAlignWith: variable
112
95
 
113
96
  Layout/HeredocArgumentClosingParenthesis:
114
97
  Enabled: true
115
98
 
116
- Layout/IndentFirstParameter:
99
+ Layout/FirstParameterIndentation:
117
100
  Enabled: true
118
101
  EnforcedStyle: consistent
119
102
 
@@ -121,22 +104,18 @@ Layout/MultilineMethodCallIndentation:
121
104
  EnforcedStyle: indented
122
105
 
123
106
  Layout/MultilineOperationIndentation:
124
- # YC Compliant
125
107
  EnforcedStyle: indented
126
108
 
127
109
  Style/TrivialAccessors:
128
110
  Enabled: true
129
111
 
130
112
  Metrics/AbcSize:
131
- # YC Compliant
132
113
  Enabled: false
133
114
 
134
115
  Metrics/LineLength:
135
- # YC Compliant
136
116
  Max: 120
137
117
 
138
118
  Metrics/BlockLength:
139
- # YC Compliant
140
119
  CountComments: false # count full line comments?
141
120
  Max: 50
142
121
  Exclude:
@@ -144,89 +123,49 @@ Metrics/BlockLength:
144
123
  - config/routes.rb
145
124
 
146
125
  Metrics/ClassLength:
147
- # YC Compliant
148
126
  Enabled: false
149
127
 
150
128
  Metrics/MethodLength:
151
- # YC Compliant
152
129
  Max: 30
153
130
  Severity: warning
154
131
 
155
132
  Metrics/ModuleLength:
156
- # YC Compliant
157
133
  Enabled: false
158
134
 
159
- Documentation:
160
- # YC Compliant
135
+ Style/Documentation:
161
136
  Enabled: false
162
137
 
163
- Rails:
164
- # YC Compliant
165
- Enabled: true
166
138
 
167
139
  Bundler/OrderedGems:
168
- # YC Compliant
169
140
  TreatCommentsAsGroupSeparators: true
170
141
 
171
- Rails/OutputSafety:
172
- # YC Compliant
173
- Enabled: false
174
- # Prefer safe_join instead of html_save
175
-
176
- Rails/HttpPositionalArguments:
177
- # YC Compliant
178
- Enabled: false
179
- # prefer get(:new, params: {}) instead of get(:new, {})
180
-
181
- Rails/SkipsModelValidations:
182
- # YC Compliant
183
- Enabled: false
184
-
185
- Rails/HasAndBelongsToMany:
186
- # YC Compliant
187
- Enabled: false
188
-
189
- # This cop checks that models subclass ApplicationRecord with Rails 5.0.
190
- Rails/ApplicationRecord:
191
- Enabled: false
192
-
193
- # This cop checks that models subclass ApplicationJob with Rails 5.0.
194
- Rails/ApplicationJob:
142
+ Style/EmptyMethod:
195
143
  Enabled: false
196
144
 
197
- Rails/BelongsTo:
145
+ Style/FloatDivision:
198
146
  Enabled: true
199
-
200
- Rails/IgnoredSkipActionFilterOption:
201
- Enabled: true
202
-
203
- Rails/LinkToBlank:
204
- Enabled: true
205
-
206
- Style/EmptyMethod:
207
- # YC Compliant
208
- Enabled: false
147
+ EnforcedStyle: single_coerce
209
148
 
210
149
  Style/IpAddresses:
211
150
  Enabled: true
212
151
 
213
152
  Style/ModuleFunction:
214
- # YC Compliant
215
153
  Enabled: false
216
154
 
217
155
  Style/MultilineMethodSignature:
218
156
  Enabled: true
219
157
 
158
+ Style/MultilineWhenThen:
159
+ Enabled: true
160
+
220
161
  Style/NegatedUnless:
221
162
  Enabled: true
222
163
  EnforcedStyle: both
223
164
 
224
165
  Style/StringLiterals:
225
- # YC Compliant
226
166
  Enabled: false
227
167
 
228
168
  Style/StringLiteralsInInterpolation:
229
- # YC Compliant
230
169
  Enabled: false
231
170
 
232
171
  Lint/DisjunctiveAssignmentInConstructor:
@@ -238,18 +177,11 @@ Lint/HeredocMethodCallPosition:
238
177
  Lint/SafeNavigationWithEmpty:
239
178
  Enabled: true
240
179
 
241
- Lint/ToJSON:
180
+ Lint/SendWithMixinArgument:
242
181
  Enabled: true
243
182
 
244
- Rails/UnknownEnv:
245
- Environments:
246
- - development
247
- - test
248
- - review
249
- - staging
250
- - acceptance
251
- - training
252
- - production
183
+ Lint/ToJSON:
184
+ Enabled: true
253
185
 
254
- Rails/LexicallyScopedActionFilter:
255
- Enabled: false
186
+ Gemspec/RubyVersionGlobalsUsage:
187
+ Enabled: true
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Rubocopital
4
- VERSION = "0.5.3"
4
+ VERSION = "0.6.0"
5
5
  end
data/rubocopital.gemspec CHANGED
@@ -32,9 +32,10 @@ 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", "~> 0.77.0"
36
+ spec.add_runtime_dependency "rubocop-performance", "~> 1.5.1"
37
+ spec.add_runtime_dependency "rubocop-rails", "2.4.0"
38
+ spec.add_runtime_dependency "rubocop-rspec", "1.37.0"
38
39
 
39
40
  spec.add_development_dependency "bundler"
40
41
  spec.add_development_dependency "rake", "~> 10.0"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocopital
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcel Eeken
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2019-12-06 00:00:00.000000000 Z
12
+ date: 2020-01-20 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: 0.77.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: 0.77.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.5.1
35
+ type: :runtime
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - "~>"
40
+ - !ruby/object:Gem::Version
41
+ version: 1.5.1
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.4.0
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.4.0
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: 1.37.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: 1.37.0
56
70
  - !ruby/object:Gem::Dependency
57
71
  name: bundler
58
72
  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"
@@ -147,7 +162,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
147
162
  - !ruby/object:Gem::Version
148
163
  version: '0'
149
164
  requirements: []
150
- rubygems_version: 3.0.6
165
+ rubygems_version: 3.1.2
151
166
  signing_key:
152
167
  specification_version: 4
153
168
  summary: Shared rubocop configuration