rubocop-dbl 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/config/cops/layout.yml +26 -0
- data/config/cops/lint.yml +38 -0
- data/config/cops/metrics.yml +19 -0
- data/config/cops/naming.yml +16 -0
- data/config/cops/performance.yml +11 -0
- data/config/cops/rails.yml +83 -0
- data/config/cops/rspec.yml +37 -0
- data/config/cops/style.yml +78 -0
- data/config/cops/types.yml +18 -0
- data/lib/generators/rubocop_dbl/install_generator.rb +1 -0
- data/lib/rubocop_dbl/version.rb +1 -1
- metadata +12 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8558583841f690643ee75e260ac5de01bf09326f20608c4005ec4ed285ef1b23
|
4
|
+
data.tar.gz: 9fb41eca523ec7a0afe85d5c9ecf4b4a95390004dbc7188da76a24a55b5e6344
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5249980d5ca07dee5e08b47ecf003d7a22c9c816c468d9571db7d77094b529fbb65fef426dcafb89ada6c2625bdd55e010c7f911fd4eaea4a7df8a03a4ee6c60
|
7
|
+
data.tar.gz: e91569daf478e8a1351d107836af01f79e65e2c3fc48a94db41c16efe4f9e4f7f17638da2f289e33c5228678a62f159519d425125a3b5c8a18e6a5e77ed1861e
|
data/README.md
CHANGED
@@ -123,7 +123,7 @@ take note of the most current version of the gem, which will be printed to conso
|
|
123
123
|
* publish the gem as follows
|
124
124
|
|
125
125
|
```shell
|
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
|
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
|
127
127
|
```
|
128
128
|
|
129
129
|
replacing `YOUR_GITHUB_USER_NAME`, `YOUR_PAT`, `CURRENT_GEM_VERSION` with the appropriate values.
|
@@ -0,0 +1,26 @@
|
|
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
|
+
# Enabled: true
|
11
|
+
#
|
12
|
+
|
13
|
+
# Align `end` with the matching keyword or starting expression except for
|
14
|
+
# assignments, where it should be aligned with the LHS.
|
15
|
+
# @NOTE: changed EnforcedStyleAlignWith from "keyword" to "variable"
|
16
|
+
Layout/EndAlignment:
|
17
|
+
Enabled: true
|
18
|
+
EnforcedStyleAlignWith: variable
|
19
|
+
AutoCorrect: true
|
20
|
+
|
21
|
+
# @NOTE: changed EnforcedStyle from "with_first_parameter" to "with_fixed_indentation"
|
22
|
+
Layout/ParameterAlignment:
|
23
|
+
EnforcedStyle: with_fixed_indentation
|
24
|
+
SupportedStyles:
|
25
|
+
- with_first_parameter
|
26
|
+
- with_fixed_indentation
|
@@ -0,0 +1,38 @@
|
|
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
|
+
# Enabled: true
|
11
|
+
#
|
12
|
+
|
13
|
+
#
|
14
|
+
# @NOTE: the following cops are on "pending" by default
|
15
|
+
#
|
16
|
+
Lint/DuplicateBranch:
|
17
|
+
Enabled: true
|
18
|
+
|
19
|
+
Lint/DuplicateRegexpCharacterClassElement:
|
20
|
+
Enabled: true
|
21
|
+
|
22
|
+
Lint/EmptyBlock:
|
23
|
+
Enabled: true
|
24
|
+
|
25
|
+
Lint/EmptyClass:
|
26
|
+
Enabled: true
|
27
|
+
|
28
|
+
Lint/NoReturnInBeginEndBlocks:
|
29
|
+
Enabled: true
|
30
|
+
|
31
|
+
Lint/ToEnumArguments:
|
32
|
+
Enabled: true
|
33
|
+
|
34
|
+
Lint/UnexpectedBlockArity:
|
35
|
+
Enabled: true
|
36
|
+
|
37
|
+
Lint/UnmodifiedReduceAccumulator:
|
38
|
+
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
|
+
# Metrics/BlockLength:
|
10
|
+
# Enabled: true
|
11
|
+
#
|
12
|
+
|
13
|
+
# @NOTE: IgnoredMethods by default only contains "refine"
|
14
|
+
Metrics/BlockLength:
|
15
|
+
Exclude:
|
16
|
+
- describe
|
17
|
+
- context
|
18
|
+
- feature
|
19
|
+
- scenario
|
@@ -0,0 +1,16 @@
|
|
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
|
+
# Enabled: true
|
11
|
+
#
|
12
|
+
|
13
|
+
# @NOTE: changed EnforcedStyle from "normalcase" to "snake_case"
|
14
|
+
# https://github.com/dbl-works/rubocop-dbl/pull/26
|
15
|
+
Naming/VariableNumber:
|
16
|
+
EnforcedStyle: snake_case
|
@@ -0,0 +1,11 @@
|
|
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
|
+
# Enabled: true
|
11
|
+
#
|
@@ -0,0 +1,83 @@
|
|
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
|
+
# Enabled: false
|
11
|
+
#
|
12
|
+
|
13
|
+
# @NOTE: added: "staging"
|
14
|
+
Rails/UnknownEnv:
|
15
|
+
Environments:
|
16
|
+
- production
|
17
|
+
- development
|
18
|
+
- test
|
19
|
+
- staging
|
20
|
+
|
21
|
+
# @NOTE: disabled
|
22
|
+
Rails/HttpStatus:
|
23
|
+
Enabled: false
|
24
|
+
|
25
|
+
# @NOTE: disabled
|
26
|
+
Rails/ApplicationController:
|
27
|
+
Enabled: false
|
28
|
+
|
29
|
+
|
30
|
+
#
|
31
|
+
# @NOTE: all the cops ahead are "pending" in the current default config
|
32
|
+
#
|
33
|
+
Rails/ActiveRecordCallbacksOrder:
|
34
|
+
Enabled: true
|
35
|
+
|
36
|
+
Rails/AfterCommitOverride:
|
37
|
+
Enabled: true
|
38
|
+
|
39
|
+
Rails/AttributeDefaultBlockValue:
|
40
|
+
Enabled: true
|
41
|
+
|
42
|
+
Rails/FindById:
|
43
|
+
Enabled: true
|
44
|
+
|
45
|
+
Rails/Inquiry:
|
46
|
+
Enabled: true
|
47
|
+
|
48
|
+
Rails/MailerName:
|
49
|
+
Enabled: true
|
50
|
+
|
51
|
+
Rails/MatchRoute:
|
52
|
+
Enabled: true
|
53
|
+
|
54
|
+
Rails/NegateInclude:
|
55
|
+
Enabled: true
|
56
|
+
|
57
|
+
Rails/Pluck:
|
58
|
+
Enabled: true
|
59
|
+
|
60
|
+
Rails/PluckInWhere:
|
61
|
+
Enabled: true
|
62
|
+
|
63
|
+
Rails/RenderInline:
|
64
|
+
Enabled: true
|
65
|
+
|
66
|
+
Rails/RenderPlainText:
|
67
|
+
Enabled: true
|
68
|
+
|
69
|
+
Rails/ShortI18n:
|
70
|
+
Enabled: true
|
71
|
+
EnforcedStyle: aggressive
|
72
|
+
|
73
|
+
Rails/SquishedSQLHeredocs:
|
74
|
+
Enabled: true
|
75
|
+
|
76
|
+
Rails/WhereEquals:
|
77
|
+
Enabled: true
|
78
|
+
|
79
|
+
Rails/WhereExists:
|
80
|
+
Enabled: true
|
81
|
+
|
82
|
+
Rails/WhereNot:
|
83
|
+
Enabled: true
|
@@ -0,0 +1,37 @@
|
|
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
|
+
# Enabled: true
|
11
|
+
#
|
12
|
+
|
13
|
+
|
14
|
+
# @NOTE: added: "if", "and"
|
15
|
+
RSpec/ContextWording:
|
16
|
+
Prefixes:
|
17
|
+
- when
|
18
|
+
- with
|
19
|
+
- without
|
20
|
+
- if
|
21
|
+
- and
|
22
|
+
|
23
|
+
|
24
|
+
# @NOTE: by default, no methods are enabled
|
25
|
+
RSpec/Capybara/FeatureMethods:
|
26
|
+
EnabledMethods:
|
27
|
+
- feature
|
28
|
+
- scenario
|
29
|
+
|
30
|
+
# @NOTE: increased from 3 to 5
|
31
|
+
RSpec/NestedGroups:
|
32
|
+
Max: 5
|
33
|
+
|
34
|
+
|
35
|
+
# @NOTE: increased from 5 to 6
|
36
|
+
RSpec/MultipleMemoizedHelpers:
|
37
|
+
Max: 6
|
@@ -0,0 +1,78 @@
|
|
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
|
+
# Enabled: true
|
11
|
+
#
|
12
|
+
|
13
|
+
# @NOTE: changed from "always" to "never"
|
14
|
+
Style/FrozenStringLiteralComment:
|
15
|
+
EnforcedStyle: never
|
16
|
+
|
17
|
+
# enforces to use 'name'.to_sym over 'name'.intern and so on
|
18
|
+
Style/StringMethods:
|
19
|
+
Enabled: true
|
20
|
+
|
21
|
+
# @NOTE: changed from "compact" to "expanded"
|
22
|
+
Style/EmptyMethod:
|
23
|
+
EnforcedStyle: expanded
|
24
|
+
SupportedStyles:
|
25
|
+
- compact
|
26
|
+
- expanded
|
27
|
+
|
28
|
+
# @NOTE: allowed AllowMultipleReturnValues
|
29
|
+
Style/RedundantReturn:
|
30
|
+
Enabled: true
|
31
|
+
AllowMultipleReturnValues: true
|
32
|
+
|
33
|
+
# @NOTE: allowed AllowAsExpressionSeparator
|
34
|
+
Style/Semicolon:
|
35
|
+
Enabled: true
|
36
|
+
AllowAsExpressionSeparator: true
|
37
|
+
|
38
|
+
Style/CollectionMethods:
|
39
|
+
Enabled: true
|
40
|
+
|
41
|
+
Style/Documentation:
|
42
|
+
Enabled: false
|
43
|
+
|
44
|
+
# @NOTE: changed EnforcedStyleForMultiline from "no_comma" to "comma"
|
45
|
+
Style/TrailingCommaInArguments:
|
46
|
+
EnforcedStyleForMultiline: comma
|
47
|
+
|
48
|
+
# @NOTE: changed EnforcedStyleForMultiline from "no_comma" to "comma"
|
49
|
+
Style/TrailingCommaInArrayLiteral:
|
50
|
+
EnforcedStyleForMultiline: comma
|
51
|
+
|
52
|
+
# @NOTE: changed EnforcedStyleForMultiline from "no_comma" to "comma"
|
53
|
+
Style/TrailingCommaInHashLiteral:
|
54
|
+
EnforcedStyleForMultiline: comma
|
55
|
+
|
56
|
+
#
|
57
|
+
# @NOTE: the following cops are "pending" by default
|
58
|
+
#
|
59
|
+
Style/ArgumentsForwarding:
|
60
|
+
Enabled: false
|
61
|
+
|
62
|
+
Style/CollectionCompact:
|
63
|
+
Enabled: true
|
64
|
+
|
65
|
+
Style/DocumentDynamicEvalDefinition:
|
66
|
+
Enabled: true
|
67
|
+
|
68
|
+
Style/NegatedIfElseCondition:
|
69
|
+
Enabled: true
|
70
|
+
|
71
|
+
Style/NilLambda:
|
72
|
+
Enabled: true
|
73
|
+
|
74
|
+
Style/RedundantArgument:
|
75
|
+
Enabled: true
|
76
|
+
|
77
|
+
Style/SwapValues:
|
78
|
+
Enabled: true
|
@@ -0,0 +1,18 @@
|
|
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
|
+
# Enabled: true
|
11
|
+
#
|
12
|
+
|
13
|
+
Sorbet/HasSigil:
|
14
|
+
MinimumStrictness: true
|
15
|
+
SuggestedStrictness: strict
|
16
|
+
Exclude:
|
17
|
+
- spec/**/*
|
18
|
+
- test/**/*
|
data/lib/rubocop_dbl/version.rb
CHANGED
metadata
CHANGED
@@ -1,29 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop-dbl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
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:
|
11
|
+
date: 2023-06-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: railties
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - ">="
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '5'
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - ">="
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '5'
|
27
13
|
- !ruby/object:Gem::Dependency
|
28
14
|
name: rubocop
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|
@@ -130,6 +116,15 @@ extra_rdoc_files: []
|
|
130
116
|
files:
|
131
117
|
- LICENSE
|
132
118
|
- README.md
|
119
|
+
- config/cops/layout.yml
|
120
|
+
- config/cops/lint.yml
|
121
|
+
- config/cops/metrics.yml
|
122
|
+
- config/cops/naming.yml
|
123
|
+
- config/cops/performance.yml
|
124
|
+
- config/cops/rails.yml
|
125
|
+
- config/cops/rspec.yml
|
126
|
+
- config/cops/style.yml
|
127
|
+
- config/cops/types.yml
|
133
128
|
- config/dbl.yml
|
134
129
|
- lib/generators/rubocop_dbl/install_generator.rb
|
135
130
|
- lib/rubocop_dbl/version.rb
|
@@ -153,7 +148,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
153
148
|
- !ruby/object:Gem::Version
|
154
149
|
version: '0'
|
155
150
|
requirements: []
|
156
|
-
rubygems_version: 3.
|
151
|
+
rubygems_version: 3.4.13
|
157
152
|
signing_key:
|
158
153
|
specification_version: 4
|
159
154
|
summary: RuboCop configuration for our Ruby on Rails projects
|