rubocop-callbacksystems 0.1.0
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 +7 -0
- data/LICENSE +21 -0
- data/README.md +78 -0
- data/config/default.yml +590 -0
- data/docs/cops.md +111 -0
- data/lib/rubocop/callbacksystems/autocorrection/batch.rb +135 -0
- data/lib/rubocop/callbacksystems/autocorrection/comment_rescue.rb +112 -0
- data/lib/rubocop/callbacksystems/autocorrection/rehearsal.rb +65 -0
- data/lib/rubocop/callbacksystems/autocorrection/rewrite_permit.rb +14 -0
- data/lib/rubocop/callbacksystems/class_structure/builder_assignment.rb +48 -0
- data/lib/rubocop/callbacksystems/class_structure/class_body.rb +50 -0
- data/lib/rubocop/callbacksystems/class_structure/divergence.rb +31 -0
- data/lib/rubocop/callbacksystems/class_structure/node_visibility.rb +82 -0
- data/lib/rubocop/callbacksystems/class_structure/reference_order.rb +36 -0
- data/lib/rubocop/callbacksystems/class_structure/statement_rank.rb +84 -0
- data/lib/rubocop/callbacksystems/class_structure/statement_run.rb +42 -0
- data/lib/rubocop/callbacksystems/class_structure/visibility.rb +84 -0
- data/lib/rubocop/callbacksystems/cops_document.rb +78 -0
- data/lib/rubocop/callbacksystems/execution/deferred_local_variables.rb +138 -0
- data/lib/rubocop/callbacksystems/execution/discarded_expression.rb +45 -0
- data/lib/rubocop/callbacksystems/execution/eager_evaluation_path.rb +73 -0
- data/lib/rubocop/callbacksystems/execution/immediate.rb +71 -0
- data/lib/rubocop/callbacksystems/execution/local_variable_occurrences.rb +112 -0
- data/lib/rubocop/callbacksystems/hashes/key_transform_detection.rb +108 -0
- data/lib/rubocop/callbacksystems/hashes/keyword_options.rb +37 -0
- data/lib/rubocop/callbacksystems/helpers/bodies.rb +150 -0
- data/lib/rubocop/callbacksystems/helpers/builders.rb +103 -0
- data/lib/rubocop/callbacksystems/helpers/comments.rb +56 -0
- data/lib/rubocop/callbacksystems/helpers/corrections.rb +15 -0
- data/lib/rubocop/callbacksystems/helpers/methods.rb +46 -0
- data/lib/rubocop/callbacksystems/helpers/names.rb +65 -0
- data/lib/rubocop/callbacksystems/helpers/node_types.rb +154 -0
- data/lib/rubocop/callbacksystems/helpers/rails.rb +52 -0
- data/lib/rubocop/callbacksystems/helpers/ranges.rb +107 -0
- data/lib/rubocop/callbacksystems/helpers/recursion.rb +29 -0
- data/lib/rubocop/callbacksystems/helpers/variables.rb +44 -0
- data/lib/rubocop/callbacksystems/helpers/visibility.rb +121 -0
- data/lib/rubocop/callbacksystems/helpers.rb +43 -0
- data/lib/rubocop/callbacksystems/methods/calls.rb +38 -0
- data/lib/rubocop/callbacksystems/methods/definitions.rb +218 -0
- data/lib/rubocop/callbacksystems/methods/delegate_macro.rb +144 -0
- data/lib/rubocop/callbacksystems/methods/delegation_target.rb +55 -0
- data/lib/rubocop/callbacksystems/methods/domain.rb +77 -0
- data/lib/rubocop/callbacksystems/methods/implicit_invocations.rb +17 -0
- data/lib/rubocop/callbacksystems/methods/macro_references.rb +238 -0
- data/lib/rubocop/callbacksystems/methods/reference_evidence.rb +74 -0
- data/lib/rubocop/callbacksystems/methods/siblings.rb +24 -0
- data/lib/rubocop/callbacksystems/methods/statement_definitions.rb +68 -0
- data/lib/rubocop/callbacksystems/offense.rb +13 -0
- data/lib/rubocop/callbacksystems/plugin.rb +27 -0
- data/lib/rubocop/callbacksystems/project_index/cache.rb +16 -0
- data/lib/rubocop/callbacksystems/project_index/confinement_cache.rb +40 -0
- data/lib/rubocop/callbacksystems/project_index/constant_references.rb +74 -0
- data/lib/rubocop/callbacksystems/project_index/corrections.rb +35 -0
- data/lib/rubocop/callbacksystems/project_index/coverage.rb +56 -0
- data/lib/rubocop/callbacksystems/project_index/diagnostics.rb +60 -0
- data/lib/rubocop/callbacksystems/project_index/freshness.rb +104 -0
- data/lib/rubocop/callbacksystems/project_index/loader.rb +9 -0
- data/lib/rubocop/callbacksystems/project_index/location.rb +29 -0
- data/lib/rubocop/callbacksystems/project_index/nested_class_confinement.rb +297 -0
- data/lib/rubocop/callbacksystems/project_index/nested_class_method_dispatch.rb +50 -0
- data/lib/rubocop/callbacksystems/project_index/reading.rb +129 -0
- data/lib/rubocop/callbacksystems/project_index/source_file.rb +59 -0
- data/lib/rubocop/callbacksystems/project_index/source_file_match.rb +57 -0
- data/lib/rubocop/callbacksystems/project_index/support.rb +46 -0
- data/lib/rubocop/callbacksystems/source/comment_blocks.rb +43 -0
- data/lib/rubocop/callbacksystems/source/comments.rb +141 -0
- data/lib/rubocop/callbacksystems/source/file_ast.rb +15 -0
- data/lib/rubocop/callbacksystems/source/files_checksum.rb +43 -0
- data/lib/rubocop/callbacksystems/source/single_line_call.rb +181 -0
- data/lib/rubocop/callbacksystems/source/statement_with_comments.rb +131 -0
- data/lib/rubocop/callbacksystems/testing/cop_helpers.rb +42 -0
- data/lib/rubocop/callbacksystems/testing/fixture_call.rb +30 -0
- data/lib/rubocop/callbacksystems/testing/fixture_names.rb +62 -0
- data/lib/rubocop/callbacksystems/testing/path_mapping.rb +104 -0
- data/lib/rubocop/cop/callbacksystems/application_controller_method_definition.rb +44 -0
- data/lib/rubocop/cop/callbacksystems/assert_with_expected_argument.rb +60 -0
- data/lib/rubocop/cop/callbacksystems/base.rb +134 -0
- data/lib/rubocop/cop/callbacksystems/body_order.rb +478 -0
- data/lib/rubocop/cop/callbacksystems/builder_method_parentheses.rb +74 -0
- data/lib/rubocop/cop/callbacksystems/collapse_multiline_expression.rb +140 -0
- data/lib/rubocop/cop/callbacksystems/comment_block_length.rb +137 -0
- data/lib/rubocop/cop/callbacksystems/complex_conditional.rb +75 -0
- data/lib/rubocop/cop/callbacksystems/controller_test_response_assertion.rb +105 -0
- data/lib/rubocop/cop/callbacksystems/controller_test_response_first_assertion.rb +123 -0
- data/lib/rubocop/cop/callbacksystems/data_clump.rb +339 -0
- data/lib/rubocop/cop/callbacksystems/declarative_method_naming.rb +350 -0
- data/lib/rubocop/cop/callbacksystems/delegate_requires_private_option.rb +81 -0
- data/lib/rubocop/cop/callbacksystems/eager_loading_scope_naming.rb +386 -0
- data/lib/rubocop/cop/callbacksystems/early_return.rb +215 -0
- data/lib/rubocop/cop/callbacksystems/empty_line_before_method.rb +168 -0
- data/lib/rubocop/cop/callbacksystems/empty_line_between_sections.rb +169 -0
- data/lib/rubocop/cop/callbacksystems/empty_private_section.rb +107 -0
- data/lib/rubocop/cop/callbacksystems/expanded_empty_class_or_module.rb +71 -0
- data/lib/rubocop/cop/callbacksystems/inline_memoized_computation.rb +110 -0
- data/lib/rubocop/cop/callbacksystems/job_enqueue_methods.rb +93 -0
- data/lib/rubocop/cop/callbacksystems/max_safe_navigation_depth.rb +118 -0
- data/lib/rubocop/cop/callbacksystems/method_invocation_order.rb +261 -0
- data/lib/rubocop/cop/callbacksystems/nested_class_order.rb +255 -0
- data/lib/rubocop/cop/callbacksystems/no_abbreviations.rb +197 -0
- data/lib/rubocop/cop/callbacksystems/no_anemic_delegation.rb +101 -0
- data/lib/rubocop/cop/callbacksystems/no_anemic_record.rb +309 -0
- data/lib/rubocop/cop/callbacksystems/no_assert_select.rb +31 -0
- data/lib/rubocop/cop/callbacksystems/no_bang_method_without_counterpart.rb +451 -0
- data/lib/rubocop/cop/callbacksystems/no_call_method.rb +73 -0
- data/lib/rubocop/cop/callbacksystems/no_comments_in_test_class_body.rb +159 -0
- data/lib/rubocop/cop/callbacksystems/no_consecutive_appends.rb +261 -0
- data/lib/rubocop/cop/callbacksystems/no_custom_route_actions.rb +124 -0
- data/lib/rubocop/cop/callbacksystems/no_direct_eager_loading.rb +90 -0
- data/lib/rubocop/cop/callbacksystems/no_each_with_early_return.rb +58 -0
- data/lib/rubocop/cop/callbacksystems/no_explicit_public_modifier.rb +81 -0
- data/lib/rubocop/cop/callbacksystems/no_hash_with_default_block.rb +68 -0
- data/lib/rubocop/cop/callbacksystems/no_local_variable_return.rb +173 -0
- data/lib/rubocop/cop/callbacksystems/no_manual_accumulation.rb +188 -0
- data/lib/rubocop/cop/callbacksystems/no_mixed_memoization.rb +145 -0
- data/lib/rubocop/cop/callbacksystems/no_nested_modules_in_classes.rb +78 -0
- data/lib/rubocop/cop/callbacksystems/no_nil_at_end_of_method.rb +74 -0
- data/lib/rubocop/cop/callbacksystems/no_redundant_validation_name.rb +37 -0
- data/lib/rubocop/cop/callbacksystems/no_redundant_wrapper_method.rb +161 -0
- data/lib/rubocop/cop/callbacksystems/no_section_divider_comments.rb +105 -0
- data/lib/rubocop/cop/callbacksystems/no_send_in_tests.rb +75 -0
- data/lib/rubocop/cop/callbacksystems/no_service_objects.rb +64 -0
- data/lib/rubocop/cop/callbacksystems/no_single_letter_names.rb +47 -0
- data/lib/rubocop/cop/callbacksystems/no_singleton_class_in_modules.rb +43 -0
- data/lib/rubocop/cop/callbacksystems/no_tap_collection_building.rb +173 -0
- data/lib/rubocop/cop/callbacksystems/no_turbo_stream_in_controllers.rb +52 -0
- data/lib/rubocop/cop/callbacksystems/no_typographic_clutter.rb +159 -0
- data/lib/rubocop/cop/callbacksystems/no_writes_in_get_actions.rb +149 -0
- data/lib/rubocop/cop/callbacksystems/ordered_mixin_arguments.rb +78 -0
- data/lib/rubocop/cop/callbacksystems/plural_controller_names.rb +103 -0
- data/lib/rubocop/cop/callbacksystems/prefer_attr_reader_over_instance_variable.rb +86 -0
- data/lib/rubocop/cop/callbacksystems/prefer_backslash_continuation.rb +478 -0
- data/lib/rubocop/cop/callbacksystems/prefer_class_for_state.rb +532 -0
- data/lib/rubocop/cop/callbacksystems/prefer_class_new_for_empty_nested_class.rb +247 -0
- data/lib/rubocop/cop/callbacksystems/prefer_class_over_builder_block.rb +124 -0
- data/lib/rubocop/cop/callbacksystems/prefer_default_argument.rb +225 -0
- data/lib/rubocop/cop/callbacksystems/prefer_delegate.rb +242 -0
- data/lib/rubocop/cop/callbacksystems/prefer_delegate_over_instance_variable_assignment.rb +175 -0
- data/lib/rubocop/cop/callbacksystems/prefer_excluding.rb +204 -0
- data/lib/rubocop/cop/callbacksystems/prefer_extract_associated.rb +54 -0
- data/lib/rubocop/cop/callbacksystems/prefer_it_block_parameter.rb +156 -0
- data/lib/rubocop/cop/callbacksystems/prefer_many.rb +57 -0
- data/lib/rubocop/cop/callbacksystems/prefer_method_over_lambda.rb +211 -0
- data/lib/rubocop/cop/callbacksystems/prefer_method_over_variable.rb +172 -0
- data/lib/rubocop/cop/callbacksystems/prefer_module_for_static_class.rb +286 -0
- data/lib/rubocop/cop/callbacksystems/prefer_ordinal_array_access.rb +136 -0
- data/lib/rubocop/cop/callbacksystems/prefer_positive_wrap.rb +265 -0
- data/lib/rubocop/cop/callbacksystems/prefer_squish.rb +47 -0
- data/lib/rubocop/cop/callbacksystems/prefer_stringify_keys.rb +24 -0
- data/lib/rubocop/cop/callbacksystems/prefer_symbolize_keys.rb +24 -0
- data/lib/rubocop/cop/callbacksystems/prefer_turbo_page_refresh_broadcasts.rb +40 -0
- data/lib/rubocop/cop/callbacksystems/private_constants_in_private_section.rb +160 -0
- data/lib/rubocop/cop/callbacksystems/private_delegate_placement.rb +342 -0
- data/lib/rubocop/cop/callbacksystems/private_methods_in_private_section.rb +70 -0
- data/lib/rubocop/cop/callbacksystems/private_nested_class_method_visibility.rb +269 -0
- data/lib/rubocop/cop/callbacksystems/private_nested_classes.rb +94 -0
- data/lib/rubocop/cop/callbacksystems/public_methods_must_have_tests.rb +190 -0
- data/lib/rubocop/cop/callbacksystems/redundant_concern_extend.rb +157 -0
- data/lib/rubocop/cop/callbacksystems/redundant_constant_freeze.rb +57 -0
- data/lib/rubocop/cop/callbacksystems/redundant_constant_namespace.rb +134 -0
- data/lib/rubocop/cop/callbacksystems/reflow_comments.rb +133 -0
- data/lib/rubocop/cop/callbacksystems/repeated_fixture_in_tests.rb +106 -0
- data/lib/rubocop/cop/callbacksystems/restricted_controller_actions.rb +85 -0
- data/lib/rubocop/cop/callbacksystems/routes_module_scope.rb +336 -0
- data/lib/rubocop/cop/callbacksystems/single_line_setup_block.rb +107 -0
- data/lib/rubocop/cop/callbacksystems/single_singleton_class.rb +49 -0
- data/lib/rubocop/cop/callbacksystems/single_top_level_class_or_module.rb +160 -0
- data/lib/rubocop/cop/callbacksystems/single_use_fixture_variable.rb +211 -0
- data/lib/rubocop/cop/callbacksystems/single_use_setup_variable.rb +684 -0
- data/lib/rubocop/cop/callbacksystems/singular_scope_names.rb +47 -0
- data/lib/rubocop/cop/callbacksystems/space_inside_percent_literal.rb +73 -0
- data/lib/rubocop/cop/callbacksystems/system_test_browser_driver.rb +30 -0
- data/lib/rubocop/cop/callbacksystems/test_method_definition.rb +86 -0
- data/lib/rubocop/cop/callbacksystems/test_method_order.rb +319 -0
- data/lib/rubocop/cop/callbacksystems/too_many_instance_variables.rb +78 -0
- data/lib/rubocop/cop/callbacksystems/too_many_local_variables.rb +77 -0
- data/lib/rubocop/cop/callbacksystems/too_many_validation_guards.rb +84 -0
- data/lib/rubocop/cop/callbacksystems/unnecessary_local_variable.rb +176 -0
- data/lib/rubocop/cop/callbacksystems/unused_private_method_in_nested_class.rb +203 -0
- data/lib/rubocop-callbacksystems.rb +21 -0
- data/rubocop.yml +685 -0
- metadata +337 -0
data/rubocop.yml
ADDED
|
@@ -0,0 +1,685 @@
|
|
|
1
|
+
# Callbacksystems Ruby Style
|
|
2
|
+
|
|
3
|
+
plugins:
|
|
4
|
+
- rubocop-callbacksystems
|
|
5
|
+
- rubocop-minitest
|
|
6
|
+
- rubocop-performance
|
|
7
|
+
- rubocop-rails
|
|
8
|
+
|
|
9
|
+
AllCops:
|
|
10
|
+
NewCops: enable
|
|
11
|
+
TargetRubyVersion: 4.0
|
|
12
|
+
ActiveSupportExtensionsEnabled: true
|
|
13
|
+
SuggestExtensions: false
|
|
14
|
+
Exclude:
|
|
15
|
+
- app/controllers/concerns/authentication.rb
|
|
16
|
+
- "app/channels/application_cable/**/*"
|
|
17
|
+
- "bin/**/*"
|
|
18
|
+
- "config/environments/**/*"
|
|
19
|
+
- "config/initializers/**/*"
|
|
20
|
+
- "config/application.rb"
|
|
21
|
+
- "config/boot.rb"
|
|
22
|
+
- "config/ci.rb"
|
|
23
|
+
- "config/environment.rb"
|
|
24
|
+
- "config/puma.rb"
|
|
25
|
+
- "config.ru"
|
|
26
|
+
- "db/**/*"
|
|
27
|
+
- "gems/**/*"
|
|
28
|
+
- "node_modules/**/*"
|
|
29
|
+
- "Rakefile"
|
|
30
|
+
- "test/test_helper.rb"
|
|
31
|
+
- "tmp/**/*"
|
|
32
|
+
- "vendor/**/*"
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
# Bundler
|
|
36
|
+
|
|
37
|
+
Bundler/OrderedGems:
|
|
38
|
+
Enabled: false
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
# Layout
|
|
42
|
+
|
|
43
|
+
Layout/AccessModifierIndentation:
|
|
44
|
+
Enabled: false
|
|
45
|
+
|
|
46
|
+
Layout/ArgumentAlignment:
|
|
47
|
+
EnforcedStyle: with_fixed_indentation
|
|
48
|
+
|
|
49
|
+
Layout/ArrayAlignment:
|
|
50
|
+
EnforcedStyle: with_fixed_indentation
|
|
51
|
+
|
|
52
|
+
Layout/CaseIndentation:
|
|
53
|
+
EnforcedStyle: end
|
|
54
|
+
|
|
55
|
+
Layout/ClassStructure:
|
|
56
|
+
Enabled: false
|
|
57
|
+
|
|
58
|
+
Layout/ClosingParenthesisIndentation:
|
|
59
|
+
Enabled: false
|
|
60
|
+
|
|
61
|
+
Layout/EmptyLinesAfterModuleInclusion:
|
|
62
|
+
Enabled: true
|
|
63
|
+
|
|
64
|
+
Layout/EmptyLinesAroundAccessModifier:
|
|
65
|
+
EnforcedStyle: only_before
|
|
66
|
+
|
|
67
|
+
Layout/EmptyLinesAroundAttributeAccessor:
|
|
68
|
+
Enabled: true
|
|
69
|
+
AllowedMethods:
|
|
70
|
+
- delegate
|
|
71
|
+
- delegate_missing_to
|
|
72
|
+
|
|
73
|
+
Layout/EndAlignment:
|
|
74
|
+
EnforcedStyleAlignWith: variable
|
|
75
|
+
|
|
76
|
+
Layout/FirstHashElementIndentation:
|
|
77
|
+
EnforcedStyle: consistent
|
|
78
|
+
|
|
79
|
+
Layout/FirstHashElementLineBreak:
|
|
80
|
+
Enabled: true
|
|
81
|
+
|
|
82
|
+
Layout/HashAlignment:
|
|
83
|
+
Enabled: false
|
|
84
|
+
|
|
85
|
+
Layout/IndentationConsistency:
|
|
86
|
+
EnforcedStyle: indented_internal_methods
|
|
87
|
+
|
|
88
|
+
Layout/IndentationWidth:
|
|
89
|
+
Width: 2
|
|
90
|
+
|
|
91
|
+
Layout/LineEndStringConcatenationIndentation:
|
|
92
|
+
EnforcedStyle: indented
|
|
93
|
+
|
|
94
|
+
Layout/LineLength:
|
|
95
|
+
Max: 120
|
|
96
|
+
AutoCorrect: false
|
|
97
|
+
|
|
98
|
+
Layout/MultilineMethodCallIndentation:
|
|
99
|
+
EnforcedStyle: indented
|
|
100
|
+
|
|
101
|
+
Layout/MultilineOperationIndentation:
|
|
102
|
+
EnforcedStyle: indented
|
|
103
|
+
|
|
104
|
+
Layout/ParameterAlignment:
|
|
105
|
+
EnforcedStyle: with_first_parameter
|
|
106
|
+
|
|
107
|
+
Layout/RedundantLineBreak:
|
|
108
|
+
Enabled: false
|
|
109
|
+
|
|
110
|
+
Layout/SpaceInsideArrayLiteralBrackets:
|
|
111
|
+
EnforcedStyle: space
|
|
112
|
+
EnforcedStyleForEmptyBrackets: no_space
|
|
113
|
+
|
|
114
|
+
Layout/SpaceInsideBlockBraces:
|
|
115
|
+
EnforcedStyleForEmptyBraces: space
|
|
116
|
+
|
|
117
|
+
Layout/SpaceInsideHashLiteralBraces:
|
|
118
|
+
EnforcedStyle: space
|
|
119
|
+
EnforcedStyleForEmptyBraces: no_space
|
|
120
|
+
|
|
121
|
+
Layout/SpaceInsidePercentLiteralDelimiters:
|
|
122
|
+
Enabled: false
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
# Lint
|
|
126
|
+
|
|
127
|
+
Lint/AmbiguousBlockAssociation:
|
|
128
|
+
Enabled: false
|
|
129
|
+
|
|
130
|
+
Lint/AmbiguousOperator:
|
|
131
|
+
Enabled: false
|
|
132
|
+
|
|
133
|
+
Lint/AmbiguousRegexpLiteral:
|
|
134
|
+
Enabled: false
|
|
135
|
+
|
|
136
|
+
Lint/AssignmentInCondition:
|
|
137
|
+
Enabled: false
|
|
138
|
+
|
|
139
|
+
Lint/DuplicateBranch:
|
|
140
|
+
Enabled: true
|
|
141
|
+
|
|
142
|
+
Lint/DuplicateMatchPattern:
|
|
143
|
+
Enabled: true
|
|
144
|
+
|
|
145
|
+
Lint/DuplicateRegexpCharacterClassElement:
|
|
146
|
+
Enabled: true
|
|
147
|
+
|
|
148
|
+
Lint/DuplicateSetElement:
|
|
149
|
+
Enabled: true
|
|
150
|
+
|
|
151
|
+
Lint/NoReturnInBeginEndBlocks:
|
|
152
|
+
Enabled: false
|
|
153
|
+
|
|
154
|
+
Lint/NonAtomicFileOperation:
|
|
155
|
+
Enabled: true
|
|
156
|
+
|
|
157
|
+
Lint/NumericOperationWithConstantResult:
|
|
158
|
+
Enabled: true
|
|
159
|
+
|
|
160
|
+
Lint/OrAssignmentToConstant:
|
|
161
|
+
Enabled: true
|
|
162
|
+
|
|
163
|
+
Lint/RedundantDirGlobSort:
|
|
164
|
+
Enabled: true
|
|
165
|
+
|
|
166
|
+
Lint/RedundantRegexpQuantifiers:
|
|
167
|
+
Enabled: true
|
|
168
|
+
|
|
169
|
+
Lint/RedundantTypeConversion:
|
|
170
|
+
Enabled: true
|
|
171
|
+
|
|
172
|
+
Lint/RequireParentheses:
|
|
173
|
+
Enabled: false
|
|
174
|
+
|
|
175
|
+
Lint/RequireRangeParentheses:
|
|
176
|
+
Enabled: true
|
|
177
|
+
|
|
178
|
+
Lint/RequireRelativeSelfPath:
|
|
179
|
+
Enabled: true
|
|
180
|
+
|
|
181
|
+
Lint/SuppressedException:
|
|
182
|
+
Enabled: false
|
|
183
|
+
|
|
184
|
+
Lint/SymbolConversion:
|
|
185
|
+
Enabled: true
|
|
186
|
+
|
|
187
|
+
Lint/UnescapedBracketInRegexp:
|
|
188
|
+
Enabled: true
|
|
189
|
+
|
|
190
|
+
Lint/UnexpectedBlockArity:
|
|
191
|
+
Enabled: true
|
|
192
|
+
|
|
193
|
+
Lint/UnmodifiedReduceAccumulator:
|
|
194
|
+
Enabled: true
|
|
195
|
+
|
|
196
|
+
Lint/UnusedMethodArgument:
|
|
197
|
+
Enabled: false
|
|
198
|
+
|
|
199
|
+
Lint/UselessAccessModifier:
|
|
200
|
+
Enabled: false
|
|
201
|
+
|
|
202
|
+
Lint/UselessConstantScoping:
|
|
203
|
+
Enabled: false
|
|
204
|
+
|
|
205
|
+
Lint/UselessNumericOperation:
|
|
206
|
+
Enabled: true
|
|
207
|
+
|
|
208
|
+
Lint/UselessOr:
|
|
209
|
+
Enabled: true
|
|
210
|
+
|
|
211
|
+
Lint/UselessRescue:
|
|
212
|
+
Enabled: true
|
|
213
|
+
|
|
214
|
+
Lint/UselessRuby2Keywords:
|
|
215
|
+
Enabled: true
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
# Metrics
|
|
219
|
+
|
|
220
|
+
Metrics/AbcSize:
|
|
221
|
+
Max: 25
|
|
222
|
+
|
|
223
|
+
Metrics/BlockLength:
|
|
224
|
+
Enabled: false
|
|
225
|
+
|
|
226
|
+
Metrics/ClassLength:
|
|
227
|
+
Max: 200
|
|
228
|
+
Exclude:
|
|
229
|
+
- "test/**/*"
|
|
230
|
+
|
|
231
|
+
Metrics/MethodLength:
|
|
232
|
+
Max: 20
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
# Naming
|
|
236
|
+
|
|
237
|
+
Naming/AccessorMethodName:
|
|
238
|
+
Enabled: false
|
|
239
|
+
|
|
240
|
+
Naming/BlockForwarding:
|
|
241
|
+
EnforcedStyle: explicit
|
|
242
|
+
|
|
243
|
+
Naming/PredicateMethod:
|
|
244
|
+
Enabled: false
|
|
245
|
+
|
|
246
|
+
Naming/PredicatePrefix:
|
|
247
|
+
Enabled: false
|
|
248
|
+
|
|
249
|
+
Naming/RescuedExceptionsVariableName:
|
|
250
|
+
PreferredName: error
|
|
251
|
+
|
|
252
|
+
Naming/VariableNumber:
|
|
253
|
+
Exclude:
|
|
254
|
+
- "test/**/*"
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
# Performance
|
|
258
|
+
|
|
259
|
+
Performance/TimesMap:
|
|
260
|
+
Enabled: false
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
# Rails
|
|
264
|
+
|
|
265
|
+
Rails/ActionOrder:
|
|
266
|
+
ExpectedOrder:
|
|
267
|
+
- index
|
|
268
|
+
- show
|
|
269
|
+
- new
|
|
270
|
+
- create
|
|
271
|
+
- edit
|
|
272
|
+
- update
|
|
273
|
+
- destroy
|
|
274
|
+
|
|
275
|
+
Rails/AttributeDefaultBlockValue:
|
|
276
|
+
Enabled: false
|
|
277
|
+
|
|
278
|
+
Rails/DynamicFindBy:
|
|
279
|
+
Enabled: false
|
|
280
|
+
|
|
281
|
+
Rails/EnumHash:
|
|
282
|
+
Enabled: false
|
|
283
|
+
|
|
284
|
+
Rails/HasManyOrHasOneDependent:
|
|
285
|
+
Enabled: false
|
|
286
|
+
|
|
287
|
+
Rails/Inquiry:
|
|
288
|
+
Enabled: false
|
|
289
|
+
|
|
290
|
+
Rails/SkipsModelValidations:
|
|
291
|
+
Enabled: false
|
|
292
|
+
|
|
293
|
+
Rails/TimeZoneAssignment:
|
|
294
|
+
Enabled: false
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
# Minitest
|
|
298
|
+
|
|
299
|
+
Minitest/AssertEmpty:
|
|
300
|
+
Enabled: true
|
|
301
|
+
|
|
302
|
+
Minitest/MultipleAssertions:
|
|
303
|
+
Max: 5
|
|
304
|
+
|
|
305
|
+
Minitest/AssertEmptyLiteral:
|
|
306
|
+
Enabled: true
|
|
307
|
+
|
|
308
|
+
Minitest/AssertEqual:
|
|
309
|
+
Enabled: true
|
|
310
|
+
|
|
311
|
+
Minitest/AssertIncludes:
|
|
312
|
+
Enabled: true
|
|
313
|
+
|
|
314
|
+
Minitest/AssertInstanceOf:
|
|
315
|
+
Enabled: true
|
|
316
|
+
|
|
317
|
+
Minitest/AssertKindOf:
|
|
318
|
+
Enabled: true
|
|
319
|
+
|
|
320
|
+
Minitest/AssertMatch:
|
|
321
|
+
Enabled: true
|
|
322
|
+
|
|
323
|
+
Minitest/AssertNil:
|
|
324
|
+
Enabled: true
|
|
325
|
+
|
|
326
|
+
Minitest/AssertOperator:
|
|
327
|
+
Enabled: true
|
|
328
|
+
|
|
329
|
+
Minitest/AssertPathExists:
|
|
330
|
+
Enabled: true
|
|
331
|
+
|
|
332
|
+
Minitest/AssertPredicate:
|
|
333
|
+
Enabled: false
|
|
334
|
+
|
|
335
|
+
Minitest/AssertRespondTo:
|
|
336
|
+
Enabled: true
|
|
337
|
+
|
|
338
|
+
Minitest/AssertSame:
|
|
339
|
+
Enabled: true
|
|
340
|
+
|
|
341
|
+
Minitest/AssertSilent:
|
|
342
|
+
Enabled: true
|
|
343
|
+
|
|
344
|
+
Minitest/AssertTruthy:
|
|
345
|
+
Enabled: true
|
|
346
|
+
|
|
347
|
+
Minitest/AssertWithExpectedArgument:
|
|
348
|
+
Enabled: false
|
|
349
|
+
|
|
350
|
+
Minitest/LiteralAsActualArgument:
|
|
351
|
+
Enabled: true
|
|
352
|
+
|
|
353
|
+
Minitest/RefuteEmpty:
|
|
354
|
+
Enabled: false
|
|
355
|
+
|
|
356
|
+
Minitest/RefuteEqual:
|
|
357
|
+
Enabled: false
|
|
358
|
+
|
|
359
|
+
Minitest/RefuteFalse:
|
|
360
|
+
Enabled: false
|
|
361
|
+
|
|
362
|
+
Minitest/RefuteIncludes:
|
|
363
|
+
Enabled: false
|
|
364
|
+
|
|
365
|
+
Minitest/RefuteInstanceOf:
|
|
366
|
+
Enabled: false
|
|
367
|
+
|
|
368
|
+
Minitest/RefuteKindOf:
|
|
369
|
+
Enabled: false
|
|
370
|
+
|
|
371
|
+
Minitest/RefuteMatch:
|
|
372
|
+
Enabled: false
|
|
373
|
+
|
|
374
|
+
Minitest/RefuteNil:
|
|
375
|
+
Enabled: false
|
|
376
|
+
|
|
377
|
+
Minitest/RefuteOperator:
|
|
378
|
+
Enabled: false
|
|
379
|
+
|
|
380
|
+
Minitest/RefutePathExists:
|
|
381
|
+
Enabled: false
|
|
382
|
+
|
|
383
|
+
Minitest/RefutePredicate:
|
|
384
|
+
Enabled: false
|
|
385
|
+
|
|
386
|
+
Minitest/RefuteRespondTo:
|
|
387
|
+
Enabled: false
|
|
388
|
+
|
|
389
|
+
Minitest/RefuteSame:
|
|
390
|
+
Enabled: false
|
|
391
|
+
|
|
392
|
+
Minitest/UnspecifiedException:
|
|
393
|
+
Enabled: true
|
|
394
|
+
|
|
395
|
+
Minitest/UselessAssertion:
|
|
396
|
+
Enabled: true
|
|
397
|
+
|
|
398
|
+
|
|
399
|
+
# Style
|
|
400
|
+
|
|
401
|
+
Style/AccessModifierDeclarations:
|
|
402
|
+
AllowModifiersOnAttrs: false
|
|
403
|
+
AllowModifiersOnAliasMethod: false
|
|
404
|
+
|
|
405
|
+
Style/Alias:
|
|
406
|
+
Enabled: false
|
|
407
|
+
|
|
408
|
+
Style/AndOr:
|
|
409
|
+
Enabled: false
|
|
410
|
+
|
|
411
|
+
Style/ArgumentsForwarding:
|
|
412
|
+
Enabled: false
|
|
413
|
+
|
|
414
|
+
Style/ArrayFirstLast:
|
|
415
|
+
Enabled: true
|
|
416
|
+
|
|
417
|
+
Style/ArrayIntersect:
|
|
418
|
+
Enabled: true
|
|
419
|
+
|
|
420
|
+
Style/ArrayIntersectWithSingleElement:
|
|
421
|
+
Enabled: true
|
|
422
|
+
|
|
423
|
+
Style/AutoResourceCleanup:
|
|
424
|
+
Enabled: true
|
|
425
|
+
|
|
426
|
+
Style/BlockDelimiters:
|
|
427
|
+
EnforcedStyle: line_count_based
|
|
428
|
+
|
|
429
|
+
Style/ClassAndModuleChildren:
|
|
430
|
+
EnforcedStyle: compact
|
|
431
|
+
|
|
432
|
+
Style/ClassMethodsDefinitions:
|
|
433
|
+
Enabled: true
|
|
434
|
+
EnforcedStyle: self_class
|
|
435
|
+
|
|
436
|
+
Style/CollectionCompact:
|
|
437
|
+
Enabled: true
|
|
438
|
+
|
|
439
|
+
Style/CollectionQuerying:
|
|
440
|
+
Enabled: true
|
|
441
|
+
|
|
442
|
+
Style/ComparableBetween:
|
|
443
|
+
Enabled: true
|
|
444
|
+
|
|
445
|
+
Style/DataInheritance:
|
|
446
|
+
Enabled: false
|
|
447
|
+
|
|
448
|
+
Style/DirEmpty:
|
|
449
|
+
Enabled: true
|
|
450
|
+
|
|
451
|
+
Style/DisableCopsWithinSourceCodeDirective:
|
|
452
|
+
Enabled: true
|
|
453
|
+
|
|
454
|
+
Style/Documentation:
|
|
455
|
+
Enabled: false
|
|
456
|
+
|
|
457
|
+
Style/DocumentationMethod:
|
|
458
|
+
Enabled: false
|
|
459
|
+
|
|
460
|
+
Style/EmptyCaseCondition:
|
|
461
|
+
Enabled: false
|
|
462
|
+
|
|
463
|
+
Style/EmptyClassDefinition:
|
|
464
|
+
Enabled: false
|
|
465
|
+
|
|
466
|
+
Style/EmptyElse:
|
|
467
|
+
Enabled: false
|
|
468
|
+
|
|
469
|
+
Style/EmptyMethod:
|
|
470
|
+
EnforcedStyle: expanded
|
|
471
|
+
|
|
472
|
+
Style/EmptyStringInsideInterpolation:
|
|
473
|
+
Enabled: true
|
|
474
|
+
|
|
475
|
+
Style/EndlessMethod:
|
|
476
|
+
EnforcedStyle: disallow
|
|
477
|
+
|
|
478
|
+
Style/ExactRegexpMatch:
|
|
479
|
+
Enabled: true
|
|
480
|
+
|
|
481
|
+
Style/ExplicitBlockArgument:
|
|
482
|
+
Enabled: false
|
|
483
|
+
|
|
484
|
+
Style/FileEmpty:
|
|
485
|
+
Enabled: true
|
|
486
|
+
|
|
487
|
+
Style/FileRead:
|
|
488
|
+
Enabled: true
|
|
489
|
+
|
|
490
|
+
Style/FileTouch:
|
|
491
|
+
Enabled: true
|
|
492
|
+
|
|
493
|
+
Style/FileWrite:
|
|
494
|
+
Enabled: true
|
|
495
|
+
|
|
496
|
+
Style/FrozenStringLiteralComment:
|
|
497
|
+
Enabled: true
|
|
498
|
+
EnforcedStyle: never
|
|
499
|
+
|
|
500
|
+
Style/GlobalStdStream:
|
|
501
|
+
Enabled: false
|
|
502
|
+
|
|
503
|
+
Style/GuardClause:
|
|
504
|
+
Enabled: false
|
|
505
|
+
|
|
506
|
+
Style/HashAsLastArrayItem:
|
|
507
|
+
Enabled: false
|
|
508
|
+
|
|
509
|
+
Style/HashExcept:
|
|
510
|
+
Enabled: true
|
|
511
|
+
|
|
512
|
+
Style/HashLikeCase:
|
|
513
|
+
Enabled: false
|
|
514
|
+
|
|
515
|
+
Style/HashSlice:
|
|
516
|
+
Enabled: true
|
|
517
|
+
|
|
518
|
+
Style/IfUnlessModifier:
|
|
519
|
+
Enabled: false
|
|
520
|
+
|
|
521
|
+
Style/IfWithBooleanLiteralBranches:
|
|
522
|
+
Enabled: true
|
|
523
|
+
|
|
524
|
+
Style/InvertibleUnlessCondition:
|
|
525
|
+
Enabled: true
|
|
526
|
+
|
|
527
|
+
Style/ItAssignment:
|
|
528
|
+
Enabled: true
|
|
529
|
+
|
|
530
|
+
Style/ItBlockParameter:
|
|
531
|
+
Enabled: true
|
|
532
|
+
EnforcedStyle: allow_single_line
|
|
533
|
+
|
|
534
|
+
Style/KeywordArgumentsMerging:
|
|
535
|
+
Enabled: true
|
|
536
|
+
|
|
537
|
+
Style/Lambda:
|
|
538
|
+
Enabled: false
|
|
539
|
+
|
|
540
|
+
Style/MapCompactWithConditionalBlock:
|
|
541
|
+
Enabled: true
|
|
542
|
+
|
|
543
|
+
Style/MapToHash:
|
|
544
|
+
Enabled: true
|
|
545
|
+
|
|
546
|
+
Style/MapToSet:
|
|
547
|
+
Enabled: true
|
|
548
|
+
|
|
549
|
+
Style/MixinGrouping:
|
|
550
|
+
Enabled: false
|
|
551
|
+
|
|
552
|
+
Style/ModuleFunction:
|
|
553
|
+
EnforcedStyle: extend_self
|
|
554
|
+
|
|
555
|
+
Style/MultilineTernaryOperator:
|
|
556
|
+
Enabled: false
|
|
557
|
+
|
|
558
|
+
Style/MutableConstant:
|
|
559
|
+
Enabled: false
|
|
560
|
+
|
|
561
|
+
Style/NegatedIfElseCondition:
|
|
562
|
+
Enabled: true
|
|
563
|
+
|
|
564
|
+
Style/NestedParenthesizedCalls:
|
|
565
|
+
Enabled: false
|
|
566
|
+
|
|
567
|
+
Style/Next:
|
|
568
|
+
Enabled: false
|
|
569
|
+
|
|
570
|
+
Style/NumberedParameters:
|
|
571
|
+
EnforcedStyle: disallow
|
|
572
|
+
|
|
573
|
+
Style/NumericLiterals:
|
|
574
|
+
Enabled: false
|
|
575
|
+
|
|
576
|
+
Style/OpenStructUse:
|
|
577
|
+
Enabled: false
|
|
578
|
+
|
|
579
|
+
Style/ParallelAssignment:
|
|
580
|
+
Enabled: false
|
|
581
|
+
|
|
582
|
+
Style/ParenthesesAroundCondition:
|
|
583
|
+
Enabled: false
|
|
584
|
+
|
|
585
|
+
Style/QuotedSymbols:
|
|
586
|
+
EnforcedStyle: double_quotes
|
|
587
|
+
|
|
588
|
+
Style/RedundantArrayFlatten:
|
|
589
|
+
Enabled: true
|
|
590
|
+
|
|
591
|
+
Style/RedundantConstantBase:
|
|
592
|
+
Enabled: true
|
|
593
|
+
|
|
594
|
+
Style/RedundantCurrentDirectoryInPath:
|
|
595
|
+
Enabled: true
|
|
596
|
+
|
|
597
|
+
Style/RedundantDoubleSplatHashBraces:
|
|
598
|
+
Enabled: true
|
|
599
|
+
|
|
600
|
+
Style/RedundantEach:
|
|
601
|
+
Enabled: true
|
|
602
|
+
|
|
603
|
+
Style/RedundantFilterChain:
|
|
604
|
+
Enabled: true
|
|
605
|
+
|
|
606
|
+
Style/RedundantFreeze:
|
|
607
|
+
Enabled: true
|
|
608
|
+
|
|
609
|
+
Style/RedundantInitialize:
|
|
610
|
+
Enabled: true
|
|
611
|
+
|
|
612
|
+
Style/RedundantInterpolationUnfreeze:
|
|
613
|
+
Enabled: true
|
|
614
|
+
|
|
615
|
+
Style/RedundantLineContinuation:
|
|
616
|
+
Enabled: true
|
|
617
|
+
|
|
618
|
+
Style/RedundantPercentQ:
|
|
619
|
+
Enabled: false
|
|
620
|
+
|
|
621
|
+
Style/RedundantRegexpArgument:
|
|
622
|
+
Enabled: true
|
|
623
|
+
|
|
624
|
+
Style/RedundantRegexpConstructor:
|
|
625
|
+
Enabled: true
|
|
626
|
+
|
|
627
|
+
Style/RedundantSelfAssignmentBranch:
|
|
628
|
+
Enabled: true
|
|
629
|
+
|
|
630
|
+
Style/RedundantStringEscape:
|
|
631
|
+
Enabled: true
|
|
632
|
+
|
|
633
|
+
Style/RegexpLiteral:
|
|
634
|
+
EnforcedStyle: mixed
|
|
635
|
+
|
|
636
|
+
Style/RescueStandardError:
|
|
637
|
+
EnforcedStyle: implicit
|
|
638
|
+
|
|
639
|
+
Style/ReturnNil:
|
|
640
|
+
Enabled: true
|
|
641
|
+
|
|
642
|
+
Style/ReturnNilInPredicateMethodDefinition:
|
|
643
|
+
Enabled: true
|
|
644
|
+
|
|
645
|
+
Style/SafeNavigationChainLength:
|
|
646
|
+
Enabled: false
|
|
647
|
+
|
|
648
|
+
Style/SelectByRegexp:
|
|
649
|
+
Enabled: true
|
|
650
|
+
|
|
651
|
+
Style/SingleLineDoEndBlock:
|
|
652
|
+
Enabled: true
|
|
653
|
+
|
|
654
|
+
Style/SoleNestedConditional:
|
|
655
|
+
Enabled: false
|
|
656
|
+
|
|
657
|
+
Style/StaticClass:
|
|
658
|
+
Enabled: true
|
|
659
|
+
|
|
660
|
+
Style/StringHashKeys:
|
|
661
|
+
Enabled: false
|
|
662
|
+
|
|
663
|
+
Style/StringLiterals:
|
|
664
|
+
EnforcedStyle: double_quotes
|
|
665
|
+
|
|
666
|
+
Style/StringLiteralsInInterpolation:
|
|
667
|
+
EnforcedStyle: double_quotes
|
|
668
|
+
|
|
669
|
+
Style/StructInheritance:
|
|
670
|
+
Enabled: false
|
|
671
|
+
|
|
672
|
+
Style/SuperArguments:
|
|
673
|
+
Enabled: true
|
|
674
|
+
|
|
675
|
+
Style/SuperWithArgsParentheses:
|
|
676
|
+
Enabled: true
|
|
677
|
+
|
|
678
|
+
Style/SwapValues:
|
|
679
|
+
Enabled: true
|
|
680
|
+
|
|
681
|
+
Style/SymbolArray:
|
|
682
|
+
Enabled: false
|
|
683
|
+
|
|
684
|
+
Style/WordArray:
|
|
685
|
+
Enabled: false
|