rubocop-dbl 0.3.0 → 1.0.1

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: 4bc3778cb0f67a617634f53135ce14e4e10d697c2f794fc85c73d5634b67fa52
4
- data.tar.gz: 4137add4a7d9ddb7cc932f270ba75e8caffd7b3722a2b4fd09a9d8c9697a78de
3
+ metadata.gz: 33d84cbb963636c197eb383d365027dd6bef5f7f3fbc0ad8ba2bb0e3309b07a1
4
+ data.tar.gz: 4ddd2edba86d33828d36893e96e6d4a56eaff68aac4c855bca1be0dfa6546e4d
5
5
  SHA512:
6
- metadata.gz: 8ef722d0bf8b8052b94765964eed84b62e2a7206ae1c96a5d1c6f7c9fa071b1eccda69f49a8c1d253cae7602189fc822fb7a41f4ef500f9342bc785853114137
7
- data.tar.gz: 1cd3441be35e31eb7d87fd851f00f2d9f3489f239305d217466d569c928d05f0006b1fcf8f7a41a5cbe1a96832ba115e2794b679040b5777b780a7890c63a59c
6
+ metadata.gz: 6274efeff7d90d4c95687018d3789046c439c3ffed2bf589f1f87832358aa116bafb7c60778eebc09d749ee9a6c1426c00ccf686b7457d377ae8ff1653a56cbd
7
+ data.tar.gz: e93a63b62e52407033324b44ea29847dbb66b7eaae092ec5c982309abe640a95685c05677221ff2cc0dcf9df2a16937610c8c64e08b8ec9646f5b0abf8a2e8c9
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # DBL Rubocop
2
2
 
3
- ![Test](https://github.com/dbl-works/rubocop-dbl/workflows/Test/badge.svg?branch=main)
3
+ [![Test](https://github.com/dbl-works/rubocop-dbl/actions/workflows/test.yml/badge.svg)](https://github.com/dbl-works/rubocop-dbl/actions/workflows/test.yml)
4
4
 
5
5
  RuboCop configuration for our Ruby on Rails projects.
6
6
 
@@ -61,7 +61,10 @@ rails generate rubocop_dbl:install
61
61
 
62
62
  ### TargetRubyVersion
63
63
 
64
- We only support the latest 2 versions of ruby, which is currently >= 2.6. See [test.yml](.github/workflows/test.yml) for details
64
+ We only support the latest 2 versions of ruby, which is currently >= 2.7.
65
+ We only support the latest 2 versions of rails, which is currently >= 6.0.
66
+ See [test.yml](.github/workflows/test.yml) for details.
67
+
65
68
 
66
69
  If you'd like to change `TargetRubyVersion`, see [Customization](#customization).
67
70
 
@@ -120,7 +123,7 @@ take note of the most current version of the gem, which will be printed to conso
120
123
  * publish the gem as follows
121
124
 
122
125
  ```shell
123
- gem push --key github --host https://YOUR_GITHUB_USER_NAME:YOUR_PAT@rubygems.pkg.github.com/dbl-works rubocop-dbl-CURRENT_GEM_VERSION.gem
126
+ gem push --key github --host https://"$YOUR_GITHUB_USER_NAME":"$YOUR_PAT"@rubygems.pkg.github.com/dbl-works rubocop-dbl-"$CURRENT_GEM_VERSION".gem
124
127
  ```
125
128
 
126
129
  replacing `YOUR_GITHUB_USER_NAME`, `YOUR_PAT`, `CURRENT_GEM_VERSION` with the appropriate values.
@@ -0,0 +1,29 @@
1
+ # Defaults for this cop are found here:
2
+ # https://github.com/rubocop/rubocop/blob/master/config/default.yml
3
+ #
4
+ # Add customizations below.
5
+ #
6
+ # Ensure to document why we change a default by linking the corresponding PR.
7
+ # For example:
8
+ #
9
+ # Layout/EndAlignment:
10
+ # Reference: 'https://github.com/dbl-works/rubocop-dbl/pull/35'
11
+ # Enabled: true
12
+ #
13
+
14
+ # Align `end` with the matching keyword or starting expression except for
15
+ # assignments, where it should be aligned with the LHS.
16
+ # @NOTE: changed EnforcedStyleAlignWith from "keyword" to "variable"
17
+ Layout/EndAlignment:
18
+ Reference: 'we have no reference for this change'
19
+ Enabled: true
20
+ EnforcedStyleAlignWith: variable
21
+ AutoCorrect: true
22
+
23
+ # @NOTE: changed EnforcedStyle from "with_first_parameter" to "with_fixed_indentation"
24
+ Layout/ParameterAlignment:
25
+ Reference: 'we have no reference for this change'
26
+ EnforcedStyle: with_fixed_indentation
27
+ SupportedStyles:
28
+ - with_first_parameter
29
+ - with_fixed_indentation
@@ -0,0 +1,47 @@
1
+ # Defaults for this cop are found here:
2
+ # https://github.com/rubocop/rubocop/blob/master/config/default.yml
3
+ #
4
+ # Add customizations below.
5
+ #
6
+ # Ensure to document why we change a default by linking the corresponding PR.
7
+ # For example:
8
+ #
9
+ # Lint/AmbiguousOperator:
10
+ # Reference: 'https://github.com/dbl-works/rubocop-dbl/pull/36'
11
+ # Enabled: true
12
+ #
13
+
14
+ #
15
+ # @NOTE: the following cops are on "pending" by default
16
+ #
17
+ Lint/DuplicateBranch:
18
+ Reference: 'we have no reference for this change'
19
+ Enabled: true
20
+
21
+ Lint/DuplicateRegexpCharacterClassElement:
22
+ Reference: 'we have no reference for this change'
23
+ Enabled: true
24
+
25
+ Lint/EmptyBlock:
26
+ Reference: 'we have no reference for this change'
27
+ Enabled: true
28
+
29
+ Lint/EmptyClass:
30
+ Reference: 'we have no reference for this change'
31
+ Enabled: true
32
+
33
+ Lint/NoReturnInBeginEndBlocks:
34
+ Reference: 'we have no reference for this change'
35
+ Enabled: true
36
+
37
+ Lint/ToEnumArguments:
38
+ Reference: 'we have no reference for this change'
39
+ Enabled: true
40
+
41
+ Lint/UnexpectedBlockArity:
42
+ Reference: 'we have no reference for this change'
43
+ Enabled: true
44
+
45
+ Lint/UnmodifiedReduceAccumulator:
46
+ Reference: 'we have no reference for this change'
47
+ Enabled: true
@@ -0,0 +1,21 @@
1
+ # Defaults for this cop are found here:
2
+ # https://github.com/rubocop/rubocop/blob/master/config/default.yml
3
+ #
4
+ # Add customizations below.
5
+ #
6
+ # Ensure to document why we change a default by linking the corresponding PR.
7
+ # For example:
8
+ #
9
+ # Metrics/BlockLength:
10
+ # Reference: 'https://github.com/dbl-works/rubocop-dbl/pull/37'
11
+ # Enabled: true
12
+ #
13
+
14
+ # @NOTE: IgnoredMethods by default only contains "refine"
15
+ Metrics/BlockLength:
16
+ Reference: 'we have no reference for this change'
17
+ IgnoredMethods:
18
+ - describe
19
+ - context
20
+ - feature
21
+ - scenario
@@ -0,0 +1,17 @@
1
+ # Defaults for this cop are found here:
2
+ # https://github.com/rubocop/rubocop/blob/master/config/default.yml
3
+ #
4
+ # Add customizations below.
5
+ #
6
+ # Ensure to document why we change a default by linking the corresponding PR.
7
+ # For example:
8
+ #
9
+ # Naming/VariableNumber:
10
+ # Reference: 'https://github.com/dbl-works/rubocop-dbl/pull/38'
11
+ # Enabled: true
12
+ #
13
+
14
+ # @NOTE: changed EnforcedStyle from "normalcase" to "snake_case"
15
+ Naming/VariableNumber:
16
+ Reference: 'https://github.com/dbl-works/rubocop-dbl/pull/26'
17
+ EnforcedStyle: snake_case
@@ -0,0 +1,12 @@
1
+ # Defaults for this cop are found here:
2
+ # https://github.com/rubocop/rubocop-performance/blob/master/config/default.yml
3
+ #
4
+ # Add customizations below.
5
+ #
6
+ # Ensure to document why we change a default by linking the corresponding PR.
7
+ # For example:
8
+ #
9
+ # Performance/AncestorsInclude:
10
+ # Reference: 'https://github.com/dbl-works/rubocop-dbl/pull/31'
11
+ # Enabled: true
12
+ #
@@ -0,0 +1,103 @@
1
+ # Defaults for this cop are found here:
2
+ # https://github.com/rubocop/rubocop-rails/blob/master/config/default.yml
3
+ #
4
+ # Add customizations below.
5
+ #
6
+ # Ensure to document why we change a default by linking the corresponding PR.
7
+ # For example:
8
+ #
9
+ # Rails/ActionFilter:
10
+ # Reference: 'https://github.com/dbl-works/rubocop-dbl/pull/33'
11
+ # Enabled: false
12
+ #
13
+
14
+ # @NOTE: added: "staging"
15
+ Rails/UnknownEnv:
16
+ Environments:
17
+ - production
18
+ - development
19
+ - test
20
+ - staging
21
+
22
+ # @NOTE: disabled
23
+ Rails/HttpStatus:
24
+ Reference: 'We have no reference for this change'
25
+ Enabled: false
26
+
27
+ # @NOTE: disabled
28
+ Rails/ApplicationController:
29
+ Reference: 'We have no reference for this change'
30
+ Enabled: false
31
+
32
+
33
+ #
34
+ # @NOTE: all the cops ahead are "pending" in the current default config
35
+ #
36
+ Rails/ActiveRecordCallbacksOrder:
37
+ Reference: 'We have no reference for this change'
38
+ Enabled: true
39
+
40
+ Rails/AfterCommitOverride:
41
+ Reference: 'We have no reference for this change'
42
+ Enabled: true
43
+
44
+ Rails/AttributeDefaultBlockValue:
45
+ Reference: 'We have no reference for this change'
46
+ Enabled: true
47
+
48
+ Rails/FindById:
49
+ Reference: 'We have no reference for this change'
50
+ Enabled: true
51
+
52
+ Rails/Inquiry:
53
+ Reference: 'We have no reference for this change'
54
+ Enabled: true
55
+
56
+ Rails/MailerName:
57
+ Reference: 'We have no reference for this change'
58
+ Enabled: true
59
+
60
+ Rails/MatchRoute:
61
+ Reference: 'We have no reference for this change'
62
+ Enabled: true
63
+
64
+ Rails/NegateInclude:
65
+ Reference: 'We have no reference for this change'
66
+ Enabled: true
67
+
68
+ Rails/Pluck:
69
+ Reference: 'We have no reference for this change'
70
+ Enabled: true
71
+
72
+ Rails/PluckInWhere:
73
+ Reference: 'We have no reference for this change'
74
+ Enabled: true
75
+
76
+ Rails/RenderInline:
77
+ Reference: 'We have no reference for this change'
78
+ Enabled: true
79
+
80
+ Rails/RenderPlainText:
81
+ Reference: 'We have no reference for this change'
82
+ Enabled: true
83
+
84
+ Rails/ShortI18n:
85
+ Reference: 'We have no reference for this change'
86
+ Enabled: true
87
+ EnforcedStyle: aggressive
88
+
89
+ Rails/SquishedSQLHeredocs:
90
+ Reference: 'We have no reference for this change'
91
+ Enabled: true
92
+
93
+ Rails/WhereEquals:
94
+ Reference: 'We have no reference for this change'
95
+ Enabled: true
96
+
97
+ Rails/WhereExists:
98
+ Reference: 'We have no reference for this change'
99
+ Enabled: true
100
+
101
+ Rails/WhereNot:
102
+ Reference: 'We have no reference for this change'
103
+ Enabled: true
@@ -0,0 +1,42 @@
1
+ # Defaults for this cop are found here:
2
+ # https://github.com/rubocop/rubocop-rspec/blob/master/config/default.yml
3
+ #
4
+ # Add customizations below.
5
+ #
6
+ # Ensure to document why we change a default by linking the corresponding PR.
7
+ # For example:
8
+ #
9
+ # RSpec/AlignLeftLetBrace:
10
+ # Reference: 'https://github.com/dbl-works/rubocop-dbl/pull/32'
11
+ # Enabled: true
12
+ #
13
+
14
+
15
+ # @NOTE: added: "if", "and"
16
+ RSpec/ContextWording:
17
+ Reference: 'https://github.com/dbl-works/rubocop-dbl/pull/25'
18
+ Prefixes:
19
+ - when
20
+ - with
21
+ - without
22
+ - if
23
+ - and
24
+
25
+
26
+ # @NOTE: by default, no methods are enabled
27
+ RSpec/Capybara/FeatureMethods:
28
+ Reference: 'https://github.com/dbl-works/rubocop-dbl/pull/25'
29
+ EnabledMethods:
30
+ - feature
31
+ - scenario
32
+
33
+ # @NOTE: increased from 3 to 5
34
+ RSpec/NestedGroups:
35
+ Reference: 'https://github.com/dbl-works/rubocop-dbl/pull/25'
36
+ Max: 5
37
+
38
+
39
+ # @NOTE: increased from 5 to 6
40
+ RSpec/MultipleMemoizedHelpers:
41
+ Reference: 'https://github.com/dbl-works/rubocop-dbl/pull/25'
42
+ Max: 6
@@ -0,0 +1,96 @@
1
+ # Defaults for this cop are found here:
2
+ # https://github.com/rubocop/rubocop/blob/master/config/default.yml
3
+ #
4
+ # Add customizations below.
5
+ #
6
+ # Ensure to document why we change a default by linking the corresponding PR.
7
+ # For example:
8
+ #
9
+ # Style/AndOr:
10
+ # Reference: 'https://github.com/dbl-works/rubocop-dbl/pull/34'
11
+ # Enabled: true
12
+ #
13
+
14
+ # @NOTE: changed from "always" to "never"
15
+ Style/FrozenStringLiteralComment:
16
+ Reference: 'we have no reference for this change'
17
+ EnforcedStyle: never
18
+
19
+ # enforces to use 'name'.to_sym over 'name'.intern and so on
20
+ Style/StringMethods:
21
+ Reference: 'we have no reference for this change'
22
+ Enabled: true
23
+
24
+ # @NOTE: changed from "compact" to "expanded"
25
+ Style/EmptyMethod:
26
+ Reference: 'we have no reference for this change'
27
+ EnforcedStyle: expanded
28
+ SupportedStyles:
29
+ - compact
30
+ - expanded
31
+
32
+ # @NOTE: allowed AllowMultipleReturnValues
33
+ Style/RedundantReturn:
34
+ Reference: 'we have no reference for this change'
35
+ Enabled: true
36
+ AllowMultipleReturnValues: true
37
+
38
+ # @NOTE: allowed AllowAsExpressionSeparator
39
+ Style/Semicolon:
40
+ Reference: 'we have no reference for this change'
41
+ Enabled: true
42
+ AllowAsExpressionSeparator: true
43
+
44
+ Style/CollectionMethods:
45
+ Reference: 'we have no reference for this change'
46
+ Enabled: true
47
+
48
+ Style/Documentation:
49
+ Reference: 'we have no reference for this change'
50
+ Enabled: false
51
+
52
+ # @NOTE: changed EnforcedStyleForMultiline from "no_comma" to "comma"
53
+ Style/TrailingCommaInArguments:
54
+ Reference: 'https://github.com/dbl-works/rubocop-dbl/pull/27'
55
+ EnforcedStyleForMultiline: comma
56
+
57
+ # @NOTE: changed EnforcedStyleForMultiline from "no_comma" to "comma"
58
+ Style/TrailingCommaInArrayLiteral:
59
+ Reference: 'https://github.com/dbl-works/rubocop-dbl/pull/24'
60
+ EnforcedStyleForMultiline: comma
61
+
62
+ # @NOTE: changed EnforcedStyleForMultiline from "no_comma" to "comma"
63
+ Style/TrailingCommaInHashLiteral:
64
+ Reference: 'https://github.com/dbl-works/rubocop-dbl/pull/24'
65
+ EnforcedStyleForMultiline: comma
66
+
67
+ #
68
+ # @NOTE: the following cops are "pending" by default
69
+ #
70
+ Style/ArgumentsForwarding:
71
+ Reference: 'we have no reference for this change'
72
+ Enabled: false
73
+
74
+ Style/CollectionCompact:
75
+ Reference: 'we have no reference for this change'
76
+ Enabled: true
77
+
78
+ Style/DocumentDynamicEvalDefinition:
79
+ Reference: 'we have no reference for this change'
80
+ Enabled: true
81
+
82
+ Style/NegatedIfElseCondition:
83
+ Reference: 'we have no reference for this change'
84
+ Enabled: true
85
+
86
+ Style/NilLambda:
87
+ Reference: 'we have no reference for this change'
88
+ Enabled: true
89
+
90
+ Style/RedundantArgument:
91
+ Reference: 'we have no reference for this change'
92
+ Enabled: true
93
+
94
+ Style/SwapValues:
95
+ Reference: 'we have no reference for this change'
96
+ Enabled: true
@@ -0,0 +1,19 @@
1
+ # Defaults for this cop are found here:
2
+ # https://github.com/rubocop/rubocop/blob/master/config/default.yml
3
+ #
4
+ # Add customizations below.
5
+ #
6
+ # Ensure to document why we change a default by linking the corresponding PR.
7
+ # For example:
8
+ #
9
+ # Style/AndOr:
10
+ # Reference: 'https://github.com/dbl-works/rubocop-dbl/pull/34'
11
+ # Enabled: true
12
+ #
13
+
14
+ Sorbet/HasSigil:
15
+ MinimumStrictness: true
16
+ SuggestedStrictness: strict
17
+ Exclude:
18
+ - spec/**/*
19
+ - test/**/*
data/config/dbl.yml CHANGED
@@ -1,21 +1,27 @@
1
1
  require:
2
2
  - rubocop-packaging
3
3
  - rubocop-performance
4
- - rubocop-rspec
5
4
  - rubocop-rails
5
+ - rubocop-rspec
6
+ - rubocop-sorbet
7
+
6
8
 
7
- #############
8
- #############
9
- #############
10
- # @TODO: we will have to agree on some rules here and update this file
11
- #############
12
- #############
13
- #############
9
+ inherit_from:
10
+ - cops/layout.yml
11
+ - cops/lint.yml
12
+ - cops/metrics.yml
13
+ - cops/naming.yml
14
+ - cops/performance.yml
15
+ - cops/rails.yml
16
+ - cops/rspec.yml
17
+ - cops/style.yml
18
+ - cops/types.yml
14
19
 
20
+
21
+ # if you want to change the cache directory, simple set `RUBOCOP_CACHE_ROOT` for your local shell.
22
+ # see: https://docs.rubocop.org/rubocop/usage/caching.html
15
23
  AllCops:
16
24
  UseCache: true
17
- MaxFilesInCache: 5
18
- CacheRootDirectory: ./tmp/**
19
25
  TargetRubyVersion: 2.7.2
20
26
  NewCops: enable
21
27
  Exclude:
@@ -30,476 +36,3 @@ AllCops:
30
36
  - 'bin/**/*'
31
37
  - 'config/**/*'
32
38
  - 'db/**/*'
33
-
34
- Rails/UnknownEnv:
35
- Environments:
36
- - production
37
- - development
38
- - test
39
- - staging
40
-
41
- Rails/HttpStatus:
42
- Enabled: false
43
-
44
- Rails/ApplicationController:
45
- Enabled: false
46
-
47
- # Prefer assert_not over assert !
48
- Rails/AssertNot:
49
- Include:
50
- - '**/test/**/*'
51
-
52
- # Prefer assert_not_x over refute_x
53
- Rails/RefuteMethods:
54
- Include:
55
- - '**/test/**/*'
56
-
57
- Rails/IndexBy:
58
- Enabled: true
59
-
60
- Rails/IndexWith:
61
- Enabled: true
62
-
63
- Rails/ActiveRecordCallbacksOrder:
64
- Enabled: true
65
-
66
- Rails/AfterCommitOverride:
67
- Enabled: true
68
-
69
- Rails/AttributeDefaultBlockValue:
70
- Enabled: true
71
-
72
- Rails/FindById:
73
- Enabled: true
74
-
75
- Rails/Inquiry:
76
- Enabled: true
77
-
78
- Rails/MailerName:
79
- Enabled: true
80
-
81
- Rails/MatchRoute:
82
- Enabled: true
83
-
84
- Rails/NegateInclude:
85
- Enabled: true
86
-
87
- Rails/Pluck:
88
- Enabled: true
89
-
90
- Rails/PluckInWhere:
91
- Enabled: true
92
-
93
- Rails/RenderInline:
94
- Enabled: true
95
-
96
- Rails/RenderPlainText:
97
- Enabled: true
98
-
99
- Rails/ShortI18n:
100
- Enabled: true
101
- EnforcedStyle: aggressive
102
-
103
- Rails/SquishedSQLHeredocs:
104
- Enabled: true
105
-
106
- Rails/WhereEquals:
107
- Enabled: true
108
-
109
- Rails/WhereExists:
110
- Enabled: true
111
-
112
- Rails/WhereNot:
113
- Enabled: true
114
-
115
- # Layout
116
-
117
- # Align `when` with `case`.
118
- Layout/CaseIndentation:
119
- Enabled: true
120
-
121
- Layout/ClosingHeredocIndentation:
122
- Enabled: true
123
-
124
- # Align comments with method definitions.
125
- Layout/CommentIndentation:
126
- Enabled: true
127
-
128
- Layout/ElseAlignment:
129
- Enabled: true
130
-
131
- # Align `end` with the matching keyword or starting expression except for
132
- # assignments, where it should be aligned with the LHS.
133
- Layout/EndAlignment:
134
- Enabled: true
135
- EnforcedStyleAlignWith: variable
136
- AutoCorrect: true
137
-
138
- Layout/ParameterAlignment:
139
- EnforcedStyle: with_fixed_indentation
140
- SupportedStyles:
141
- - with_first_parameter
142
- - with_fixed_indentation
143
-
144
- Layout/EmptyLineAfterMagicComment:
145
- Enabled: true
146
-
147
- Layout/EmptyLinesAroundAccessModifier:
148
- Enabled: true
149
-
150
- Layout/EmptyLinesAroundBlockBody:
151
- Enabled: true
152
-
153
- # In a regular class definition, no empty lines around the body.
154
- Layout/EmptyLinesAroundClassBody:
155
- Enabled: true
156
-
157
- # In a regular method definition, no empty lines around the body.
158
- Layout/EmptyLinesAroundMethodBody:
159
- Enabled: true
160
-
161
- # In a regular module definition, no empty lines around the body.
162
- Layout/EmptyLinesAroundModuleBody:
163
- Enabled: true
164
-
165
- Layout/FirstArgumentIndentation:
166
- Enabled: true
167
-
168
- Layout/IndentationConsistency:
169
- Enabled: true
170
-
171
- # Two spaces, no tabs (for indentation).
172
- Layout/IndentationWidth:
173
- Enabled: true
174
-
175
- Layout/LeadingCommentSpace:
176
- Enabled: true
177
-
178
- Layout/SpaceAfterColon:
179
- Enabled: true
180
-
181
- Layout/SpaceAfterComma:
182
- Enabled: true
183
-
184
- Layout/SpaceAfterSemicolon:
185
- Enabled: true
186
-
187
- Layout/SpaceAroundEqualsInParameterDefault:
188
- Enabled: true
189
-
190
- Layout/SpaceAroundKeyword:
191
- Enabled: true
192
-
193
- Layout/SpaceAroundOperators:
194
- Enabled: true
195
-
196
- Layout/SpaceBeforeComma:
197
- Enabled: true
198
-
199
- Layout/SpaceBeforeComment:
200
- Enabled: true
201
-
202
- Layout/SpaceBeforeFirstArg:
203
- Enabled: true
204
-
205
- # Use `foo {}` not `foo{}`.
206
- Layout/SpaceBeforeBlockBraces:
207
- Enabled: true
208
-
209
- # Use `foo { bar }` not `foo {bar}`.
210
- Layout/SpaceInsideBlockBraces:
211
- Enabled: true
212
- EnforcedStyleForEmptyBraces: space
213
-
214
- # Use `{ a: 1 }` not `{a:1}`.
215
- Layout/SpaceInsideHashLiteralBraces:
216
- Enabled: true
217
-
218
- Layout/SpaceInsideParens:
219
- Enabled: true
220
-
221
- # Detect hard tabs, no hard tabs.
222
- Layout/IndentationStyle:
223
- Enabled: true
224
-
225
- # Empty lines should not have any spaces.
226
- Layout/TrailingEmptyLines:
227
- Enabled: true
228
-
229
- # No trailing whitespace.
230
- Layout/TrailingWhitespace:
231
- Enabled: true
232
-
233
- Layout/HashAlignment:
234
- EnforcedHashRocketStyle: key
235
- EnforcedColonStyle: key
236
-
237
-
238
- # Naming
239
-
240
- Naming/VariableNumber:
241
- EnforcedStyle: snake_case
242
-
243
- # Style
244
-
245
- # Prefer &&/|| over and/or.
246
- Style/AndOr:
247
- Enabled: true
248
-
249
- # Use Ruby >= 1.9 syntax for hashes. Prefer { a: :b } over { :a => :b }.
250
- Style/HashSyntax:
251
- Enabled: true
252
-
253
- Style/DefWithParentheses:
254
- Enabled: true
255
-
256
- # Defining a method with parameters needs parentheses.
257
- Style/MethodDefParentheses:
258
- Enabled: true
259
-
260
- Style/FrozenStringLiteralComment:
261
- EnforcedStyle: never
262
-
263
- Style/RedundantFreeze:
264
- Enabled: true
265
-
266
- # Check quotes usage according to lint rule below.
267
- Style/StringLiterals:
268
- Enabled: true
269
- EnforcedStyle: single_quotes
270
-
271
- # Use quotes for string literals when they are enough.
272
- Style/RedundantPercentQ:
273
- Enabled: true
274
-
275
- Style/ParenthesesAroundCondition:
276
- Enabled: true
277
-
278
- Style/HashTransformKeys:
279
- Enabled: true
280
-
281
- Style/HashTransformValues:
282
- Enabled: true
283
-
284
- # enforces to use 'name'.to_sym over 'name'.intern and so on
285
- Style/StringMethods:
286
- Enabled: true
287
-
288
- Style/EmptyMethod:
289
- EnforcedStyle: expanded
290
- SupportedStyles:
291
- - compact
292
- - expanded
293
-
294
- Style/SymbolArray:
295
- Enabled: true
296
-
297
- Style/RedundantBegin:
298
- Enabled: true
299
-
300
- Style/RedundantReturn:
301
- Enabled: true
302
- AllowMultipleReturnValues: true
303
-
304
- Style/RedundantRegexpEscape:
305
- Enabled: true
306
-
307
- Style/Semicolon:
308
- Enabled: true
309
- AllowAsExpressionSeparator: true
310
-
311
- # Prefer Foo.method over Foo::method
312
- Style/ColonMethodCall:
313
- Enabled: true
314
-
315
- Style/CollectionMethods:
316
- Enabled: true
317
-
318
- Style/Documentation:
319
- Enabled: false
320
-
321
- Style/TrivialAccessors:
322
- Enabled: true
323
-
324
- Style/ArgumentsForwarding:
325
- Enabled: false
326
-
327
- Style/CollectionCompact:
328
- Enabled: true
329
-
330
- Style/DocumentDynamicEvalDefinition:
331
- Enabled: true
332
-
333
- Style/NegatedIfElseCondition:
334
- Enabled: true
335
-
336
- Style/NilLambda:
337
- Enabled: true
338
-
339
- Style/RedundantArgument:
340
- Enabled: true
341
-
342
- Style/SwapValues:
343
- Enabled: true
344
-
345
- Style/TrailingCommaInArguments:
346
- EnforcedStyleForMultiline: comma
347
-
348
- Style/TrailingCommaInArrayLiteral:
349
- EnforcedStyleForMultiline: comma
350
-
351
- Style/TrailingCommaInHashLiteral:
352
- EnforcedStyleForMultiline: comma
353
-
354
- # Metrics
355
-
356
- Metrics/BlockLength:
357
- IgnoredMethods: ['describe', 'context', 'feature', 'scenario']
358
-
359
- # Lint
360
-
361
- Lint/AmbiguousOperator:
362
- Enabled: true
363
-
364
- Lint/AmbiguousRegexpLiteral:
365
- Enabled: true
366
-
367
- Lint/ErbNewArguments:
368
- Enabled: true
369
-
370
- # Use my_method(my_arg) not my_method( my_arg ) or my_method my_arg.
371
- Lint/RequireParentheses:
372
- Enabled: true
373
-
374
- Lint/ShadowingOuterLocalVariable:
375
- Enabled: true
376
-
377
- Lint/RedundantStringCoercion:
378
- Enabled: true
379
-
380
- Lint/UriEscapeUnescape:
381
- Enabled: true
382
-
383
- Lint/UselessAssignment:
384
- Enabled: true
385
-
386
- Lint/DeprecatedClassMethods:
387
- Enabled: true
388
-
389
- Lint/DuplicateBranch:
390
- Enabled: true
391
-
392
- Lint/DuplicateRegexpCharacterClassElement:
393
- Enabled: true
394
-
395
- Lint/EmptyBlock:
396
- Enabled: true
397
-
398
- Lint/EmptyClass:
399
- Enabled: true
400
-
401
- Lint/NoReturnInBeginEndBlocks:
402
- Enabled: true
403
-
404
- Lint/ToEnumArguments:
405
- Enabled: true
406
-
407
- Lint/UnexpectedBlockArity:
408
- Enabled: true
409
-
410
- Lint/UnmodifiedReduceAccumulator:
411
- Enabled: true
412
-
413
-
414
- # Performance
415
-
416
- Performance:
417
- Exclude:
418
- - '**/test/**/*'
419
-
420
- Performance/FlatMap:
421
- Enabled: true
422
-
423
- Performance/RedundantMerge:
424
- Enabled: true
425
-
426
- Performance/StartWith:
427
- Enabled: true
428
-
429
- Performance/EndWith:
430
- Enabled: true
431
-
432
- Performance/RegexpMatch:
433
- Enabled: true
434
-
435
- Performance/ReverseEach:
436
- Enabled: true
437
-
438
- Performance/UnfreezeString:
439
- Enabled: true
440
-
441
- Performance/DeletePrefix:
442
- Enabled: true
443
-
444
- Performance/DeleteSuffix:
445
- Enabled: true
446
-
447
- Performance/AncestorsInclude:
448
- Enabled: true
449
-
450
- Performance/BigDecimalWithNumericArgument:
451
- Enabled: false
452
-
453
- Performance/BlockGivenWithExplicitBlock:
454
- Enabled: true
455
-
456
- Performance/CollectionLiteralInLoop:
457
- Enabled: true
458
-
459
- Performance/ConstantRegexp:
460
- Enabled: true
461
-
462
- Performance/MethodObjectAsBlock:
463
- Enabled: false
464
-
465
- Performance/RedundantSortBlock:
466
- Enabled: true
467
-
468
- Performance/RedundantStringChars:
469
- Enabled: true
470
-
471
- Performance/ReverseFirst:
472
- Enabled: true
473
-
474
- Performance/SortReverse:
475
- Enabled: true
476
-
477
- Performance/Squeeze:
478
- Enabled: true
479
-
480
- Performance/StringInclude:
481
- Enabled: true
482
-
483
- Performance/Sum:
484
- Enabled: true
485
-
486
- # Rspec rules
487
-
488
- RSpec/ContextWording:
489
- Prefixes:
490
- - when
491
- - with
492
- - without
493
- - if
494
- - and
495
-
496
- RSpec/Capybara/FeatureMethods:
497
- EnabledMethods:
498
- - feature
499
- - scenario
500
-
501
- RSpec/NestedGroups:
502
- Max: 5
503
-
504
- RSpec/MultipleMemoizedHelpers:
505
- Max: 6
@@ -1,3 +1,5 @@
1
+ # typed: false
2
+
1
3
  require 'rails/generators/base'
2
4
  require 'active_support/core_ext/string'
3
5
 
@@ -0,0 +1,5 @@
1
+ # typed: false
2
+
3
+ module RubocopDbl
4
+ VERSION = '1.0.1'.freeze
5
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-dbl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - 'Team DBL :rocket:'
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-23 00:00:00.000000000 Z
11
+ date: 2022-12-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -16,112 +16,137 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '5.0'
19
+ version: '5'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '5.0'
26
+ version: '5'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rubocop
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '1.5'
33
+ version: '1'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '1.5'
40
+ version: '1'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rubocop-ast
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 1.0.1
47
+ version: '1'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 1.0.1
54
+ version: '1'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rubocop-packaging
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0.4'
61
+ version: '0.5'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '0.4'
68
+ version: '0.5'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rubocop-performance
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '1.3'
75
+ version: '1'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '1.3'
82
+ version: '1'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rubocop-rails
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '2.0'
89
+ version: '2'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '2.0'
96
+ version: '2'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rubocop-rspec
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '2.1'
103
+ version: '2'
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '2'
111
+ - !ruby/object:Gem::Dependency
112
+ name: rubocop-sorbet
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: '0.6'
104
118
  type: :runtime
105
119
  prerelease: false
106
120
  version_requirements: !ruby/object:Gem::Requirement
107
121
  requirements:
108
122
  - - "~>"
109
123
  - !ruby/object:Gem::Version
110
- version: '2.1'
124
+ version: '0.6'
111
125
  description: RuboCop configuration for our Ruby on Rails projects
112
- email: me@toshimaru.net
126
+ email: oss@dbl.works
113
127
  executables: []
114
128
  extensions: []
115
129
  extra_rdoc_files: []
116
130
  files:
117
131
  - LICENSE
118
132
  - README.md
133
+ - config/cops/layout.yml
134
+ - config/cops/lint.yml
135
+ - config/cops/metrics.yml
136
+ - config/cops/naming.yml
137
+ - config/cops/performance.yml
138
+ - config/cops/rails.yml
139
+ - config/cops/rspec.yml
140
+ - config/cops/style.yml
141
+ - config/cops/types.yml
119
142
  - config/dbl.yml
120
143
  - lib/generators/rubocop_dbl/install_generator.rb
144
+ - lib/rubocop_dbl/version.rb
121
145
  homepage: https://github.com/dbl-works/rubocop-dbl
122
146
  licenses:
123
147
  - MIT
124
- metadata: {}
148
+ metadata:
149
+ rubygems_mfa_required: 'true'
125
150
  post_install_message:
126
151
  rdoc_options: []
127
152
  require_paths:
@@ -130,14 +155,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
130
155
  requirements:
131
156
  - - ">="
132
157
  - !ruby/object:Gem::Version
133
- version: 2.4.0
158
+ version: '2.7'
134
159
  required_rubygems_version: !ruby/object:Gem::Requirement
135
160
  requirements:
136
161
  - - ">="
137
162
  - !ruby/object:Gem::Version
138
163
  version: '0'
139
164
  requirements: []
140
- rubygems_version: 3.0.3
165
+ rubygems_version: 3.1.6
141
166
  signing_key:
142
167
  specification_version: 4
143
168
  summary: RuboCop configuration for our Ruby on Rails projects