rubocop-rails 2.13.1 → 2.14.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/default.yml +75 -4
- data/lib/rubocop/cop/mixin/class_send_node_helper.rb +20 -0
- data/lib/rubocop/cop/mixin/migrations_helper.rb +26 -0
- data/lib/rubocop/cop/rails/action_controller_test_case.rb +47 -0
- data/lib/rubocop/cop/rails/after_commit_override.rb +2 -12
- data/lib/rubocop/cop/rails/bulk_change_table.rb +20 -6
- data/lib/rubocop/cop/rails/compact_blank.rb +22 -13
- data/lib/rubocop/cop/rails/deprecated_active_model_errors_methods.rb +108 -0
- data/lib/rubocop/cop/rails/duplicate_association.rb +56 -0
- data/lib/rubocop/cop/rails/duplicate_scope.rb +46 -0
- data/lib/rubocop/cop/rails/duration_arithmetic.rb +2 -1
- data/lib/rubocop/cop/rails/i18n_lazy_lookup.rb +94 -0
- data/lib/rubocop/cop/rails/i18n_locale_texts.rb +110 -0
- data/lib/rubocop/cop/rails/inverse_of.rb +17 -1
- data/lib/rubocop/cop/rails/migration_class_name.rb +71 -0
- data/lib/rubocop/cop/rails/pluck.rb +15 -7
- data/lib/rubocop/cop/rails/read_write_attribute.rb +34 -18
- data/lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb +5 -4
- data/lib/rubocop/cop/rails/reversible_migration.rb +4 -2
- data/lib/rubocop/cop/rails/reversible_migration_method_definition.rb +2 -10
- data/lib/rubocop/cop/rails/table_name_assignment.rb +44 -0
- data/lib/rubocop/cop/rails/transaction_exit_statement.rb +77 -0
- data/lib/rubocop/cop/rails_cops.rb +11 -0
- data/lib/rubocop/rails/version.rb +1 -1
- metadata +14 -3
@@ -2,10 +2,13 @@
|
|
2
2
|
|
3
3
|
require_relative 'mixin/active_record_helper'
|
4
4
|
require_relative 'mixin/active_record_migrations_helper'
|
5
|
+
require_relative 'mixin/class_send_node_helper'
|
5
6
|
require_relative 'mixin/enforce_superclass'
|
6
7
|
require_relative 'mixin/index_method'
|
8
|
+
require_relative 'mixin/migrations_helper'
|
7
9
|
require_relative 'mixin/target_rails_version'
|
8
10
|
|
11
|
+
require_relative 'rails/action_controller_test_case'
|
9
12
|
require_relative 'rails/action_filter'
|
10
13
|
require_relative 'rails/active_record_aliases'
|
11
14
|
require_relative 'rails/active_record_callbacks_order'
|
@@ -30,6 +33,9 @@ require_relative 'rails/date'
|
|
30
33
|
require_relative 'rails/default_scope'
|
31
34
|
require_relative 'rails/delegate'
|
32
35
|
require_relative 'rails/delegate_allow_blank'
|
36
|
+
require_relative 'rails/deprecated_active_model_errors_methods'
|
37
|
+
require_relative 'rails/duplicate_association'
|
38
|
+
require_relative 'rails/duplicate_scope'
|
33
39
|
require_relative 'rails/duration_arithmetic'
|
34
40
|
require_relative 'rails/dynamic_find_by'
|
35
41
|
require_relative 'rails/eager_evaluation_log_message'
|
@@ -48,7 +54,9 @@ require_relative 'rails/has_many_or_has_one_dependent'
|
|
48
54
|
require_relative 'rails/helper_instance_variable'
|
49
55
|
require_relative 'rails/http_positional_arguments'
|
50
56
|
require_relative 'rails/http_status'
|
57
|
+
require_relative 'rails/i18n_lazy_lookup'
|
51
58
|
require_relative 'rails/i18n_locale_assignment'
|
59
|
+
require_relative 'rails/i18n_locale_texts'
|
52
60
|
require_relative 'rails/ignored_skip_action_filter_option'
|
53
61
|
require_relative 'rails/index_by'
|
54
62
|
require_relative 'rails/index_with'
|
@@ -58,6 +66,7 @@ require_relative 'rails/lexically_scoped_action_filter'
|
|
58
66
|
require_relative 'rails/link_to_blank'
|
59
67
|
require_relative 'rails/mailer_name'
|
60
68
|
require_relative 'rails/match_route'
|
69
|
+
require_relative 'rails/migration_class_name'
|
61
70
|
require_relative 'rails/negate_include'
|
62
71
|
require_relative 'rails/not_null_column'
|
63
72
|
require_relative 'rails/order_by_id'
|
@@ -95,8 +104,10 @@ require_relative 'rails/scope_args'
|
|
95
104
|
require_relative 'rails/short_i18n'
|
96
105
|
require_relative 'rails/skips_model_validations'
|
97
106
|
require_relative 'rails/squished_sql_heredocs'
|
107
|
+
require_relative 'rails/table_name_assignment'
|
98
108
|
require_relative 'rails/time_zone'
|
99
109
|
require_relative 'rails/time_zone_assignment'
|
110
|
+
require_relative 'rails/transaction_exit_statement'
|
100
111
|
require_relative 'rails/uniq_before_pluck'
|
101
112
|
require_relative 'rails/unique_validation_without_index'
|
102
113
|
require_relative 'rails/unknown_env'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.14.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bozhidar Batsov
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2022-
|
13
|
+
date: 2022-03-16 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|
@@ -79,9 +79,12 @@ files:
|
|
79
79
|
- lib/rubocop-rails.rb
|
80
80
|
- lib/rubocop/cop/mixin/active_record_helper.rb
|
81
81
|
- lib/rubocop/cop/mixin/active_record_migrations_helper.rb
|
82
|
+
- lib/rubocop/cop/mixin/class_send_node_helper.rb
|
82
83
|
- lib/rubocop/cop/mixin/enforce_superclass.rb
|
83
84
|
- lib/rubocop/cop/mixin/index_method.rb
|
85
|
+
- lib/rubocop/cop/mixin/migrations_helper.rb
|
84
86
|
- lib/rubocop/cop/mixin/target_rails_version.rb
|
87
|
+
- lib/rubocop/cop/rails/action_controller_test_case.rb
|
85
88
|
- lib/rubocop/cop/rails/action_filter.rb
|
86
89
|
- lib/rubocop/cop/rails/active_record_aliases.rb
|
87
90
|
- lib/rubocop/cop/rails/active_record_callbacks_order.rb
|
@@ -106,6 +109,9 @@ files:
|
|
106
109
|
- lib/rubocop/cop/rails/default_scope.rb
|
107
110
|
- lib/rubocop/cop/rails/delegate.rb
|
108
111
|
- lib/rubocop/cop/rails/delegate_allow_blank.rb
|
112
|
+
- lib/rubocop/cop/rails/deprecated_active_model_errors_methods.rb
|
113
|
+
- lib/rubocop/cop/rails/duplicate_association.rb
|
114
|
+
- lib/rubocop/cop/rails/duplicate_scope.rb
|
109
115
|
- lib/rubocop/cop/rails/duration_arithmetic.rb
|
110
116
|
- lib/rubocop/cop/rails/dynamic_find_by.rb
|
111
117
|
- lib/rubocop/cop/rails/eager_evaluation_log_message.rb
|
@@ -124,7 +130,9 @@ files:
|
|
124
130
|
- lib/rubocop/cop/rails/helper_instance_variable.rb
|
125
131
|
- lib/rubocop/cop/rails/http_positional_arguments.rb
|
126
132
|
- lib/rubocop/cop/rails/http_status.rb
|
133
|
+
- lib/rubocop/cop/rails/i18n_lazy_lookup.rb
|
127
134
|
- lib/rubocop/cop/rails/i18n_locale_assignment.rb
|
135
|
+
- lib/rubocop/cop/rails/i18n_locale_texts.rb
|
128
136
|
- lib/rubocop/cop/rails/ignored_skip_action_filter_option.rb
|
129
137
|
- lib/rubocop/cop/rails/index_by.rb
|
130
138
|
- lib/rubocop/cop/rails/index_with.rb
|
@@ -134,6 +142,7 @@ files:
|
|
134
142
|
- lib/rubocop/cop/rails/link_to_blank.rb
|
135
143
|
- lib/rubocop/cop/rails/mailer_name.rb
|
136
144
|
- lib/rubocop/cop/rails/match_route.rb
|
145
|
+
- lib/rubocop/cop/rails/migration_class_name.rb
|
137
146
|
- lib/rubocop/cop/rails/negate_include.rb
|
138
147
|
- lib/rubocop/cop/rails/not_null_column.rb
|
139
148
|
- lib/rubocop/cop/rails/order_by_id.rb
|
@@ -171,8 +180,10 @@ files:
|
|
171
180
|
- lib/rubocop/cop/rails/short_i18n.rb
|
172
181
|
- lib/rubocop/cop/rails/skips_model_validations.rb
|
173
182
|
- lib/rubocop/cop/rails/squished_sql_heredocs.rb
|
183
|
+
- lib/rubocop/cop/rails/table_name_assignment.rb
|
174
184
|
- lib/rubocop/cop/rails/time_zone.rb
|
175
185
|
- lib/rubocop/cop/rails/time_zone_assignment.rb
|
186
|
+
- lib/rubocop/cop/rails/transaction_exit_statement.rb
|
176
187
|
- lib/rubocop/cop/rails/uniq_before_pluck.rb
|
177
188
|
- lib/rubocop/cop/rails/unique_validation_without_index.rb
|
178
189
|
- lib/rubocop/cop/rails/unknown_env.rb
|
@@ -194,7 +205,7 @@ metadata:
|
|
194
205
|
homepage_uri: https://docs.rubocop.org/rubocop-rails/
|
195
206
|
changelog_uri: https://github.com/rubocop/rubocop-rails/blob/master/CHANGELOG.md
|
196
207
|
source_code_uri: https://github.com/rubocop/rubocop-rails/
|
197
|
-
documentation_uri: https://docs.rubocop.org/rubocop-rails/2.
|
208
|
+
documentation_uri: https://docs.rubocop.org/rubocop-rails/2.14/
|
198
209
|
bug_tracker_uri: https://github.com/rubocop/rubocop-rails/issues
|
199
210
|
rubygems_mfa_required: 'true'
|
200
211
|
post_install_message:
|