rubocop-inhouse 0.1.4 → 0.1.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8005a96dd79da393105e3f1451d7a78ddeb8438ef43622d29bc27719616487e9
4
- data.tar.gz: ea9b5741a7d8199cf7f31c44f08927ddb049cffe137536f304bc2b07eea50194
3
+ metadata.gz: 783b9a5c0fea60b41699c88c0148a5764529a6f28047bcb9f89416aa2361e380
4
+ data.tar.gz: 3976f6adcd23eb59ec25a0cd2f7a7a25c9db4f9bafa998ca3f1f02c9d24856a9
5
5
  SHA512:
6
- metadata.gz: 0ca17c986ccd4d29378f66423f50eef57cb8a80f5ea655570c8e10e6b6016861a082f488bbbdae681050ded6c2909b5b36f5983892a31d718c24bd192f62ef5d
7
- data.tar.gz: 98e819c36eb54f1a0e9ac2663ed5fe753224b2880a61ce2ef38867889486a4d72a0a9ce2f2953c8a0defa26e246049af9d101680a922fbe0651f14b4ff5673eb
6
+ metadata.gz: '0928f956cdc2c83a225a2181e534c82ceac408f49a3c79f9e9e74f44cbd0a2cfc75c871cbd6db1ffbf65cc1009352780d5648b2a62fbfcd1f14ef965e1a741a2'
7
+ data.tar.gz: de524bfbe904c937171e473217ba2fddfc3895a450562544187c49d18abc8dee296cdae1c18c64e7d79ac76e802b57f5a7aadc4f13bca189d2a39a745db9b785
data/README.md CHANGED
@@ -19,21 +19,17 @@ Inherit all of the stylistic rules and cops through an inheritance declaration
19
19
  in your `.rubocop.yml`:
20
20
 
21
21
  ```yaml
22
- # .rubocop.yml
22
+ require:
23
+ - rubocop-inhouse
23
24
  inherit_gem:
24
25
  rubocop-inhouse:
25
26
  - config/default.yml # generic Ruby rules and cops
26
27
  - config/rails.yml # Rails-specific rules and cops
27
- ```
28
28
 
29
- Alternatively, only require the additional custom cops in your `.rubocop.yml`
30
- without inheriting/enabling the other stylistic rules:
29
+ AllCops:
30
+ NewCops: enable
31
31
 
32
- ```yaml
33
- # .rubocop.yml
34
- require:
35
- - rubocop-inhouse # generic Ruby cops only
36
- - rubocop-inhouse-rails # Rails-specific cops only
32
+ # The rest of your overrides here
37
33
  ```
38
34
 
39
35
  For more granular control over which of RuboCop's rules are enabled for your
data/config/default.yml CHANGED
@@ -16,8 +16,9 @@ AllCops:
16
16
  NewCops: enable
17
17
  Exclude:
18
18
  - "**/bin/*"
19
- - "**/db/migrate/*"
19
+ - "**/db/migrate/*.rb"
20
20
  - "**/db/schema.rb"
21
+ - "**/node_modules/**/*"
21
22
 
22
23
  # ==== GEMSPEC ====
23
24
  Gemspec/DeprecatedAttributeAssignment:
data/config/layout.yml CHANGED
@@ -71,7 +71,7 @@ Layout/LineEndStringConcatenationIndentation:
71
71
  Layout/LineLength:
72
72
  Max: 80
73
73
  Exclude:
74
- - '**/spec/**/*'
74
+ - "spec/**/*"
75
75
 
76
76
  Layout/MultilineArrayBraceLayout:
77
77
  EnforcedStyle: new_line
data/config/lint.yml CHANGED
@@ -3,7 +3,7 @@ Lint/AmbiguousAssignment:
3
3
 
4
4
  Lint/AmbiguousBlockAssociation:
5
5
  Exclude:
6
- - "**/spec/**/*"
6
+ - "spec/**/*.rb"
7
7
 
8
8
  Lint/AmbiguousOperatorPrecedence:
9
9
  Enabled: true
data/config/metrics.yml CHANGED
@@ -4,16 +4,18 @@ Metrics/AbcSize:
4
4
  # Excluding controllers here because respond_to blocks and others make this
5
5
  # higher than they otherwise should be
6
6
  Exclude:
7
- - "**/app/controllers/**/*"
7
+ - "app/controllers/**/*"
8
+ - "app/views/**/*.rb"
8
9
 
9
10
  Metrics/BlockLength:
10
11
  CountComments: false
11
12
  Max: 25
12
13
  Exclude:
13
- - "**/spec/**/*"
14
+ - "spec/**/*.rb"
15
+ - "config/**/*.rb"
16
+ - "app/views/**/*.rb"
17
+ - "lib/tasks/**/*.rake"
14
18
  - "**/*.rake"
15
- - "**/factories/**/*"
16
- - "**/config/**/*"
17
19
 
18
20
  Metrics/CollectionLiteralLength:
19
21
  Enabled: true
@@ -22,7 +24,8 @@ Metrics/ClassLength:
22
24
  CountAsOne: ["array", "hash"]
23
25
  Max: 100
24
26
  Exclude:
25
- - "**/app/controllers/**/*"
27
+ - "app/controllers/**/*.rb"
28
+ - "app/views/**/*.rb"
26
29
 
27
30
  Metrics/CyclomaticComplexity:
28
31
  Max: 10
@@ -30,12 +33,14 @@ Metrics/CyclomaticComplexity:
30
33
  Metrics/MethodLength:
31
34
  CountAsOne: ["array", "hash", "method_call"]
32
35
  Max: 20
36
+ Exclude:
37
+ - "app/views/**/*.rb"
33
38
 
34
39
  Metrics/ModuleLength:
35
40
  CountAsOne: ["array", "hash"]
36
41
  Max: 100
37
42
  Exclude:
38
- - "**/spec/**/*"
43
+ - "spec/**/*.rb"
39
44
 
40
45
  Metrics/ParameterLists:
41
46
  Max: 2
@@ -43,4 +48,5 @@ Metrics/ParameterLists:
43
48
 
44
49
  Metrics/PerceivedComplexity:
45
50
  Max: 8
46
-
51
+ Exclude:
52
+ - "app/views/**/*.rb"
data/config/rails.yml CHANGED
@@ -3,11 +3,21 @@ require:
3
3
  - rubocop-rails
4
4
  - rubocop-capybara
5
5
  - rubocop-factory_bot
6
+ - rubocop-rspec_rails
6
7
 
7
8
  inherit_from:
8
9
  - ./capybara.yml
9
10
  - ./factory_bot.yml
10
11
 
12
+ Rails/ActionFilter:
13
+ Enabled: true
14
+
15
+ Rails/ActiveRecordCallbacksOrder:
16
+ Enabled: true
17
+
18
+ Rails/AfterCommitOverride:
19
+ Enabled: true
20
+
11
21
  Rails/ActionControllerTestCase:
12
22
  Enabled: false
13
23
 
@@ -59,144 +69,142 @@ Rails/ExpandedDateRange:
59
69
  Rails/FreezeTime:
60
70
  Enabled: true
61
71
 
62
- Rails/I18nLazyLookup:
63
- Enabled: true
72
+ Rails/CreateTableWithTimestamps:
73
+ Enabled: false
64
74
 
65
- Rails/I18nLocaleAssignment:
75
+ Rails/Date:
66
76
  Enabled: true
77
+ EnforcedStyle: strict
67
78
 
68
- Rails/I18nLocaleTexts:
79
+ Rails/Delegate:
69
80
  Enabled: true
70
81
 
71
- Rails/IgnoredColumnsAssignment:
82
+ Rails/DefaultScope:
72
83
  Enabled: true
73
84
 
74
- Rails/MigrationClassName:
85
+ Rails/FindById:
75
86
  Enabled: true
76
87
 
77
- Rails/RedundantActiveRecordAllMethod:
88
+ Rails/I18nLazyLookup:
78
89
  Enabled: true
79
90
 
80
- Rails/RedundantPresenceValidationOnBelongsTo:
91
+ Rails/I18nLocaleAssignment:
81
92
  Enabled: true
82
93
 
83
- Rails/RedundantTravelBack:
94
+ Rails/I18nLocaleTexts:
84
95
  Enabled: true
85
96
 
86
- Rails/ResponseParsedBody:
97
+ Rails/IgnoredColumnsAssignment:
87
98
  Enabled: true
88
99
 
89
- Rails/RootJoinChain:
100
+ Rails/Inquiry:
90
101
  Enabled: true
91
102
 
92
- Rails/RootPublicPath:
103
+ Rails/MigrationClassName:
93
104
  Enabled: true
94
105
 
95
- Rails/RootPathnameMethods:
106
+ Rails/MailerName:
96
107
  Enabled: true
97
108
 
98
- Rails/SquishedSQLHeredocs:
109
+ Rails/MatchRoute:
99
110
  Enabled: true
100
111
 
101
- Rails/StripHeredoc:
112
+ Rails/NegateInclude:
102
113
  Enabled: true
103
114
 
104
- Rails/ThreeStateBooleanColumn:
115
+ Rails/OrderById:
105
116
  Enabled: true
106
117
 
107
- Rails/TimeZoneAssignment:
108
- Enabled: true
118
+ Rails/Output:
119
+ Exclude:
120
+ - "app/views/**/*.rb"
109
121
 
110
- Rails/ToFormattedS:
122
+ Rails/Pluck:
111
123
  Enabled: true
112
124
 
113
- Rails/ToSWithArgument:
125
+ Rails/PluckId:
114
126
  Enabled: true
115
127
 
116
- Rails/TopLevelHashWithIndifferentAccess:
128
+ Rails/PluckInWhere:
117
129
  Enabled: true
118
130
 
119
- Rails/TransactionExitStatement:
131
+ Rails/RenderInline:
120
132
  Enabled: true
121
133
 
122
- Rails/UnusedIgnoredColumns:
134
+ Rails/RenderPlainText:
123
135
  Enabled: true
124
136
 
125
- Rails/UnusedRenderContent:
137
+ Rails/RedundantActiveRecordAllMethod:
126
138
  Enabled: true
127
139
 
128
- Rails/WhereEquals:
140
+ Rails/RedundantPresenceValidationOnBelongsTo:
129
141
  Enabled: true
130
142
 
131
- Rails/WhereMissing:
143
+ Rails/RedundantTravelBack:
132
144
  Enabled: true
133
145
 
134
- Rails/WhereNotWithMultipleConditions:
146
+ Rails/ResponseParsedBody:
135
147
  Enabled: true
136
148
 
137
- Rails/ActionFilter:
149
+ Rails/RootJoinChain:
138
150
  Enabled: true
139
151
 
140
- Rails/ActiveRecordCallbacksOrder:
152
+ Rails/RootPublicPath:
141
153
  Enabled: true
142
154
 
143
- Rails/AfterCommitOverride:
155
+ Rails/RootPathnameMethods:
144
156
  Enabled: true
145
157
 
146
- Rails/CreateTableWithTimestamps:
147
- Enabled: false
148
-
149
- Rails/Date:
158
+ Rails/SaveBang:
150
159
  Enabled: true
151
- EnforcedStyle: strict
160
+ AllowImplicitReturn: false
161
+ Exclude:
162
+ - "spec/factories/**/*.rb"
163
+ - "config/**/*.rb"
152
164
 
153
- Rails/Delegate:
165
+ Rails/ShortI18n:
154
166
  Enabled: true
155
167
 
156
- Rails/DefaultScope:
168
+ Rails/SquishedSQLHeredocs:
157
169
  Enabled: true
158
170
 
159
- Rails/FindById:
171
+ Rails/StripHeredoc:
160
172
  Enabled: true
161
173
 
162
- Rails/Inquiry:
174
+ Rails/ThreeStateBooleanColumn:
163
175
  Enabled: true
164
176
 
165
- Rails/MailerName:
177
+ Rails/TimeZoneAssignment:
166
178
  Enabled: true
167
179
 
168
- Rails/MatchRoute:
180
+ Rails/ToFormattedS:
169
181
  Enabled: true
170
182
 
171
- Rails/NegateInclude:
183
+ Rails/ToSWithArgument:
172
184
  Enabled: true
173
185
 
174
- Rails/OrderById:
186
+ Rails/TopLevelHashWithIndifferentAccess:
175
187
  Enabled: true
176
188
 
177
- Rails/Pluck:
189
+ Rails/TransactionExitStatement:
178
190
  Enabled: true
179
191
 
180
- Rails/PluckId:
192
+ Rails/UnusedIgnoredColumns:
181
193
  Enabled: true
182
194
 
183
- Rails/PluckInWhere:
195
+ Rails/UnusedRenderContent:
184
196
  Enabled: true
185
197
 
186
- Rails/RenderInline:
198
+ Rails/WhereEquals:
187
199
  Enabled: true
188
200
 
189
- Rails/RenderPlainText:
201
+ Rails/WhereMissing:
190
202
  Enabled: true
191
203
 
192
- Rails/SaveBang:
204
+ Rails/WhereNotWithMultipleConditions:
193
205
  Enabled: true
194
- AllowImplicitReturn: false
195
- Exclude:
196
- - "spec/factories/*.rb"
197
206
 
198
- Rails/ShortI18n:
199
- Enabled: true
207
+
200
208
 
201
209
  Rails/WhereExists:
202
210
  Enabled: true
data/config/rspec.yml CHANGED
@@ -67,101 +67,101 @@ RSpec/VerifiedDoubleReference:
67
67
  RSpec/SpecFilePathFormat:
68
68
  Enabled: true
69
69
  Exclude:
70
- - "**/spec/factories/*"
71
- - "**/spec/components/**/*"
70
+ - "spec/factories/**/*.rb"
71
+ - "spec/components/**/*.rb"
72
72
 
73
73
  RSpec/MissingExampleGroupArgument:
74
74
  Enabled: true
75
75
  Exclude:
76
- - '**/spec/factories/*'
76
+ - 'spec/factories/**/*.rb'
77
77
 
78
78
  RSpec/EmptyExampleGroup:
79
79
  Enabled: true
80
80
  Exclude:
81
- - '**/spec/factories/*'
81
+ - 'spec/factories/**/*.rb'
82
82
 
83
83
  RSpec/AnyInstance:
84
84
  Enabled: false
85
85
  Exclude:
86
- - '**/spec/factories/*'
86
+ - 'spec/factories/**/*.rb'
87
87
 
88
88
  RSpec/BeforeAfterAll:
89
89
  Enabled: false
90
90
  Exclude:
91
- - '**/spec/factories/*'
91
+ - 'spec/factories/**/*.rb'
92
92
 
93
93
  RSpec/ContextWording:
94
94
  Enabled: false
95
95
  Exclude:
96
- - '**/spec/factories/*'
96
+ - 'spec/factories/**/*.rb'
97
97
 
98
98
  RSpec/DescribeClass:
99
99
  Enabled: false
100
100
  Exclude:
101
- - '**/spec/factories/*'
101
+ - 'spec/factories/**/*.rb'
102
102
 
103
103
  RSpec/ExampleLength:
104
104
  Enabled: false
105
105
  Exclude:
106
- - '**/spec/factories/*'
106
+ - 'spec/factories/**/*.rb'
107
107
 
108
108
  RSpec/ExpectInHook:
109
109
  Enabled: false
110
110
  Exclude:
111
- - '**/spec/factories/*'
111
+ - 'spec/factories/**/*.rb'
112
112
 
113
113
  RSpec/FilePath:
114
114
  Enabled: false
115
115
  Exclude:
116
- - '**/spec/factories/*'
116
+ - 'spec/factories/**/*.rb'
117
117
 
118
118
  RSpec/InstanceVariable:
119
119
  Enabled: false
120
120
  Exclude:
121
- - '**/spec/factories/*'
121
+ - 'spec/factories/**/*.rb'
122
122
 
123
123
  RSpec/LetSetup:
124
124
  Enabled: false
125
125
  Exclude:
126
- - '**/spec/factories/*'
126
+ - 'spec/factories/**/*.rb'
127
127
 
128
128
  RSpec/MessageChain:
129
129
  Enabled: false
130
130
  Exclude:
131
- - '**/spec/factories/*'
131
+ - 'spec/factories/**/*.rb'
132
132
 
133
133
  RSpec/MessageSpies:
134
134
  Enabled: false
135
135
  Exclude:
136
- - '**/spec/factories/*'
136
+ - 'spec/factories/**/*.rb'
137
137
 
138
138
  RSpec/MultipleExpectations:
139
139
  Enabled: false
140
140
  Exclude:
141
- - '**/spec/factories/*'
141
+ - 'spec/factories/**/*.rb'
142
142
 
143
143
  RSpec/NamedSubject:
144
144
  Enabled: false
145
145
  Exclude:
146
- - '**/spec/factories/*'
146
+ - 'spec/factories/**/*.rb'
147
147
 
148
148
  RSpec/NestedGroups:
149
149
  Max: 7
150
150
  Exclude:
151
- - '**/spec/factories/*'
151
+ - 'spec/factories/**/*.rb'
152
152
 
153
153
  RSpec/SubjectStub:
154
154
  Enabled: false
155
155
  Exclude:
156
- - '**/spec/factories/*'
156
+ - 'spec/factories/**/*.rb'
157
157
 
158
158
  RSpec/VerifiedDoubles:
159
159
  Enabled: false
160
160
  Exclude:
161
- - '**/spec/factories/*'
161
+ - 'spec/factories/**/*.rb'
162
162
 
163
163
  RSpec/VoidExpect:
164
164
  Enabled: false
165
165
  Exclude:
166
- - '**/spec/factories/*'
166
+ - 'spec/factories/**/*.rb'
167
167
 
data/config/style.yml CHANGED
@@ -214,9 +214,7 @@ Style/StringChars:
214
214
  Enabled: true
215
215
 
216
216
  Style/StringHashKeys:
217
- Enabled: true
218
- Exclude:
219
- - "config/routes.rb"
217
+ Enabled: false
220
218
 
221
219
  Style/SwapValues:
222
220
  Enabled: true
@@ -2,7 +2,6 @@
2
2
 
3
3
  module Rubocop
4
4
  module Inhouse
5
- VERSION = "0.1.4"
6
- public_constant :VERSION
5
+ VERSION = "0.1.6"
7
6
  end
8
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-inhouse
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nolan J Tait
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-03-31 00:00:00.000000000 Z
11
+ date: 2024-05-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
@@ -141,7 +141,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
141
141
  - !ruby/object:Gem::Version
142
142
  version: '0'
143
143
  requirements: []
144
- rubygems_version: 3.5.3
144
+ rubygems_version: 3.5.9
145
145
  signing_key:
146
146
  specification_version: 4
147
147
  summary: Rubocop configuration for InHouse projects