rubocop-rails 2.8.1 → 2.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +16 -0
- data/config/default.yml +33 -1
- data/lib/rubocop/cop/mixin/active_record_helper.rb +4 -3
- data/lib/rubocop/cop/mixin/enforce_superclass.rb +40 -0
- data/lib/rubocop/cop/mixin/index_method.rb +8 -11
- data/lib/rubocop/cop/rails/action_filter.rb +10 -14
- data/lib/rubocop/cop/rails/active_record_aliases.rb +13 -17
- data/lib/rubocop/cop/rails/active_record_callbacks_order.rb +17 -12
- data/lib/rubocop/cop/rails/active_record_override.rb +1 -1
- data/lib/rubocop/cop/rails/active_support_aliases.rb +12 -21
- data/lib/rubocop/cop/rails/after_commit_override.rb +1 -1
- data/lib/rubocop/cop/rails/application_controller.rb +3 -7
- data/lib/rubocop/cop/rails/application_job.rb +2 -1
- data/lib/rubocop/cop/rails/application_mailer.rb +2 -7
- data/lib/rubocop/cop/rails/application_record.rb +2 -7
- data/lib/rubocop/cop/rails/arel_star.rb +41 -0
- data/lib/rubocop/cop/rails/assert_not.rb +8 -10
- data/lib/rubocop/cop/rails/attribute_default_block_value.rb +90 -0
- data/lib/rubocop/cop/rails/belongs_to.rb +9 -18
- data/lib/rubocop/cop/rails/blank.rb +27 -27
- data/lib/rubocop/cop/rails/bulk_change_table.rb +1 -1
- data/lib/rubocop/cop/rails/content_tag.rb +16 -16
- data/lib/rubocop/cop/rails/create_table_with_timestamps.rb +2 -1
- data/lib/rubocop/cop/rails/date.rb +10 -11
- data/lib/rubocop/cop/rails/default_scope.rb +11 -4
- data/lib/rubocop/cop/rails/delegate.rb +9 -9
- data/lib/rubocop/cop/rails/delegate_allow_blank.rb +7 -8
- data/lib/rubocop/cop/rails/dynamic_find_by.rb +12 -11
- data/lib/rubocop/cop/rails/enum_hash.rb +11 -10
- data/lib/rubocop/cop/rails/enum_uniqueness.rb +2 -1
- data/lib/rubocop/cop/rails/environment_comparison.rb +18 -14
- data/lib/rubocop/cop/rails/exit.rb +4 -10
- data/lib/rubocop/cop/rails/file_path.rb +4 -3
- data/lib/rubocop/cop/rails/find_by.rb +13 -13
- data/lib/rubocop/cop/rails/find_by_id.rb +12 -21
- data/lib/rubocop/cop/rails/find_each.rb +16 -14
- data/lib/rubocop/cop/rails/has_and_belongs_to_many.rb +3 -2
- data/lib/rubocop/cop/rails/has_many_or_has_one_dependent.rb +3 -2
- data/lib/rubocop/cop/rails/helper_instance_variable.rb +2 -2
- data/lib/rubocop/cop/rails/http_positional_arguments.rb +19 -21
- data/lib/rubocop/cop/rails/http_status.rb +7 -9
- data/lib/rubocop/cop/rails/ignored_skip_action_filter_option.rb +8 -6
- data/lib/rubocop/cop/rails/index_by.rb +2 -1
- data/lib/rubocop/cop/rails/index_with.rb +2 -1
- data/lib/rubocop/cop/rails/inquiry.rb +4 -3
- data/lib/rubocop/cop/rails/inverse_of.rb +3 -2
- data/lib/rubocop/cop/rails/lexically_scoped_action_filter.rb +17 -15
- data/lib/rubocop/cop/rails/link_to_blank.rb +20 -22
- data/lib/rubocop/cop/rails/mailer_name.rb +19 -13
- data/lib/rubocop/cop/rails/match_route.rb +14 -13
- data/lib/rubocop/cop/rails/negate_include.rb +10 -8
- data/lib/rubocop/cop/rails/not_null_column.rb +2 -1
- data/lib/rubocop/cop/rails/order_by_id.rb +1 -2
- data/lib/rubocop/cop/rails/output.rb +5 -2
- data/lib/rubocop/cop/rails/output_safety.rb +3 -2
- data/lib/rubocop/cop/rails/pick.rb +14 -12
- data/lib/rubocop/cop/rails/pluck.rb +6 -9
- data/lib/rubocop/cop/rails/pluck_id.rb +4 -6
- data/lib/rubocop/cop/rails/pluck_in_where.rb +7 -7
- data/lib/rubocop/cop/rails/pluralization_grammar.rb +10 -14
- data/lib/rubocop/cop/rails/presence.rb +12 -13
- data/lib/rubocop/cop/rails/present.rb +30 -24
- data/lib/rubocop/cop/rails/rake_environment.rb +8 -10
- data/lib/rubocop/cop/rails/read_write_attribute.rb +12 -11
- data/lib/rubocop/cop/rails/redundant_allow_nil.rb +29 -31
- data/lib/rubocop/cop/rails/redundant_foreign_key.rb +9 -12
- data/lib/rubocop/cop/rails/redundant_receiver_in_with_options.rb +11 -10
- data/lib/rubocop/cop/rails/reflection_class_name.rb +3 -2
- data/lib/rubocop/cop/rails/refute_methods.rb +9 -10
- data/lib/rubocop/cop/rails/relative_date_constant.rb +16 -8
- data/lib/rubocop/cop/rails/render_inline.rb +2 -1
- data/lib/rubocop/cop/rails/render_plain_text.rb +9 -14
- data/lib/rubocop/cop/rails/request_referer.rb +7 -7
- data/lib/rubocop/cop/rails/reversible_migration.rb +2 -6
- data/lib/rubocop/cop/rails/safe_navigation.rb +11 -10
- data/lib/rubocop/cop/rails/safe_navigation_with_blank.rb +5 -10
- data/lib/rubocop/cop/rails/save_bang.rb +17 -20
- data/lib/rubocop/cop/rails/scope_args.rb +2 -1
- data/lib/rubocop/cop/rails/short_i18n.rb +7 -9
- data/lib/rubocop/cop/rails/skips_model_validations.rb +4 -4
- data/lib/rubocop/cop/rails/squished_sql_heredocs.rb +5 -6
- data/lib/rubocop/cop/rails/time_zone.rb +22 -20
- data/lib/rubocop/cop/rails/uniq_before_pluck.rb +4 -6
- data/lib/rubocop/cop/rails/unique_validation_without_index.rb +2 -2
- data/lib/rubocop/cop/rails/unknown_env.rb +2 -2
- data/lib/rubocop/cop/rails/validation.rb +15 -14
- data/lib/rubocop/cop/rails/where_equals.rb +94 -0
- data/lib/rubocop/cop/rails/where_exists.rb +8 -13
- data/lib/rubocop/cop/rails/where_not.rb +5 -16
- data/lib/rubocop/cop/rails_cops.rb +4 -0
- data/lib/rubocop/rails/schema_loader.rb +4 -4
- data/lib/rubocop/rails/schema_loader/schema.rb +1 -1
- data/lib/rubocop/rails/version.rb +5 -1
- metadata +19 -9
@@ -45,11 +45,13 @@ module RuboCop
|
|
45
45
|
# # good
|
46
46
|
# Model.distinct.pluck(:id)
|
47
47
|
#
|
48
|
-
class UniqBeforePluck <
|
48
|
+
class UniqBeforePluck < Base
|
49
49
|
include ConfigurableEnforcedStyle
|
50
50
|
include RangeHelp
|
51
|
+
extend AutoCorrector
|
51
52
|
|
52
53
|
MSG = 'Use `distinct` before `pluck`.'
|
54
|
+
RESTRICT_ON_SEND = %i[uniq distinct pluck].freeze
|
53
55
|
NEWLINE = "\n"
|
54
56
|
PATTERN = '[!^block (send (send %<type>s :pluck ...) ' \
|
55
57
|
'${:uniq :distinct} ...)]'
|
@@ -69,11 +71,7 @@ module RuboCop
|
|
69
71
|
|
70
72
|
return unless method
|
71
73
|
|
72
|
-
add_offense(node
|
73
|
-
end
|
74
|
-
|
75
|
-
def autocorrect(node)
|
76
|
-
lambda do |corrector|
|
74
|
+
add_offense(node.loc.selector) do |corrector|
|
77
75
|
method = node.method_name
|
78
76
|
|
79
77
|
corrector.remove(dot_method_with_whitespace(method, node))
|
@@ -24,13 +24,13 @@ module RuboCop
|
|
24
24
|
# # good - even if the schema does not have a unique index
|
25
25
|
# validates :account, length: { minimum: MIN_LENGTH }
|
26
26
|
#
|
27
|
-
class UniqueValidationWithoutIndex <
|
27
|
+
class UniqueValidationWithoutIndex < Base
|
28
28
|
include ActiveRecordHelper
|
29
29
|
|
30
30
|
MSG = 'Uniqueness validation should be with a unique index.'
|
31
|
+
RESTRICT_ON_SEND = %i[validates].freeze
|
31
32
|
|
32
33
|
def on_send(node)
|
33
|
-
return unless node.method?(:validates)
|
34
34
|
return unless uniqueness_part(node)
|
35
35
|
return if condition_part?(node)
|
36
36
|
return unless schema
|
@@ -17,7 +17,7 @@ module RuboCop
|
|
17
17
|
# # good
|
18
18
|
# Rails.env.production?
|
19
19
|
# Rails.env == 'production'
|
20
|
-
class UnknownEnv <
|
20
|
+
class UnknownEnv < Base
|
21
21
|
MSG = 'Unknown environment `%<name>s`.'
|
22
22
|
MSG_SIMILAR = 'Unknown environment `%<name>s`. ' \
|
23
23
|
'Did you mean `%<similar>s`?'
|
@@ -41,7 +41,7 @@ module RuboCop
|
|
41
41
|
|
42
42
|
def on_send(node)
|
43
43
|
unknown_environment_predicate?(node) do |name|
|
44
|
-
add_offense(node
|
44
|
+
add_offense(node.loc.selector, message: message(name))
|
45
45
|
end
|
46
46
|
|
47
47
|
unknown_environment_equal?(node) do |str_node|
|
@@ -32,7 +32,9 @@ module RuboCop
|
|
32
32
|
# validates :foo, size: true
|
33
33
|
# validates :foo, uniqueness: true
|
34
34
|
#
|
35
|
-
class Validation <
|
35
|
+
class Validation < Base
|
36
|
+
extend AutoCorrector
|
37
|
+
|
36
38
|
MSG = 'Prefer the new style validations `%<prefer>s` over ' \
|
37
39
|
'`%<current>s`.'
|
38
40
|
|
@@ -50,22 +52,20 @@ module RuboCop
|
|
50
52
|
uniqueness
|
51
53
|
].freeze
|
52
54
|
|
53
|
-
|
55
|
+
RESTRICT_ON_SEND = TYPES.map { |p| "validates_#{p}_of".to_sym }.freeze
|
54
56
|
ALLOWLIST = TYPES.map { |p| "validates :column, #{p}: value" }.freeze
|
55
57
|
|
56
58
|
def on_send(node)
|
57
|
-
return
|
59
|
+
return if node.receiver
|
58
60
|
|
59
|
-
|
60
|
-
end
|
61
|
+
range = node.loc.selector
|
61
62
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
63
|
+
add_offense(range, message: message(node)) do |corrector|
|
64
|
+
last_argument = node.arguments.last
|
65
|
+
return if !last_argument.literal? && !last_argument.splat_type? &&
|
66
|
+
!frozen_array_argument?(last_argument)
|
66
67
|
|
67
|
-
|
68
|
-
corrector.replace(node.loc.selector, 'validates')
|
68
|
+
corrector.replace(range, 'validates')
|
69
69
|
correct_validate_type(corrector, node)
|
70
70
|
end
|
71
71
|
end
|
@@ -73,12 +73,13 @@ module RuboCop
|
|
73
73
|
private
|
74
74
|
|
75
75
|
def message(node)
|
76
|
-
|
77
|
-
|
76
|
+
method_name = node.method_name
|
77
|
+
|
78
|
+
format(MSG, prefer: preferred_method(method_name), current: method_name)
|
78
79
|
end
|
79
80
|
|
80
81
|
def preferred_method(method)
|
81
|
-
ALLOWLIST[
|
82
|
+
ALLOWLIST[RESTRICT_ON_SEND.index(method.to_sym)]
|
82
83
|
end
|
83
84
|
|
84
85
|
def correct_validate_type(corrector, node)
|
@@ -0,0 +1,94 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module RuboCop
|
4
|
+
module Cop
|
5
|
+
module Rails
|
6
|
+
# This cop identifies places where manually constructed SQL
|
7
|
+
# in `where` can be replaced with `where(attribute: value)`.
|
8
|
+
#
|
9
|
+
# @example
|
10
|
+
# # bad
|
11
|
+
# User.where('name = ?', 'Gabe')
|
12
|
+
# User.where('name = :name', name: 'Gabe')
|
13
|
+
# User.where('name IS NULL')
|
14
|
+
# User.where('name IN (?)', ['john', 'jane'])
|
15
|
+
# User.where('name IN (:names)', names: ['john', 'jane'])
|
16
|
+
#
|
17
|
+
# # good
|
18
|
+
# User.where(name: 'Gabe')
|
19
|
+
# User.where(name: nil)
|
20
|
+
# User.where(name: ['john', 'jane'])
|
21
|
+
class WhereEquals < Base
|
22
|
+
include RangeHelp
|
23
|
+
extend AutoCorrector
|
24
|
+
|
25
|
+
MSG = 'Use `%<good_method>s` instead of manually constructing SQL.'
|
26
|
+
RESTRICT_ON_SEND = %i[where].freeze
|
27
|
+
|
28
|
+
def_node_matcher :where_method_call?, <<~PATTERN
|
29
|
+
{
|
30
|
+
(send _ :where (array $str_type? $_ ?))
|
31
|
+
(send _ :where $str_type? $_ ?)
|
32
|
+
}
|
33
|
+
PATTERN
|
34
|
+
|
35
|
+
def on_send(node)
|
36
|
+
where_method_call?(node) do |template_node, value_node|
|
37
|
+
value_node = value_node.first
|
38
|
+
|
39
|
+
range = offense_range(node)
|
40
|
+
|
41
|
+
column_and_value = extract_column_and_value(template_node, value_node)
|
42
|
+
return unless column_and_value
|
43
|
+
|
44
|
+
good_method = build_good_method(*column_and_value)
|
45
|
+
message = format(MSG, good_method: good_method)
|
46
|
+
|
47
|
+
add_offense(range, message: message) do |corrector|
|
48
|
+
corrector.replace(range, good_method)
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
EQ_ANONYMOUS_RE = /\A([\w.]+)\s+=\s+\?\z/.freeze # column = ?
|
54
|
+
IN_ANONYMOUS_RE = /\A([\w.]+)\s+IN\s+\(\?\)\z/i.freeze # column IN (?)
|
55
|
+
EQ_NAMED_RE = /\A([\w.]+)\s+=\s+:(\w+)\z/.freeze # column = :column
|
56
|
+
IN_NAMED_RE = /\A([\w.]+)\s+IN\s+\(:(\w+)\)\z/i.freeze # column IN (:column)
|
57
|
+
IS_NULL_RE = /\A([\w.]+)\s+IS\s+NULL\z/i.freeze # column IS NULL
|
58
|
+
|
59
|
+
private
|
60
|
+
|
61
|
+
def offense_range(node)
|
62
|
+
range_between(node.loc.selector.begin_pos, node.loc.expression.end_pos)
|
63
|
+
end
|
64
|
+
|
65
|
+
def extract_column_and_value(template_node, value_node)
|
66
|
+
value =
|
67
|
+
case template_node.value
|
68
|
+
when EQ_ANONYMOUS_RE, IN_ANONYMOUS_RE
|
69
|
+
value_node.source
|
70
|
+
when EQ_NAMED_RE, IN_NAMED_RE
|
71
|
+
return unless value_node.hash_type?
|
72
|
+
|
73
|
+
pair = value_node.pairs.find { |p| p.key.value.to_sym == Regexp.last_match(2).to_sym }
|
74
|
+
pair.value.source
|
75
|
+
when IS_NULL_RE
|
76
|
+
'nil'
|
77
|
+
else
|
78
|
+
return
|
79
|
+
end
|
80
|
+
|
81
|
+
[Regexp.last_match(1), value]
|
82
|
+
end
|
83
|
+
|
84
|
+
def build_good_method(column, value)
|
85
|
+
if column.include?('.')
|
86
|
+
"where('#{column}' => #{value})"
|
87
|
+
else
|
88
|
+
"where(#{column}: #{value})"
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
@@ -36,10 +36,12 @@ module RuboCop
|
|
36
36
|
# User.where('name = ?', 'john').exists?
|
37
37
|
# user.posts.where(published: true).exists?
|
38
38
|
# User.where('length(name) > 10').exists?
|
39
|
-
class WhereExists <
|
39
|
+
class WhereExists < Base
|
40
40
|
include ConfigurableEnforcedStyle
|
41
|
+
extend AutoCorrector
|
41
42
|
|
42
43
|
MSG = 'Prefer `%<good_method>s` over `%<bad_method>s`.'
|
44
|
+
RESTRICT_ON_SEND = %i[exists?].freeze
|
43
45
|
|
44
46
|
def_node_matcher :where_exists_call?, <<~PATTERN
|
45
47
|
(send (send _ :where $...) :exists?)
|
@@ -54,19 +56,12 @@ module RuboCop
|
|
54
56
|
return unless convertable_args?(args)
|
55
57
|
|
56
58
|
range = correction_range(node)
|
57
|
-
|
58
|
-
|
59
|
-
end
|
60
|
-
end
|
61
|
-
|
62
|
-
def autocorrect(node)
|
63
|
-
args = find_offenses(node)
|
59
|
+
good_method = build_good_method(args)
|
60
|
+
message = format(MSG, good_method: good_method, bad_method: range.source)
|
64
61
|
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
build_good_method(args)
|
69
|
-
)
|
62
|
+
add_offense(range, message: message) do |corrector|
|
63
|
+
corrector.replace(range, good_method)
|
64
|
+
end
|
70
65
|
end
|
71
66
|
end
|
72
67
|
|
@@ -21,10 +21,12 @@ module RuboCop
|
|
21
21
|
# User.where.not(name: nil)
|
22
22
|
# User.where.not(name: ['john', 'jane'])
|
23
23
|
#
|
24
|
-
class WhereNot <
|
24
|
+
class WhereNot < Base
|
25
25
|
include RangeHelp
|
26
|
+
extend AutoCorrector
|
26
27
|
|
27
28
|
MSG = 'Use `%<good_method>s` instead of manually constructing negated SQL in `where`.'
|
29
|
+
RESTRICT_ON_SEND = %i[where].freeze
|
28
30
|
|
29
31
|
def_node_matcher :where_method_call?, <<~PATTERN
|
30
32
|
{
|
@@ -45,21 +47,8 @@ module RuboCop
|
|
45
47
|
good_method = build_good_method(*column_and_value)
|
46
48
|
message = format(MSG, good_method: good_method)
|
47
49
|
|
48
|
-
add_offense(
|
49
|
-
|
50
|
-
end
|
51
|
-
|
52
|
-
def autocorrect(node)
|
53
|
-
where_method_call?(node) do |template_node, value_node|
|
54
|
-
value_node = value_node.first
|
55
|
-
|
56
|
-
lambda do |corrector|
|
57
|
-
range = offense_range(node)
|
58
|
-
|
59
|
-
column, value = *extract_column_and_value(template_node, value_node)
|
60
|
-
replacement = build_good_method(column, value)
|
61
|
-
|
62
|
-
corrector.replace(range, replacement)
|
50
|
+
add_offense(range, message: message) do |corrector|
|
51
|
+
corrector.replace(range, good_method)
|
63
52
|
end
|
64
53
|
end
|
65
54
|
end
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require_relative 'mixin/active_record_helper'
|
4
|
+
require_relative 'mixin/enforce_superclass'
|
4
5
|
require_relative 'mixin/index_method'
|
5
6
|
require_relative 'mixin/target_rails_version'
|
6
7
|
|
@@ -14,7 +15,9 @@ require_relative 'rails/application_controller'
|
|
14
15
|
require_relative 'rails/application_job'
|
15
16
|
require_relative 'rails/application_mailer'
|
16
17
|
require_relative 'rails/application_record'
|
18
|
+
require_relative 'rails/arel_star'
|
17
19
|
require_relative 'rails/assert_not'
|
20
|
+
require_relative 'rails/attribute_default_block_value'
|
18
21
|
require_relative 'rails/belongs_to'
|
19
22
|
require_relative 'rails/blank'
|
20
23
|
require_relative 'rails/bulk_change_table'
|
@@ -83,5 +86,6 @@ require_relative 'rails/uniq_before_pluck'
|
|
83
86
|
require_relative 'rails/unique_validation_without_index'
|
84
87
|
require_relative 'rails/unknown_env'
|
85
88
|
require_relative 'rails/validation'
|
89
|
+
require_relative 'rails/where_equals'
|
86
90
|
require_relative 'rails/where_exists'
|
87
91
|
require_relative 'rails/where_not'
|
@@ -13,15 +13,15 @@ module RuboCop
|
|
13
13
|
#
|
14
14
|
# @return [Schema, nil]
|
15
15
|
def load(target_ruby_version)
|
16
|
-
return @
|
16
|
+
return @load if defined?(@load)
|
17
17
|
|
18
|
-
@
|
18
|
+
@load = load!(target_ruby_version)
|
19
19
|
end
|
20
20
|
|
21
21
|
def reset!
|
22
|
-
return unless instance_variable_defined?(:@
|
22
|
+
return unless instance_variable_defined?(:@load)
|
23
23
|
|
24
|
-
remove_instance_variable(:@
|
24
|
+
remove_instance_variable(:@load)
|
25
25
|
end
|
26
26
|
|
27
27
|
def db_schema_path
|
metadata
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bozhidar Batsov
|
8
8
|
- Jonas Arvidsson
|
9
9
|
- Yuji Nakayama
|
10
|
-
autorequire:
|
10
|
+
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2020-
|
13
|
+
date: 2020-12-08 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|
@@ -46,14 +46,20 @@ dependencies:
|
|
46
46
|
requirements:
|
47
47
|
- - ">="
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version: 0.
|
49
|
+
version: 0.90.0
|
50
|
+
- - "<"
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: '2.0'
|
50
53
|
type: :runtime
|
51
54
|
prerelease: false
|
52
55
|
version_requirements: !ruby/object:Gem::Requirement
|
53
56
|
requirements:
|
54
57
|
- - ">="
|
55
58
|
- !ruby/object:Gem::Version
|
56
|
-
version: 0.
|
59
|
+
version: 0.90.0
|
60
|
+
- - "<"
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '2.0'
|
57
63
|
description: |
|
58
64
|
Automatic Rails code style checking tool.
|
59
65
|
A RuboCop extension focused on enforcing Rails best practices and coding conventions.
|
@@ -70,6 +76,7 @@ files:
|
|
70
76
|
- config/default.yml
|
71
77
|
- lib/rubocop-rails.rb
|
72
78
|
- lib/rubocop/cop/mixin/active_record_helper.rb
|
79
|
+
- lib/rubocop/cop/mixin/enforce_superclass.rb
|
73
80
|
- lib/rubocop/cop/mixin/index_method.rb
|
74
81
|
- lib/rubocop/cop/mixin/target_rails_version.rb
|
75
82
|
- lib/rubocop/cop/rails/action_filter.rb
|
@@ -82,7 +89,9 @@ files:
|
|
82
89
|
- lib/rubocop/cop/rails/application_job.rb
|
83
90
|
- lib/rubocop/cop/rails/application_mailer.rb
|
84
91
|
- lib/rubocop/cop/rails/application_record.rb
|
92
|
+
- lib/rubocop/cop/rails/arel_star.rb
|
85
93
|
- lib/rubocop/cop/rails/assert_not.rb
|
94
|
+
- lib/rubocop/cop/rails/attribute_default_block_value.rb
|
86
95
|
- lib/rubocop/cop/rails/belongs_to.rb
|
87
96
|
- lib/rubocop/cop/rails/blank.rb
|
88
97
|
- lib/rubocop/cop/rails/bulk_change_table.rb
|
@@ -151,6 +160,7 @@ files:
|
|
151
160
|
- lib/rubocop/cop/rails/unique_validation_without_index.rb
|
152
161
|
- lib/rubocop/cop/rails/unknown_env.rb
|
153
162
|
- lib/rubocop/cop/rails/validation.rb
|
163
|
+
- lib/rubocop/cop/rails/where_equals.rb
|
154
164
|
- lib/rubocop/cop/rails/where_exists.rb
|
155
165
|
- lib/rubocop/cop/rails/where_not.rb
|
156
166
|
- lib/rubocop/cop/rails_cops.rb
|
@@ -166,9 +176,9 @@ metadata:
|
|
166
176
|
homepage_uri: https://docs.rubocop.org/rubocop-rails/
|
167
177
|
changelog_uri: https://github.com/rubocop-hq/rubocop-rails/blob/master/CHANGELOG.md
|
168
178
|
source_code_uri: https://github.com/rubocop-hq/rubocop-rails/
|
169
|
-
documentation_uri: https://docs.rubocop.org/rubocop-rails/
|
179
|
+
documentation_uri: https://docs.rubocop.org/rubocop-rails/2.9/
|
170
180
|
bug_tracker_uri: https://github.com/rubocop-hq/rubocop-rails/issues
|
171
|
-
post_install_message:
|
181
|
+
post_install_message:
|
172
182
|
rdoc_options: []
|
173
183
|
require_paths:
|
174
184
|
- lib
|
@@ -183,8 +193,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
183
193
|
- !ruby/object:Gem::Version
|
184
194
|
version: '0'
|
185
195
|
requirements: []
|
186
|
-
rubygems_version: 3.
|
187
|
-
signing_key:
|
196
|
+
rubygems_version: 3.2.0.rc.2
|
197
|
+
signing_key:
|
188
198
|
specification_version: 4
|
189
199
|
summary: Automatic Rails code style checking tool.
|
190
200
|
test_files: []
|