rubocop-cargosense 0.1.0 → 0.2.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: c72056ae5e176a177af44006de8034c7559f7e7e90018d3282fdfb1f6c5430b9
4
- data.tar.gz: 1ea28f20a44a78ab4730881c22f9ff756b86fd6f2577e224e9f4bb1f0bbdc522
3
+ metadata.gz: 7af7d9bbcbea87dc2e8bc382c2e467b59b98552d136555f2d40ff0cda74a8cb8
4
+ data.tar.gz: 89ccf5cf750d1ab78407beb04d1e412aeae906e95458fb7530ccd497ecc4788f
5
5
  SHA512:
6
- metadata.gz: 314891ce08a392c02143cfd6969d52ee4090bc1fa0b3db6236bc27fd9320c2069b1c01b89143f3caea8b7d691e6c963ed31ae5b2ab7c89bde7a0afdcae1102db
7
- data.tar.gz: 9b1fa52647312ef6400c305b0945385a4ac408f5c22ce71c4293cfdff2dd138cc9da31f879ab657eca3c10f4aab5fe6fea2ebee6d5f31f7d0a377e1118638281
6
+ metadata.gz: 8370ab0edbbeff9b14b39c6f407de7fd0ffd4c03ed8ae21a3d9bf551fd96f438802ade8bf85645090dee60c2296e558aec536029668a740c32e1374c3be3accc
7
+ data.tar.gz: 4520c0dbe66c693d73da876180c70c538b0e25008ef819659d3648d385353e5c4abfe91d61118b51a0acb0ea822ca7c00ef3ae673c1b1e45591845f9f52075f9
data/README.md CHANGED
@@ -27,7 +27,7 @@ require:
27
27
  > [!TIP]
28
28
  > If rubocop-cargosense is your project's only RuboCop extension, you can simplify the above directive: `require: rubocop-cargosense`
29
29
 
30
- Or, inherit rubocop-cargosense's configuration using [RuboCop's `inherit_gem` directive](https://docs.rubocop.org/rubocop/configuration.html#inheriting-configuration-from-a-dependency-gem):
30
+ Or, inherit rubocop-cargosense's default configuration using [RuboCop's `inherit_gem` directive](https://docs.rubocop.org/rubocop/configuration.html#inheriting-configuration-from-a-dependency-gem):
31
31
 
32
32
  ```yaml
33
33
  # .rubocop.yml
@@ -35,6 +35,19 @@ inherit_gem:
35
35
  rubocop-cargosense: config/default.yml
36
36
  ```
37
37
 
38
+ You may also inherit individual configuration files from rubocop-cargosense:
39
+
40
+ ```yaml
41
+ # .rubocop.yml
42
+ inherit_gem:
43
+ rubocop-cargosense:
44
+ - config/rubocop-layout.yml
45
+ - config/rubocop-performance.yml
46
+ ```
47
+
48
+ > [!WARNING]
49
+ > While the above piecemeal usage is permissible, we recommend requiring the default configuration in its entirety.
50
+
38
51
  ## License
39
52
 
40
53
  rubocop-cargosense is freely available under the [MIT License](https://opensource.org/licenses/MIT).
data/config/default.yml CHANGED
@@ -1,177 +1,19 @@
1
+ inherit_from:
2
+ - ./rubocop.yml
3
+ - ./rubocop-capybara.yml
4
+ - ./rubocop-factory_bot.yml
5
+ - ./rubocop-performance.yml
6
+ - ./rubocop-rails.yml
7
+ - ./rubocop-rake.yml
8
+ - ./rubocop-rspec.yml
9
+
1
10
  inherit_mode:
2
11
  merge:
3
12
  - Exclude
4
13
  - Include
5
14
 
6
- require:
7
- - rubocop-performance
8
- - rubocop-rake
9
-
10
15
  AllCops:
11
16
  ActiveSupportExtensionsEnabled: true
12
17
  DisplayStyleGuide: true
13
18
  ExtraDetails: true
14
19
  NewCops: enable
15
-
16
- Layout/ClassStructure:
17
- Enabled: true
18
- ExpectedOrder:
19
- - module_inclusion
20
- - constants
21
- - association
22
- - public_attribute_macros
23
- - public_delegate
24
- - macros
25
- - public_class_methods
26
- - initializer
27
- - public_methods
28
- - protected_attribute_macros
29
- - protected_methods
30
- - private_attribute_macros
31
- - private_delegate
32
- - private_methods
33
-
34
- Layout/EmptyLineAfterMultilineCondition:
35
- Enabled: true
36
-
37
- Layout/FirstHashElementIndentation:
38
- EnforcedStyle: consistent
39
-
40
- Layout/HeredocArgumentClosingParenthesis:
41
- Enabled: true
42
-
43
- Layout/MultilineArrayLineBreaks:
44
- Enabled: true
45
-
46
- Layout/MultilineAssignmentLayout:
47
- Enabled: true
48
-
49
- Layout/MultilineHashKeyLineBreaks:
50
- Enabled: true
51
-
52
- Layout/MultilineMethodArgumentLineBreaks:
53
- Enabled: true
54
-
55
- Layout/MultilineMethodCallIndentation:
56
- EnforcedStyle: indented_relative_to_receiver
57
-
58
- Layout/MultilineMethodParameterLineBreaks:
59
- Enabled: true
60
-
61
- Layout/MultilineOperationIndentation:
62
- EnforcedStyle: indented
63
-
64
- Layout/ParameterAlignment:
65
- EnforcedStyle: with_fixed_indentation
66
-
67
- Lint/HeredocMethodCallPosition:
68
- Enabled: true
69
-
70
- Metrics/BlockLength:
71
- CountAsOne:
72
- - array
73
- - hash
74
- - heredoc
75
- - method_call
76
-
77
- Metrics/ClassLength:
78
- CountAsOne:
79
- - array
80
- - hash
81
- - heredoc
82
- - method_call
83
-
84
- Metrics/MethodLength:
85
- CountAsOne:
86
- - array
87
- - hash
88
- - heredoc
89
- - method_call
90
-
91
- Metrics/ModuleLength:
92
- CountAsOne:
93
- - array
94
- - hash
95
- - heredoc
96
- - method_call
97
-
98
- Metrics/ParameterLists:
99
- CountKeywordArgs: false
100
-
101
- Naming/InclusiveLanguage:
102
- Enabled: true
103
-
104
- Naming/VariableNumber:
105
- Enabled: false
106
-
107
- Performance/ChainArrayAllocation:
108
- Enabled: true
109
-
110
- Performance/IoReadlines:
111
- Enabled: true
112
-
113
- Performance/OpenStruct:
114
- Enabled: true
115
-
116
- Performance/SelectMap:
117
- Enabled: true
118
-
119
- Style/ArrayCoercion:
120
- Enabled: true
121
-
122
- Style/AutoResourceCleanup:
123
- Enabled: true
124
-
125
- Style/ClassMethodsDefinitions:
126
- Enabled: true
127
-
128
- Style/CollectionMethods:
129
- Enabled: true
130
-
131
- Style/DateTime:
132
- Enabled: true
133
-
134
- Style/Documentation:
135
- Enabled: false
136
-
137
- Style/EmptyMethod:
138
- EnforcedStyle: expanded
139
-
140
- Style/HashSyntax:
141
- EnforcedShorthandSyntax: never
142
-
143
- Style/MethodCalledOnDoEndBlock:
144
- Enabled: true
145
-
146
- Style/MultilineMethodSignature:
147
- Enabled: true
148
-
149
- Style/OptionHash:
150
- Enabled: true
151
-
152
- Style/ReturnNil:
153
- Enabled: true
154
-
155
- Style/Send:
156
- Enabled: true
157
-
158
- Style/StaticClass:
159
- Enabled: true
160
-
161
- Style/StringLiterals:
162
- EnforcedStyle: double_quotes
163
-
164
- Style/StringLiteralsInInterpolation:
165
- EnforcedStyle: double_quotes
166
-
167
- Style/StringMethods:
168
- Enabled: true
169
-
170
- Style/SymbolArray:
171
- EnforcedStyle: brackets
172
-
173
- Style/WordArray:
174
- EnforcedStyle: brackets
175
-
176
- Style/UnlessLogicalOperators:
177
- Enabled: true
@@ -0,0 +1,8 @@
1
+ # Code style checking for Capybara test files (RSpec, Cucumber, Minitest). A
2
+ # plugin for the RuboCop code style enforcing & linting tool.
3
+ #
4
+ # @see https://rubygems.org/gems/rubocop-capybara
5
+ # @see https://docs.rubocop.org/rubocop-capybara
6
+ # @see https://github.com/rubocop/rubocop-capybara
7
+
8
+ require: rubocop-capybara
@@ -0,0 +1,8 @@
1
+ # Code style checking for factory_bot files. A plugin for the RuboCop code style
2
+ # enforcing & linting tool.
3
+ #
4
+ # @see https://rubygems.org/gems/rubocop-factory_bot
5
+ # @see https://docs.rubocop.org/rubocop-factory_bot
6
+ # @see https://github.com/rubocop/rubocop-factory_bot
7
+
8
+ require: rubocop-factory_bot
@@ -0,0 +1,55 @@
1
+ # Layout cops inspect your code for consistent use of indentation, alignment,
2
+ # and white space.
3
+ #
4
+ # @see https://docs.rubocop.org/rubocop/cops_layout.html
5
+
6
+ Layout/ClassStructure:
7
+ Enabled: true
8
+ ExpectedOrder:
9
+ - module_inclusion
10
+ - constants
11
+ - association
12
+ - public_attribute_macros
13
+ - public_delegate
14
+ - macros
15
+ - public_class_methods
16
+ - initializer
17
+ - public_methods
18
+ - protected_attribute_macros
19
+ - protected_methods
20
+ - private_attribute_macros
21
+ - private_delegate
22
+ - private_methods
23
+
24
+ Layout/EmptyLineAfterMultilineCondition:
25
+ Enabled: true
26
+
27
+ Layout/FirstHashElementIndentation:
28
+ EnforcedStyle: consistent
29
+
30
+ Layout/HeredocArgumentClosingParenthesis:
31
+ Enabled: true
32
+
33
+ Layout/MultilineArrayLineBreaks:
34
+ Enabled: true
35
+
36
+ Layout/MultilineAssignmentLayout:
37
+ Enabled: true
38
+
39
+ Layout/MultilineHashKeyLineBreaks:
40
+ Enabled: true
41
+
42
+ Layout/MultilineMethodArgumentLineBreaks:
43
+ Enabled: true
44
+
45
+ Layout/MultilineMethodCallIndentation:
46
+ EnforcedStyle: indented_relative_to_receiver
47
+
48
+ Layout/MultilineMethodParameterLineBreaks:
49
+ Enabled: true
50
+
51
+ Layout/MultilineOperationIndentation:
52
+ EnforcedStyle: indented
53
+
54
+ Layout/ParameterAlignment:
55
+ EnforcedStyle: with_fixed_indentation
@@ -0,0 +1,6 @@
1
+ # Lint cops check for ambiguities and possible errors in your code.
2
+ #
3
+ # @see https://docs.rubocop.org/rubocop/cops_lint.html
4
+
5
+ Lint/HeredocMethodCallPosition:
6
+ Enabled: true
@@ -0,0 +1,35 @@
1
+ # Metrics cops deal with properties of the source code that can be measured,
2
+ # such as class length, method length, etc.
3
+ #
4
+ # @see https://docs.rubocop.org/rubocop/cops_metrics.html
5
+
6
+ Metrics/BlockLength:
7
+ CountAsOne:
8
+ - array
9
+ - hash
10
+ - heredoc
11
+ - method_call
12
+
13
+ Metrics/ClassLength:
14
+ CountAsOne:
15
+ - array
16
+ - hash
17
+ - heredoc
18
+ - method_call
19
+
20
+ Metrics/MethodLength:
21
+ CountAsOne:
22
+ - array
23
+ - hash
24
+ - heredoc
25
+ - method_call
26
+
27
+ Metrics/ModuleLength:
28
+ CountAsOne:
29
+ - array
30
+ - hash
31
+ - heredoc
32
+ - method_call
33
+
34
+ Metrics/ParameterLists:
35
+ CountKeywordArgs: false
@@ -0,0 +1,10 @@
1
+ # Naming cops check for naming issue of your code, such as method name, constant
2
+ # name, file name, etc.
3
+ #
4
+ # @see https://docs.rubocop.org/rubocop/cops_naming.html
5
+
6
+ Naming/InclusiveLanguage:
7
+ Enabled: true
8
+
9
+ Naming/VariableNumber:
10
+ Enabled: false
@@ -0,0 +1,20 @@
1
+ # A collection of RuboCop cops to check for performance optimizations in Ruby
2
+ # code.
3
+ #
4
+ # @see https://rubygems.org/gems/rubocop-performance
5
+ # @see https://docs.rubocop.org/rubocop-performance
6
+ # @see https://github.com/rubocop/rubocop-performance
7
+
8
+ require: rubocop-performance
9
+
10
+ Performance/ChainArrayAllocation:
11
+ Enabled: true
12
+
13
+ Performance/IoReadlines:
14
+ Enabled: true
15
+
16
+ Performance/OpenStruct:
17
+ Enabled: true
18
+
19
+ Performance/SelectMap:
20
+ Enabled: true
@@ -0,0 +1,34 @@
1
+ # Automatic Rails code style checking tool. A RuboCop extension focused on
2
+ # enforcing Rails best practices and coding conventions.
3
+ #
4
+ # @see https://rubygems.org/gems/rubocop-rails
5
+ # @see https://docs.rubocop.org/rubocop-rails
6
+ # @see https://github.com/rubocop/rubocop-rails
7
+
8
+ require: rubocop-rails
9
+
10
+ Rails/DefaultScope:
11
+ Enabled: true
12
+
13
+ Rails/EnvironmentVariableAccess:
14
+ Enabled: true
15
+ AllowReads: true
16
+
17
+ Rails/OrderById:
18
+ Enabled: true
19
+
20
+ Rails/PluckId:
21
+ Enabled: true
22
+
23
+ Rails/RequireDependency:
24
+ Enabled: true
25
+
26
+ Rails/ReversibleMigrationMethodDefinition:
27
+ Enabled: true
28
+
29
+ Rails/SaveBang:
30
+ Enabled: true
31
+ AllowImplicitReturn: false
32
+
33
+ Rails/TableNameAssignment:
34
+ Enabled: true
@@ -0,0 +1,6 @@
1
+ # A RuboCop plugin for Rake.
2
+ #
3
+ # @see https://rubygems.org/gems/rubocop-rake
4
+ # @see https://github.com/rubocop/rubocop-rake
5
+
6
+ require: rubocop-rake
@@ -0,0 +1,21 @@
1
+ # Code style checking for RSpec files. A plugin for the RuboCop code style
2
+ # enforcing & linting tool.
3
+ #
4
+ # @see https://rubygems.org/gems/rubocop-rspec
5
+ # @see https://docs.rubocop.org/rubocop-rspec
6
+ # @see https://github.com/rubocop/rubocop-rspec
7
+
8
+ require: rubocop-rspec
9
+
10
+ RSpec/DescribedClassModuleWrapping:
11
+ Enabled: true
12
+
13
+ RSpec/ExampleLength:
14
+ CountAsOne:
15
+ - array
16
+ - hash
17
+ - heredoc
18
+ - method_call
19
+
20
+ RSpec/MessageExpectation:
21
+ Enabled: true
@@ -0,0 +1,64 @@
1
+ # Style cops check for stylistic consistency of your code. Many of the them are
2
+ # based on the Ruby Style Guide.
3
+ #
4
+ # @see https://docs.rubocop.org/rubocop/cops_style.html
5
+
6
+ Style/ArrayCoercion:
7
+ Enabled: true
8
+
9
+ Style/AutoResourceCleanup:
10
+ Enabled: true
11
+
12
+ Style/ClassMethodsDefinitions:
13
+ Enabled: true
14
+
15
+ Style/CollectionMethods:
16
+ Enabled: true
17
+
18
+ Style/DateTime:
19
+ Enabled: true
20
+
21
+ Style/Documentation:
22
+ Enabled: false
23
+
24
+ Style/EmptyMethod:
25
+ EnforcedStyle: expanded
26
+
27
+ Style/HashSyntax:
28
+ EnforcedShorthandSyntax: never
29
+
30
+ Style/MethodCalledOnDoEndBlock:
31
+ Enabled: true
32
+
33
+ Style/MultilineMethodSignature:
34
+ Enabled: true
35
+
36
+ Style/OptionHash:
37
+ Enabled: true
38
+
39
+ Style/ReturnNil:
40
+ Enabled: true
41
+
42
+ Style/Send:
43
+ Enabled: true
44
+
45
+ Style/StaticClass:
46
+ Enabled: true
47
+
48
+ Style/StringLiterals:
49
+ EnforcedStyle: double_quotes
50
+
51
+ Style/StringLiteralsInInterpolation:
52
+ EnforcedStyle: double_quotes
53
+
54
+ Style/StringMethods:
55
+ Enabled: true
56
+
57
+ Style/SymbolArray:
58
+ EnforcedStyle: brackets
59
+
60
+ Style/WordArray:
61
+ EnforcedStyle: brackets
62
+
63
+ Style/UnlessLogicalOperators:
64
+ Enabled: true
@@ -0,0 +1,13 @@
1
+ # RuboCop is a Ruby code style checking and code formatting tool. It aims to
2
+ # enforce the community-driven Ruby Style Guide.
3
+ #
4
+ # @see https://rubygems.org/gems/rubocop
5
+ # @see https://docs.rubocop.org/rubocop
6
+ # @see https://github.com/rubocop/rubocop
7
+
8
+ inherit_from:
9
+ - ./rubocop-layout.yml
10
+ - ./rubocop-lint.yml
11
+ - ./rubocop-metrics.yml
12
+ - ./rubocop-naming.yml
13
+ - ./rubocop-style.yml
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-cargosense
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - CargoSense
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-12-22 00:00:00.000000000 Z
11
+ date: 2024-01-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
@@ -24,6 +24,34 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.59'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rubocop-capybara
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '2.20'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '2.20'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rubocop-factory_bot
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '2.25'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '2.25'
27
55
  - !ruby/object:Gem::Dependency
28
56
  name: rubocop-performance
29
57
  requirement: !ruby/object:Gem::Requirement
@@ -38,6 +66,20 @@ dependencies:
38
66
  - - "~>"
39
67
  - !ruby/object:Gem::Version
40
68
  version: '1.20'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rubocop-rails
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '2.23'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '2.23'
41
83
  - !ruby/object:Gem::Dependency
42
84
  name: rubocop-rake
43
85
  requirement: !ruby/object:Gem::Requirement
@@ -52,6 +94,20 @@ dependencies:
52
94
  - - "~>"
53
95
  - !ruby/object:Gem::Version
54
96
  version: '0.6'
97
+ - !ruby/object:Gem::Dependency
98
+ name: rubocop-rspec
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '2.26'
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '2.26'
55
111
  description: Reusable RuboCop configuration for CargoSense's Ruby projects.
56
112
  email:
57
113
  - rubygems@cargosense.com
@@ -62,6 +118,18 @@ files:
62
118
  - LICENSE
63
119
  - README.md
64
120
  - config/default.yml
121
+ - config/rubocop-capybara.yml
122
+ - config/rubocop-factory_bot.yml
123
+ - config/rubocop-layout.yml
124
+ - config/rubocop-lint.yml
125
+ - config/rubocop-metrics.yml
126
+ - config/rubocop-naming.yml
127
+ - config/rubocop-performance.yml
128
+ - config/rubocop-rails.yml
129
+ - config/rubocop-rake.yml
130
+ - config/rubocop-rspec.yml
131
+ - config/rubocop-style.yml
132
+ - config/rubocop.yml
65
133
  - lib/rubocop-cargosense.rb
66
134
  - lib/rubocop/cargosense.rb
67
135
  - lib/rubocop/cargosense/inject.rb
@@ -70,8 +138,9 @@ licenses:
70
138
  - MIT
71
139
  metadata:
72
140
  bug_tracker_uri: https://github.com/CargoSense/rubocop-cargosense/issues
141
+ changelog_uri: https://github.com/CargoSense/rubocop-cargosense//releases
73
142
  rubygems_mfa_required: 'true'
74
- source_code_uri: https://github.com/CargoSense/rubocop-cargosense/tree/v0.1.0
143
+ source_code_uri: https://github.com/CargoSense/rubocop-cargosense/tree/v0.2.0
75
144
  post_install_message:
76
145
  rdoc_options: []
77
146
  require_paths: