-
Notifications
You must be signed in to change notification settings - Fork 0
/
.rubocop.yml
320 lines (284 loc) · 18.7 KB
/
.rubocop.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
require:
- rubocop-performance
- rubocop-rspec
AllCops:
TargetRubyVersion: 3.0
NewCops: enable
Exclude:
- 'packages/forest_admin_datasource_active_record/spec/dummy/**/*'
- 'packages/forest_admin_agent/lib/forest_admin_agent/serializer/forest_serializer.rb'
- 'packages/forest_admin_agent/lib/forest_admin_agent/serializer/forest_serializer_override.rb'
- 'node_modules/semantic-release-rubygem/**/*'
Gemspec/OrderedDependencies:
Exclude:
- 'packages/forest_admin_agent/forest_admin_agent.gemspec'
- 'packages/forest_admin_rails/forest_admin_rails.gemspec'
- 'packages/forest_admin_datasource_toolkit/forest_admin_datasource_toolkit.gemspec'
- 'packages/forest_admin_datasource_customizer/forest_admin_datasource_customizer.gemspec'
- 'packages/forest_admin_datasource_active_record/forest_admin_datasource_active_record.gemspec'
Gemspec/RequireMFA:
Exclude:
- 'agent_ruby.gemspec'
- 'packages/forest_admin_agent/forest_admin_agent.gemspec'
- 'packages/forest_admin_rails/forest_admin_rails.gemspec'
- 'packages/forest_admin_datasource_toolkit/forest_admin_datasource_toolkit.gemspec'
- 'packages/forest_admin_datasource_customizer/forest_admin_datasource_customizer.gemspec'
- 'packages/forest_admin_datasource_active_record/forest_admin_datasource_active_record.gemspec'
# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
Lint/PercentStringArray:
Exclude:
- 'packages/forest_admin_agent/forest_admin_agent.gemspec'
- 'packages/forest_admin_rails/forest_admin_rails.gemspec'
- 'packages/forest_admin_datasource_toolkit/forest_admin_datasource_toolkit.gemspec'
- 'packages/forest_admin_datasource_customizer/forest_admin_datasource_customizer.gemspec'
- 'packages/forest_admin_datasource_active_record/forest_admin_datasource_active_record.gemspec'
# Offense count: 1
# Configuration parameters: AllowComments.
Lint/EmptyFile:
Exclude:
- 'packages/forest_admin_rails/app/models/forest_admin_rails/application_record.rb'
Metrics/AbcSize:
Enabled: false
Metrics/CyclomaticComplexity:
Enabled: false
Metrics/PerceivedComplexity:
Enabled: false
Style/BlockComments:
Exclude:
- 'packages/forest_admin_agent/spec/spec_helper.rb'
- 'packages/forest_admin_rails/spec/spec_helper.rb'
- 'packages/forest_admin_datasource_toolkit/spec/spec_helper.rb'
- 'packages/forest_admin_datasource_customizer/spec/spec_helper.rb'
- 'packages/forest_admin_datasource_active_record/spec/spec_helper.rb'
# Offense count: 3
# Configuration parameters: AllowedConstants.
Style/Documentation:
Enabled: false
# Offense count: 9
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: EnforcedStyle.
# SupportedStyles: always, always_true, never
Style/FrozenStringLiteralComment:
Enabled: false
# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: EnforcedStyle.
# SupportedStyles: literals, strict
Style/MutableConstant:
Exclude:
- 'lib/agent_ruby/version.rb'
- 'packages/forest_admin_agent/lib/forest_admin_agent/version.rb'
- 'packages/forest_admin_agent/lib/forest_admin_agent/utils/schema/schema_emitter.rb'
- 'packages/forest_admin_rails/lib/forest_admin_rails/version.rb'
- 'packages/forest_admin_datasource_toolkit/lib/forest_admin_datasource_toolkit/version.rb'
- 'packages/forest_admin_datasource_customizer/lib/forest_admin_datasource_customizer/version.rb'
- 'packages/forest_admin_datasource_active_record/lib/forest_admin_datasource_active_record/version.rb'
# Offense count: 38
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
# SupportedStyles: single_quotes, double_quotes
Style/StringLiterals:
Exclude:
- 'agent_ruby.gemspec'
- 'Gemfile'
- 'Rakefile'
- 'bin/console'
- 'lib/agent_ruby.rb'
- 'lib/agent_ruby/version.rb'
- 'packages/forest_admin_agent/forest_admin_agent.gemspec'
- 'packages/forest_admin_agent/Gemfile'
- 'packages/forest_admin_agent/Rakefile'
- 'packages/forest_admin_agent/bin/console'
- 'packages/forest_admin_agent/lib/forest_admin_agent.rb'
- 'packages/forest_admin_agent/lib/forest_admin_agent/version.rb'
- 'packages/forest_admin_agent/spec/forest_admin_agent_spec.rb'
- 'packages/forest_admin_agent/spec/spec_helper.rb'
- 'packages/forest_admin_agent/lib/forest_admin_agent/utils/schema/schema_emitter.rb'
- 'packages/forest_admin_rails/forest_admin_rails.gemspec'
- 'packages/forest_admin_rails/Gemfile'
- 'packages/forest_admin_rails/Rakefile'
- 'packages/forest_admin_rails/bin/console'
- 'packages/forest_admin_rails/bin/rails'
- 'packages/forest_admin_rails/lib/forest_admin_rails.rb'
- 'packages/forest_admin_rails/lib/forest_admin_rails/version.rb'
- 'packages/forest_admin_rails/spec/rails_helper.rb'
- 'packages/forest_admin_rails/spec/spec_helper.rb'
- 'packages/forest_admin_datasource_toolkit/forest_admin_datasource_toolkit.gemspec'
- 'packages/forest_admin_datasource_toolkit/Gemfile'
- 'packages/forest_admin_datasource_toolkit/Rakefile'
- 'packages/forest_admin_datasource_toolkit/bin/console'
- 'packages/forest_admin_datasource_toolkit/lib/forest_admin_datasource_toolkit.rb'
- 'packages/forest_admin_datasource_toolkit/lib/forest_admin_datasource_toolkit/version.rb'
- 'packages/forest_admin_datasource_toolkit/spec/spec_helper.rb'
- 'packages/forest_admin_datasource_customizer/forest_admin_datasource_customizer.gemspec'
- 'packages/forest_admin_datasource_customizer/Gemfile'
- 'packages/forest_admin_datasource_customizer/Rakefile'
- 'packages/forest_admin_datasource_customizer/bin/console'
- 'packages/forest_admin_datasource_customizer/lib/forest_admin_datasource_customizer.rb'
- 'packages/forest_admin_datasource_customizer/lib/forest_admin_datasource_customizer/version.rb'
- 'packages/forest_admin_datasource_customizer/spec/spec_helper.rb'
- 'packages/forest_admin_datasource_active_record/forest_admin_datasource_active_record.gemspec'
- 'packages/forest_admin_datasource_active_record/Gemfile'
- 'packages/forest_admin_datasource_active_record/Rakefile'
- 'packages/forest_admin_datasource_active_record/bin/console'
- 'packages/forest_admin_datasource_active_record/lib/forest_admin_datasource_active_record.rb'
- 'packages/forest_admin_datasource_active_record/lib/forest_admin_datasource_active_record/version.rb'
- 'packages/forest_admin_datasource_active_record/spec/spec_helper.rb'
# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: WordRegex.
# SupportedStyles: percent, brackets
Style/WordArray:
EnforcedStyle: percent
MinSize: 3
Style/SymbolArray:
Exclude:
- 'packages/forest_admin_agent/spec/lib/forest_admin_agent/utils/schema/generator_field_many_to_many_spec.rb'
Style/StringLiteralsInInterpolation:
Enabled: true
EnforcedStyle: double_quotes
Style/RedundantConstantBase:
Exclude:
- 'packages/forest_admin_rails/spec/rails_helper.rb'
Style/HashEachMethods:
Exclude:
- 'packages/forest_admin_datasource_toolkit/lib/forest_admin_datasource_toolkit/components/query/condition_tree/condition_tree_factory.rb'
Lint/NestedMethodDefinition:
Exclude:
- 'packages/forest_admin_datasource_toolkit/lib/forest_admin_datasource_toolkit/components/query/filter_factory.rb'
Performance/CollectionLiteralInLoop:
Exclude:
- 'packages/forest_admin_agent/lib/forest_admin_agent/utils/condition_tree_parser.rb'
Naming/PredicateName:
Exclude:
- 'packages/forest_admin_datasource_toolkit/lib/forest_admin_datasource_toolkit/collection.rb'
Metrics/ParameterLists:
Exclude:
- 'packages/forest_admin_agent/lib/forest_admin_agent/services/smart_action_checker.rb'
- 'packages/forest_admin_agent/spec/lib/forest_admin_agent/routes/resources/related/list_related_spec.rb'
- 'packages/forest_admin_agent/spec/lib/forest_admin_agent/routes/resources/related/count_related_spec.rb'
- 'packages/forest_admin_datasource_customizer/lib/forest_admin_datasource_customizer/decorators/action/context/action_context.rb'
- 'packages/forest_admin_datasource_customizer/lib/forest_admin_datasource_customizer/decorators/action/action_collection_decorator.rb'
- 'packages/forest_admin_datasource_customizer/lib/forest_admin_datasource_customizer/decorators/action/dynamic_field.rb'
- 'packages/forest_admin_datasource_customizer/lib/forest_admin_datasource_customizer/decorators/hook/context/after/hook_after_aggregate_context.rb'
- 'packages/forest_admin_datasource_toolkit/lib/forest_admin_datasource_toolkit/schema/relations/many_to_many_schema.rb'
- 'packages/forest_admin_datasource_toolkit/lib/forest_admin_datasource_toolkit/schema/column_schema.rb'
- 'packages/forest_admin_datasource_toolkit/lib/forest_admin_datasource_toolkit/components/caller.rb'
- 'packages/forest_admin_datasource_toolkit/lib/forest_admin_datasource_toolkit/components/query/filter.rb'
- 'packages/forest_admin_datasource_toolkit/lib/forest_admin_datasource_toolkit/utils/collection.rb'
- 'packages/forest_admin_datasource_toolkit/lib/forest_admin_datasource_toolkit/components/action_field.rb'
- 'packages/forest_admin_datasource_toolkit/lib/forest_admin_datasource_toolkit/components/actions/action_field.rb'
Metrics/ModuleLength:
CountAsOne: [ 'array', 'hash', 'method_call' ]
Exclude:
- 'packages/forest_admin_agent/spec/**/*'
- 'packages/forest_admin_datasource_active_record/spec/**/*'
- 'packages/forest_admin_datasource_toolkit/spec/**/*'
- 'packages/forest_admin_datasource_customizer/spec/**/*'
- 'packages/forest_admin_rails/spec/**/*'
Metrics/MethodLength:
CountAsOne: ['array', 'hash', 'method_call']
Max: 20
Exclude:
- 'packages/forest_admin_agent/lib/forest_admin_agent/auth/oauth2/forest_provider.rb'
- 'packages/forest_admin_agent/lib/forest_admin_agent/routes/charts/charts.rb'
- 'packages/forest_admin_agent/lib/forest_admin_agent/serializer/json_api_serializer.rb'
- 'packages/forest_admin_datasource_active_record/lib/forest_admin_datasource_active_record/parser/validation.rb'
- 'packages/forest_admin_datasource_active_record/lib/forest_admin_datasource_active_record/collection.rb'
- 'packages/forest_admin_datasource_active_record/lib/forest_admin_datasource_active_record/utils/query.rb'
- 'packages/forest_admin_datasource_active_record/spec/dummy/**/*'
- 'packages/forest_admin_datasource_customizer/lib/forest_admin_datasource_customizer/decorators/computed/utils/flattener.rb'
- 'packages/forest_admin_datasource_customizer/lib/forest_admin_datasource_customizer/decorators/decorators_stack.rb'
- 'packages/forest_admin_datasource_customizer/lib/forest_admin_datasource_customizer/decorators/publication/publication_collection_decorator.rb'
- 'packages/forest_admin_datasource_customizer/lib/forest_admin_datasource_customizer/decorators/search/search_collection_decorator.rb'
- 'packages/forest_admin_datasource_customizer/lib/forest_admin_datasource_customizer/decorators/write/write_replace/write_replace_collection_decorator.rb'
- 'packages/forest_admin_datasource_customizer/lib/forest_admin_datasource_customizer/plugins/import_field.rb'
- 'packages/forest_admin_datasource_toolkit/lib/forest_admin_datasource_toolkit/collection.rb'
- 'packages/forest_admin_datasource_toolkit/lib/forest_admin_datasource_toolkit/components/query/condition_tree/condition_tree_factory.rb'
- 'packages/forest_admin_datasource_toolkit/lib/forest_admin_datasource_toolkit/components/query/filter_factory.rb'
- 'packages/forest_admin_datasource_toolkit/lib/forest_admin_datasource_toolkit/components/query/condition_tree/nodes/condition_tree_leaf.rb'
- 'packages/forest_admin_datasource_toolkit/lib/forest_admin_datasource_toolkit/components/query/condition_tree/condition_tree_equivalent.rb'
- 'packages/forest_admin_datasource_toolkit/lib/forest_admin_datasource_toolkit/validations/field_validator.rb'
- 'packages/forest_admin_datasource_toolkit/lib/forest_admin_datasource_toolkit/components/actions/action_field_factory.rb'
- 'packages/forest_admin_datasource_customizer/lib/forest_admin_datasource_customizer/decorators/action/base_action.rb'
- 'packages/forest_admin_datasource_customizer/lib/forest_admin_datasource_customizer/decorators/rename_field/rename_field_collection_decorator.rb'
- 'packages/forest_admin_datasource_customizer/lib/forest_admin_datasource_customizer/decorators/action/action_collection_decorator.rb'
- 'packages/forest_admin_datasource_customizer/lib/forest_admin_datasource_customizer/decorators/action/form_factory.rb'
Metrics/BlockLength:
Exclude:
- 'packages/forest_admin_datasource_active_record/lib/forest_admin_datasource_active_record/collection.rb'
- 'packages/forest_admin_datasource_toolkit/lib/forest_admin_datasource_toolkit/components/query/filter_factory.rb'
- 'packages/forest_admin_datasource_customizer/lib/forest_admin_datasource_customizer/decorators/action/base_action.rb'
Metrics/ClassLength:
Exclude:
- 'packages/forest_admin_agent/lib/forest_admin_agent/utils/schema/generator_field.rb'
- 'packages/forest_admin_agent/lib/forest_admin_agent/services/permissions.rb'
- 'packages/forest_admin_agent/lib/forest_admin_agent/routes/charts/charts.rb'
- 'packages/forest_admin_agent/lib/forest_admin_agent/routes/action/actions.rb'
- 'packages/forest_admin_agent/lib/forest_admin_agent/routes/resources/related/update_related.rb'
- 'packages/forest_admin_agent/lib/forest_admin_agent/utils/schema/frontend_validation_utils.rb'
- 'packages/forest_admin_agent/lib/forest_admin_agent/utils/query_string_parser.rb'
- 'packages/forest_admin_datasource_active_record/lib/forest_admin_datasource_active_record/utils/query.rb'
- 'packages/forest_admin_datasource_active_record/lib/forest_admin_datasource_active_record/collection.rb'
- 'packages/forest_admin_datasource_customizer/lib/forest_admin_datasource_customizer/collection_customizer.rb'
- 'packages/forest_admin_datasource_customizer/lib/forest_admin_datasource_customizer/decorators/binary/binary_collection_decorator.rb'
- 'packages/forest_admin_datasource_customizer/lib/forest_admin_datasource_customizer/decorators/search/search_collection_decorator.rb'
- 'packages/forest_admin_datasource_customizer/lib/forest_admin_datasource_customizer/decorators/relation/relation_collection_decorator.rb'
- 'packages/forest_admin_datasource_customizer/lib/forest_admin_datasource_customizer/decorators/rename_field/rename_field_collection_decorator.rb'
- 'packages/forest_admin_datasource_toolkit/lib/forest_admin_datasource_toolkit/utils/collection.rb'
- 'packages/forest_admin_datasource_toolkit/lib/forest_admin_datasource_toolkit/components/query/aggregation.rb'
- 'packages/forest_admin_datasource_toolkit/lib/forest_admin_datasource_toolkit/components/query/filter_factory.rb'
- 'packages/forest_admin_datasource_toolkit/lib/forest_admin_datasource_toolkit/components/query/condition_tree/nodes/condition_tree_leaf.rb'
- 'packages/forest_admin_datasource_toolkit/lib/forest_admin_datasource_toolkit/components/query/condition_tree/transforms/comparisons.rb'
- 'packages/forest_admin_datasource_toolkit/lib/forest_admin_datasource_toolkit/validations/rules.rb'
- 'packages/forest_admin_agent/lib/forest_admin_agent/utils/schema/generator_action_field_widget.rb'
- 'packages/forest_admin_datasource_active_record/lib/forest_admin_datasource_active_record/collection.rb'
- 'packages/forest_admin_agent/lib/forest_admin_agent/utils/schema/generator_action.rb'
- 'packages/forest_admin_datasource_customizer/lib/forest_admin_datasource_customizer/decorators/action/action_collection_decorator.rb'
Style/OpenStructUse:
Exclude:
- 'packages/forest_admin_agent/lib/forest_admin_agent/routes/resources/**/*.rb'
RSpec/ExampleLength:
CountAsOne: [ 'array', 'hash', 'method_call' ]
Max: 20
RSpec/MultipleExpectations:
Max: 10
Layout/LineLength:
Max: 120
Exclude:
- 'packages/forest_admin_agent/spec/**/*'
- 'packages/forest_admin_datasource_active_record/spec/**/*'
- 'packages/forest_admin_datasource_toolkit/spec/**/*'
- 'packages/forest_admin_datasource_customizer/spec/**/*'
- 'packages/forest_admin_rails/spec/**/*'
- 'packages/forest_admin_agent/lib/forest_admin_agent/http/forest_admin_api_requester.rb'
- 'packages/forest_admin_agent/lib/forest_admin_agent/routes/resources/list.rb'
- 'packages/forest_admin_agent/lib/forest_admin_agent/services/permissions.rb'
- 'packages/forest_admin_agent/lib/forest_admin_agent/services/smart_action_checker.rb'
- 'packages/forest_admin_datasource_customizer/lib/forest_admin_datasource_customizer/decorators/action/form_layout_element.rb'
- 'packages/forest_admin_datasource_customizer/lib/forest_admin_datasource_customizer/decorators/override/context/create_override_customization_context.rb'
- 'packages/forest_admin_datasource_customizer/lib/forest_admin_datasource_customizer/decorators/override/context/update_override_customization_context.rb'
- 'packages/forest_admin_datasource_customizer/lib/forest_admin_datasource_customizer/decorators/override/context/delete_override_customization_context.rb'
- 'packages/forest_admin_datasource_customizer/lib/forest_admin_datasource_customizer/decorators/publication/publication_datasource_decorator.rb'
- 'packages/forest_admin_datasource_customizer/lib/forest_admin_datasource_customizer/decorators/relation/relation_collection_decorator.rb'
- 'packages/forest_admin_datasource_customizer/lib/forest_admin_datasource_customizer/decorators/sort/sort_collection_decorator.rb'
- 'packages/forest_admin_datasource_toolkit/lib/forest_admin_datasource_toolkit/components/query/condition_tree/condition_tree_factory.rb'
- 'packages/forest_admin_datasource_toolkit/lib/forest_admin_datasource_toolkit/utils/collection.rb'
- 'packages/forest_admin_datasource_toolkit/lib/forest_admin_datasource_toolkit/components/query/filter_factory.rb'
- 'packages/forest_admin_datasource_toolkit/lib/forest_admin_datasource_toolkit/validations/field_validator.rb'
RSpec/MultipleMemoizedHelpers:
Max: 10
Security/Eval:
Exclude:
- 'packages/forest_admin_agent/lib/forest_admin_agent/http/error_handling.rb'
- 'packages/forest_admin_agent/lib/forest_admin_agent/services/logger_service.rb'
Style/PercentLiteralDelimiters:
Exclude:
- 'packages/forest_admin_rails/lib/generators/forest_admin_rails/install_generator.rb'
Lint/InterpolationCheck:
Exclude:
- 'packages/forest_admin_rails/lib/generators/forest_admin_rails/install_generator.rb'
Lint/UnusedMethodArgument:
Exclude:
- 'packages/forest_admin_rails/config/initializers/forest_admin_error_subscriber.rb'