rubocop-dbl 1.0.0 → 1.0.1
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 +4 -4
- data/README.md +1 -1
- data/config/cops/layout.yml +29 -0
- data/config/cops/lint.yml +47 -0
- data/config/cops/metrics.yml +21 -0
- data/config/cops/naming.yml +17 -0
- data/config/cops/performance.yml +12 -0
- data/config/cops/rails.yml +103 -0
- data/config/cops/rspec.yml +42 -0
- data/config/cops/style.yml +96 -0
- data/config/cops/types.yml +19 -0
- data/lib/rubocop_dbl/version.rb +1 -1
- metadata +10 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 33d84cbb963636c197eb383d365027dd6bef5f7f3fbc0ad8ba2bb0e3309b07a1
|
|
4
|
+
data.tar.gz: 4ddd2edba86d33828d36893e96e6d4a56eaff68aac4c855bca1be0dfa6546e4d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6274efeff7d90d4c95687018d3789046c439c3ffed2bf589f1f87832358aa116bafb7c60778eebc09d749ee9a6c1426c00ccf686b7457d377ae8ff1653a56cbd
|
|
7
|
+
data.tar.gz: e93a63b62e52407033324b44ea29847dbb66b7eaae092ec5c982309abe640a95685c05677221ff2cc0dcf9df2a16937610c8c64e08b8ec9646f5b0abf8a2e8c9
|
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,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/lib/rubocop_dbl/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rubocop-dbl
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- 'Team DBL :rocket:'
|
|
@@ -130,6 +130,15 @@ extra_rdoc_files: []
|
|
|
130
130
|
files:
|
|
131
131
|
- LICENSE
|
|
132
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
|
|
133
142
|
- config/dbl.yml
|
|
134
143
|
- lib/generators/rubocop_dbl/install_generator.rb
|
|
135
144
|
- lib/rubocop_dbl/version.rb
|