rubocop-rails 2.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +20 -0
- data/README.md +92 -0
- data/bin/setup +7 -0
- data/config/default.yml +510 -0
- data/lib/rubocop-rails.rb +12 -0
- data/lib/rubocop/cop/mixin/target_rails_version.rb +16 -0
- data/lib/rubocop/cop/rails/action_filter.rb +111 -0
- data/lib/rubocop/cop/rails/active_record_aliases.rb +48 -0
- data/lib/rubocop/cop/rails/active_record_override.rb +82 -0
- data/lib/rubocop/cop/rails/active_support_aliases.rb +69 -0
- data/lib/rubocop/cop/rails/application_controller.rb +36 -0
- data/lib/rubocop/cop/rails/application_job.rb +40 -0
- data/lib/rubocop/cop/rails/application_mailer.rb +40 -0
- data/lib/rubocop/cop/rails/application_record.rb +40 -0
- data/lib/rubocop/cop/rails/assert_not.rb +44 -0
- data/lib/rubocop/cop/rails/belongs_to.rb +102 -0
- data/lib/rubocop/cop/rails/blank.rb +164 -0
- data/lib/rubocop/cop/rails/bulk_change_table.rb +293 -0
- data/lib/rubocop/cop/rails/create_table_with_timestamps.rb +91 -0
- data/lib/rubocop/cop/rails/date.rb +161 -0
- data/lib/rubocop/cop/rails/delegate.rb +132 -0
- data/lib/rubocop/cop/rails/delegate_allow_blank.rb +37 -0
- data/lib/rubocop/cop/rails/dynamic_find_by.rb +91 -0
- data/lib/rubocop/cop/rails/enum_hash.rb +75 -0
- data/lib/rubocop/cop/rails/enum_uniqueness.rb +65 -0
- data/lib/rubocop/cop/rails/environment_comparison.rb +68 -0
- data/lib/rubocop/cop/rails/exit.rb +67 -0
- data/lib/rubocop/cop/rails/file_path.rb +108 -0
- data/lib/rubocop/cop/rails/find_by.rb +55 -0
- data/lib/rubocop/cop/rails/find_each.rb +51 -0
- data/lib/rubocop/cop/rails/has_and_belongs_to_many.rb +25 -0
- data/lib/rubocop/cop/rails/has_many_or_has_one_dependent.rb +106 -0
- data/lib/rubocop/cop/rails/helper_instance_variable.rb +39 -0
- data/lib/rubocop/cop/rails/http_positional_arguments.rb +117 -0
- data/lib/rubocop/cop/rails/http_status.rb +160 -0
- data/lib/rubocop/cop/rails/ignored_skip_action_filter_option.rb +94 -0
- data/lib/rubocop/cop/rails/inverse_of.rb +246 -0
- data/lib/rubocop/cop/rails/lexically_scoped_action_filter.rb +175 -0
- data/lib/rubocop/cop/rails/link_to_blank.rb +98 -0
- data/lib/rubocop/cop/rails/not_null_column.rb +67 -0
- data/lib/rubocop/cop/rails/output.rb +49 -0
- data/lib/rubocop/cop/rails/output_safety.rb +99 -0
- data/lib/rubocop/cop/rails/pluralization_grammar.rb +107 -0
- data/lib/rubocop/cop/rails/presence.rb +148 -0
- data/lib/rubocop/cop/rails/present.rb +153 -0
- data/lib/rubocop/cop/rails/rake_environment.rb +91 -0
- data/lib/rubocop/cop/rails/read_write_attribute.rb +74 -0
- data/lib/rubocop/cop/rails/redundant_allow_nil.rb +111 -0
- data/lib/rubocop/cop/rails/redundant_receiver_in_with_options.rb +136 -0
- data/lib/rubocop/cop/rails/reflection_class_name.rb +37 -0
- data/lib/rubocop/cop/rails/refute_methods.rb +76 -0
- data/lib/rubocop/cop/rails/relative_date_constant.rb +102 -0
- data/lib/rubocop/cop/rails/request_referer.rb +56 -0
- data/lib/rubocop/cop/rails/reversible_migration.rb +284 -0
- data/lib/rubocop/cop/rails/safe_navigation.rb +85 -0
- data/lib/rubocop/cop/rails/safe_navigation_with_blank.rb +48 -0
- data/lib/rubocop/cop/rails/save_bang.rb +331 -0
- data/lib/rubocop/cop/rails/scope_args.rb +29 -0
- data/lib/rubocop/cop/rails/skips_model_validations.rb +87 -0
- data/lib/rubocop/cop/rails/time_zone.rb +249 -0
- data/lib/rubocop/cop/rails/uniq_before_pluck.rb +105 -0
- data/lib/rubocop/cop/rails/unknown_env.rb +84 -0
- data/lib/rubocop/cop/rails/validation.rb +147 -0
- data/lib/rubocop/cop/rails_cops.rb +61 -0
- data/lib/rubocop/rails.rb +12 -0
- data/lib/rubocop/rails/inject.rb +18 -0
- data/lib/rubocop/rails/version.rb +10 -0
- metadata +148 -0
@@ -0,0 +1,84 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module RuboCop
|
4
|
+
module Cop
|
5
|
+
module Rails
|
6
|
+
# This cop checks that environments called with `Rails.env` predicates
|
7
|
+
# exist.
|
8
|
+
#
|
9
|
+
# @example
|
10
|
+
# # bad
|
11
|
+
# Rails.env.proudction?
|
12
|
+
# Rails.env == 'proudction'
|
13
|
+
#
|
14
|
+
# # good
|
15
|
+
# Rails.env.production?
|
16
|
+
# Rails.env == 'production'
|
17
|
+
class UnknownEnv < Cop
|
18
|
+
include NameSimilarity
|
19
|
+
|
20
|
+
MSG = 'Unknown environment `%<name>s`.'
|
21
|
+
MSG_SIMILAR = 'Unknown environment `%<name>s`. ' \
|
22
|
+
'Did you mean `%<similar>s`?'
|
23
|
+
|
24
|
+
def_node_matcher :rails_env?, <<~PATTERN
|
25
|
+
(send
|
26
|
+
{(const nil? :Rails) (const (cbase) :Rails)}
|
27
|
+
:env)
|
28
|
+
PATTERN
|
29
|
+
|
30
|
+
def_node_matcher :unknown_environment_predicate?, <<~PATTERN
|
31
|
+
(send #rails_env? $#unknown_env_predicate?)
|
32
|
+
PATTERN
|
33
|
+
|
34
|
+
def_node_matcher :unknown_environment_equal?, <<~PATTERN
|
35
|
+
{
|
36
|
+
(send #rails_env? {:== :===} $(str #unknown_env_name?))
|
37
|
+
(send $(str #unknown_env_name?) {:== :===} #rails_env?)
|
38
|
+
}
|
39
|
+
PATTERN
|
40
|
+
|
41
|
+
def on_send(node)
|
42
|
+
unknown_environment_predicate?(node) do |name|
|
43
|
+
add_offense(node, location: :selector, message: message(name))
|
44
|
+
end
|
45
|
+
|
46
|
+
unknown_environment_equal?(node) do |str_node|
|
47
|
+
name = str_node.value
|
48
|
+
add_offense(str_node, message: message(name))
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
private
|
53
|
+
|
54
|
+
def collect_variable_like_names(_scope)
|
55
|
+
environments
|
56
|
+
end
|
57
|
+
|
58
|
+
def message(name)
|
59
|
+
name = name.to_s.chomp('?')
|
60
|
+
similar = find_similar_name(name, [])
|
61
|
+
if similar
|
62
|
+
format(MSG_SIMILAR, name: name, similar: similar)
|
63
|
+
else
|
64
|
+
format(MSG, name: name)
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
def unknown_env_predicate?(name)
|
69
|
+
name = name.to_s
|
70
|
+
name.end_with?('?') &&
|
71
|
+
!environments.include?(name[0..-2])
|
72
|
+
end
|
73
|
+
|
74
|
+
def unknown_env_name?(name)
|
75
|
+
!environments.include?(name)
|
76
|
+
end
|
77
|
+
|
78
|
+
def environments
|
79
|
+
cop_config['Environments']
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
@@ -0,0 +1,147 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module RuboCop
|
4
|
+
module Cop
|
5
|
+
module Rails
|
6
|
+
# This cop checks for the use of old-style attribute validation macros.
|
7
|
+
#
|
8
|
+
# @example
|
9
|
+
# # bad
|
10
|
+
# validates_acceptance_of :foo
|
11
|
+
# validates_confirmation_of :foo
|
12
|
+
# validates_exclusion_of :foo
|
13
|
+
# validates_format_of :foo
|
14
|
+
# validates_inclusion_of :foo
|
15
|
+
# validates_length_of :foo
|
16
|
+
# validates_numericality_of :foo
|
17
|
+
# validates_presence_of :foo
|
18
|
+
# validates_absence_of :foo
|
19
|
+
# validates_size_of :foo
|
20
|
+
# validates_uniqueness_of :foo
|
21
|
+
#
|
22
|
+
# # good
|
23
|
+
# validates :foo, acceptance: true
|
24
|
+
# validates :foo, confirmation: true
|
25
|
+
# validates :foo, exclusion: true
|
26
|
+
# validates :foo, format: true
|
27
|
+
# validates :foo, inclusion: true
|
28
|
+
# validates :foo, length: true
|
29
|
+
# validates :foo, numericality: true
|
30
|
+
# validates :foo, presence: true
|
31
|
+
# validates :foo, absence: true
|
32
|
+
# validates :foo, size: true
|
33
|
+
# validates :foo, uniqueness: true
|
34
|
+
#
|
35
|
+
class Validation < Cop
|
36
|
+
MSG = 'Prefer the new style validations `%<prefer>s` over ' \
|
37
|
+
'`%<current>s`.'
|
38
|
+
|
39
|
+
TYPES = %w[
|
40
|
+
acceptance
|
41
|
+
confirmation
|
42
|
+
exclusion
|
43
|
+
format
|
44
|
+
inclusion
|
45
|
+
length
|
46
|
+
numericality
|
47
|
+
presence
|
48
|
+
absence
|
49
|
+
size
|
50
|
+
uniqueness
|
51
|
+
].freeze
|
52
|
+
|
53
|
+
DENYLIST = TYPES.map { |p| "validates_#{p}_of".to_sym }.freeze
|
54
|
+
ALLOWLIST = TYPES.map { |p| "validates :column, #{p}: value" }.freeze
|
55
|
+
|
56
|
+
def on_send(node)
|
57
|
+
return unless !node.receiver && DENYLIST.include?(node.method_name)
|
58
|
+
|
59
|
+
add_offense(node, location: :selector)
|
60
|
+
end
|
61
|
+
|
62
|
+
def autocorrect(node)
|
63
|
+
last_argument = node.arguments.last
|
64
|
+
return if !last_argument.literal? && !last_argument.splat_type? &&
|
65
|
+
!frozen_array_argument?(last_argument)
|
66
|
+
|
67
|
+
lambda do |corrector|
|
68
|
+
corrector.replace(node.loc.selector, 'validates')
|
69
|
+
correct_validate_type(corrector, node)
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
private
|
74
|
+
|
75
|
+
def message(node)
|
76
|
+
format(MSG, prefer: preferred_method(node.method_name),
|
77
|
+
current: node.method_name)
|
78
|
+
end
|
79
|
+
|
80
|
+
def preferred_method(method)
|
81
|
+
ALLOWLIST[DENYLIST.index(method.to_sym)]
|
82
|
+
end
|
83
|
+
|
84
|
+
def correct_validate_type(corrector, node)
|
85
|
+
last_argument = node.last_argument
|
86
|
+
|
87
|
+
if last_argument.hash_type?
|
88
|
+
correct_validate_type_for_hash(corrector, node, last_argument)
|
89
|
+
elsif last_argument.array_type?
|
90
|
+
loc = last_argument.loc
|
91
|
+
|
92
|
+
correct_validate_type_for_array(corrector, node, last_argument, loc)
|
93
|
+
elsif frozen_array_argument?(last_argument)
|
94
|
+
arguments = node.last_argument.receiver
|
95
|
+
loc = arguments.parent.loc
|
96
|
+
|
97
|
+
correct_validate_type_for_array(corrector, node, arguments, loc)
|
98
|
+
else
|
99
|
+
range = last_argument.source_range
|
100
|
+
|
101
|
+
corrector.insert_after(range, ", #{validate_type(node)}: true")
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
def correct_validate_type_for_hash(corrector, node, arguments)
|
106
|
+
corrector.replace(
|
107
|
+
arguments.loc.expression,
|
108
|
+
"#{validate_type(node)}: #{braced_options(arguments)}"
|
109
|
+
)
|
110
|
+
end
|
111
|
+
|
112
|
+
def correct_validate_type_for_array(corrector, node, arguments, loc)
|
113
|
+
attributes = []
|
114
|
+
|
115
|
+
arguments.each_child_node do |child_node|
|
116
|
+
attributes << if arguments.percent_literal?
|
117
|
+
":#{child_node.source}"
|
118
|
+
else
|
119
|
+
child_node.source
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
123
|
+
corrector.replace(
|
124
|
+
loc.expression,
|
125
|
+
"#{attributes.join(', ')}, #{validate_type(node)}: true"
|
126
|
+
)
|
127
|
+
end
|
128
|
+
|
129
|
+
def validate_type(node)
|
130
|
+
node.method_name.to_s.split('_')[1]
|
131
|
+
end
|
132
|
+
|
133
|
+
def frozen_array_argument?(argument)
|
134
|
+
argument.send_type? && argument.method?(:freeze)
|
135
|
+
end
|
136
|
+
|
137
|
+
def braced_options(options)
|
138
|
+
if options.braces?
|
139
|
+
options.source
|
140
|
+
else
|
141
|
+
"{ #{options.source} }"
|
142
|
+
end
|
143
|
+
end
|
144
|
+
end
|
145
|
+
end
|
146
|
+
end
|
147
|
+
end
|
@@ -0,0 +1,61 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative 'mixin/target_rails_version'
|
4
|
+
|
5
|
+
require_relative 'rails/action_filter'
|
6
|
+
require_relative 'rails/active_record_aliases'
|
7
|
+
require_relative 'rails/active_record_override'
|
8
|
+
require_relative 'rails/active_support_aliases'
|
9
|
+
require_relative 'rails/application_controller'
|
10
|
+
require_relative 'rails/application_job'
|
11
|
+
require_relative 'rails/application_mailer'
|
12
|
+
require_relative 'rails/application_record'
|
13
|
+
require_relative 'rails/assert_not'
|
14
|
+
require_relative 'rails/belongs_to'
|
15
|
+
require_relative 'rails/blank'
|
16
|
+
require_relative 'rails/bulk_change_table'
|
17
|
+
require_relative 'rails/create_table_with_timestamps'
|
18
|
+
require_relative 'rails/date'
|
19
|
+
require_relative 'rails/delegate'
|
20
|
+
require_relative 'rails/delegate_allow_blank'
|
21
|
+
require_relative 'rails/dynamic_find_by'
|
22
|
+
require_relative 'rails/enum_hash'
|
23
|
+
require_relative 'rails/enum_uniqueness'
|
24
|
+
require_relative 'rails/environment_comparison'
|
25
|
+
require_relative 'rails/exit'
|
26
|
+
require_relative 'rails/file_path'
|
27
|
+
require_relative 'rails/find_by'
|
28
|
+
require_relative 'rails/find_each'
|
29
|
+
require_relative 'rails/has_and_belongs_to_many'
|
30
|
+
require_relative 'rails/has_many_or_has_one_dependent'
|
31
|
+
require_relative 'rails/helper_instance_variable'
|
32
|
+
require_relative 'rails/http_positional_arguments'
|
33
|
+
require_relative 'rails/http_status'
|
34
|
+
require_relative 'rails/ignored_skip_action_filter_option'
|
35
|
+
require_relative 'rails/inverse_of'
|
36
|
+
require_relative 'rails/lexically_scoped_action_filter'
|
37
|
+
require_relative 'rails/link_to_blank'
|
38
|
+
require_relative 'rails/not_null_column'
|
39
|
+
require_relative 'rails/output'
|
40
|
+
require_relative 'rails/output_safety'
|
41
|
+
require_relative 'rails/pluralization_grammar'
|
42
|
+
require_relative 'rails/presence'
|
43
|
+
require_relative 'rails/present'
|
44
|
+
require_relative 'rails/rake_environment'
|
45
|
+
require_relative 'rails/read_write_attribute'
|
46
|
+
require_relative 'rails/redundant_allow_nil'
|
47
|
+
require_relative 'rails/redundant_receiver_in_with_options'
|
48
|
+
require_relative 'rails/reflection_class_name'
|
49
|
+
require_relative 'rails/refute_methods'
|
50
|
+
require_relative 'rails/relative_date_constant'
|
51
|
+
require_relative 'rails/request_referer'
|
52
|
+
require_relative 'rails/reversible_migration'
|
53
|
+
require_relative 'rails/safe_navigation'
|
54
|
+
require_relative 'rails/safe_navigation_with_blank'
|
55
|
+
require_relative 'rails/save_bang'
|
56
|
+
require_relative 'rails/scope_args'
|
57
|
+
require_relative 'rails/skips_model_validations'
|
58
|
+
require_relative 'rails/time_zone'
|
59
|
+
require_relative 'rails/uniq_before_pluck'
|
60
|
+
require_relative 'rails/unknown_env'
|
61
|
+
require_relative 'rails/validation'
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module RuboCop
|
4
|
+
# RuboCop Rails project namespace
|
5
|
+
module Rails
|
6
|
+
PROJECT_ROOT = Pathname.new(__dir__).parent.parent.expand_path.freeze
|
7
|
+
CONFIG_DEFAULT = PROJECT_ROOT.join('config', 'default.yml').freeze
|
8
|
+
CONFIG = YAML.safe_load(CONFIG_DEFAULT.read).freeze
|
9
|
+
|
10
|
+
private_constant(:CONFIG_DEFAULT, :PROJECT_ROOT)
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module RuboCop
|
4
|
+
module Rails
|
5
|
+
# Because RuboCop doesn't yet support plugins, we have to monkey patch in a
|
6
|
+
# bit of our configuration.
|
7
|
+
module Inject
|
8
|
+
def self.defaults!
|
9
|
+
path = CONFIG_DEFAULT.to_s
|
10
|
+
hash = ConfigLoader.send(:load_yaml_configuration, path)
|
11
|
+
config = Config.new(hash, path)
|
12
|
+
puts "configuration from #{path}" if ConfigLoader.debug?
|
13
|
+
config = ConfigLoader.merge_with_default(config, path, unset_nil: false)
|
14
|
+
ConfigLoader.instance_variable_set(:@default_configuration, config)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
metadata
ADDED
@@ -0,0 +1,148 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rubocop-rails
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 2.4.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Bozhidar Batsov
|
8
|
+
- Jonas Arvidsson
|
9
|
+
- Yuji Nakayama
|
10
|
+
autorequire:
|
11
|
+
bindir: bin
|
12
|
+
cert_chain: []
|
13
|
+
date: 2019-12-25 00:00:00.000000000 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: rack
|
17
|
+
requirement: !ruby/object:Gem::Requirement
|
18
|
+
requirements:
|
19
|
+
- - ">="
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '1.1'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
requirements:
|
26
|
+
- - ">="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
version: '1.1'
|
29
|
+
- !ruby/object:Gem::Dependency
|
30
|
+
name: rubocop
|
31
|
+
requirement: !ruby/object:Gem::Requirement
|
32
|
+
requirements:
|
33
|
+
- - ">="
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: 0.72.0
|
36
|
+
type: :runtime
|
37
|
+
prerelease: false
|
38
|
+
version_requirements: !ruby/object:Gem::Requirement
|
39
|
+
requirements:
|
40
|
+
- - ">="
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: 0.72.0
|
43
|
+
description: |
|
44
|
+
Automatic Rails code style checking tool.
|
45
|
+
A RuboCop extension focused on enforcing Rails best practices and coding conventions.
|
46
|
+
email: rubocop@googlegroups.com
|
47
|
+
executables: []
|
48
|
+
extensions: []
|
49
|
+
extra_rdoc_files:
|
50
|
+
- LICENSE.txt
|
51
|
+
- README.md
|
52
|
+
files:
|
53
|
+
- LICENSE.txt
|
54
|
+
- README.md
|
55
|
+
- bin/setup
|
56
|
+
- config/default.yml
|
57
|
+
- lib/rubocop-rails.rb
|
58
|
+
- lib/rubocop/cop/mixin/target_rails_version.rb
|
59
|
+
- lib/rubocop/cop/rails/action_filter.rb
|
60
|
+
- lib/rubocop/cop/rails/active_record_aliases.rb
|
61
|
+
- lib/rubocop/cop/rails/active_record_override.rb
|
62
|
+
- lib/rubocop/cop/rails/active_support_aliases.rb
|
63
|
+
- lib/rubocop/cop/rails/application_controller.rb
|
64
|
+
- lib/rubocop/cop/rails/application_job.rb
|
65
|
+
- lib/rubocop/cop/rails/application_mailer.rb
|
66
|
+
- lib/rubocop/cop/rails/application_record.rb
|
67
|
+
- lib/rubocop/cop/rails/assert_not.rb
|
68
|
+
- lib/rubocop/cop/rails/belongs_to.rb
|
69
|
+
- lib/rubocop/cop/rails/blank.rb
|
70
|
+
- lib/rubocop/cop/rails/bulk_change_table.rb
|
71
|
+
- lib/rubocop/cop/rails/create_table_with_timestamps.rb
|
72
|
+
- lib/rubocop/cop/rails/date.rb
|
73
|
+
- lib/rubocop/cop/rails/delegate.rb
|
74
|
+
- lib/rubocop/cop/rails/delegate_allow_blank.rb
|
75
|
+
- lib/rubocop/cop/rails/dynamic_find_by.rb
|
76
|
+
- lib/rubocop/cop/rails/enum_hash.rb
|
77
|
+
- lib/rubocop/cop/rails/enum_uniqueness.rb
|
78
|
+
- lib/rubocop/cop/rails/environment_comparison.rb
|
79
|
+
- lib/rubocop/cop/rails/exit.rb
|
80
|
+
- lib/rubocop/cop/rails/file_path.rb
|
81
|
+
- lib/rubocop/cop/rails/find_by.rb
|
82
|
+
- lib/rubocop/cop/rails/find_each.rb
|
83
|
+
- lib/rubocop/cop/rails/has_and_belongs_to_many.rb
|
84
|
+
- lib/rubocop/cop/rails/has_many_or_has_one_dependent.rb
|
85
|
+
- lib/rubocop/cop/rails/helper_instance_variable.rb
|
86
|
+
- lib/rubocop/cop/rails/http_positional_arguments.rb
|
87
|
+
- lib/rubocop/cop/rails/http_status.rb
|
88
|
+
- lib/rubocop/cop/rails/ignored_skip_action_filter_option.rb
|
89
|
+
- lib/rubocop/cop/rails/inverse_of.rb
|
90
|
+
- lib/rubocop/cop/rails/lexically_scoped_action_filter.rb
|
91
|
+
- lib/rubocop/cop/rails/link_to_blank.rb
|
92
|
+
- lib/rubocop/cop/rails/not_null_column.rb
|
93
|
+
- lib/rubocop/cop/rails/output.rb
|
94
|
+
- lib/rubocop/cop/rails/output_safety.rb
|
95
|
+
- lib/rubocop/cop/rails/pluralization_grammar.rb
|
96
|
+
- lib/rubocop/cop/rails/presence.rb
|
97
|
+
- lib/rubocop/cop/rails/present.rb
|
98
|
+
- lib/rubocop/cop/rails/rake_environment.rb
|
99
|
+
- lib/rubocop/cop/rails/read_write_attribute.rb
|
100
|
+
- lib/rubocop/cop/rails/redundant_allow_nil.rb
|
101
|
+
- lib/rubocop/cop/rails/redundant_receiver_in_with_options.rb
|
102
|
+
- lib/rubocop/cop/rails/reflection_class_name.rb
|
103
|
+
- lib/rubocop/cop/rails/refute_methods.rb
|
104
|
+
- lib/rubocop/cop/rails/relative_date_constant.rb
|
105
|
+
- lib/rubocop/cop/rails/request_referer.rb
|
106
|
+
- lib/rubocop/cop/rails/reversible_migration.rb
|
107
|
+
- lib/rubocop/cop/rails/safe_navigation.rb
|
108
|
+
- lib/rubocop/cop/rails/safe_navigation_with_blank.rb
|
109
|
+
- lib/rubocop/cop/rails/save_bang.rb
|
110
|
+
- lib/rubocop/cop/rails/scope_args.rb
|
111
|
+
- lib/rubocop/cop/rails/skips_model_validations.rb
|
112
|
+
- lib/rubocop/cop/rails/time_zone.rb
|
113
|
+
- lib/rubocop/cop/rails/uniq_before_pluck.rb
|
114
|
+
- lib/rubocop/cop/rails/unknown_env.rb
|
115
|
+
- lib/rubocop/cop/rails/validation.rb
|
116
|
+
- lib/rubocop/cop/rails_cops.rb
|
117
|
+
- lib/rubocop/rails.rb
|
118
|
+
- lib/rubocop/rails/inject.rb
|
119
|
+
- lib/rubocop/rails/version.rb
|
120
|
+
homepage: https://github.com/rubocop-hq/rubocop-rails
|
121
|
+
licenses:
|
122
|
+
- MIT
|
123
|
+
metadata:
|
124
|
+
homepage_uri: https://docs.rubocop.org/projects/rails
|
125
|
+
changelog_uri: https://github.com/rubocop-hq/rubocop-rails/blob/master/CHANGELOG.md
|
126
|
+
source_code_uri: https://github.com/rubocop-hq/rubocop-rails/
|
127
|
+
documentation_uri: https://docs.rubocop.org/projects/rails
|
128
|
+
bug_tracker_uri: https://github.com/rubocop-hq/rubocop-rails/issues
|
129
|
+
post_install_message:
|
130
|
+
rdoc_options: []
|
131
|
+
require_paths:
|
132
|
+
- lib
|
133
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
134
|
+
requirements:
|
135
|
+
- - ">="
|
136
|
+
- !ruby/object:Gem::Version
|
137
|
+
version: 2.3.0
|
138
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
139
|
+
requirements:
|
140
|
+
- - ">="
|
141
|
+
- !ruby/object:Gem::Version
|
142
|
+
version: '0'
|
143
|
+
requirements: []
|
144
|
+
rubygems_version: 3.1.2
|
145
|
+
signing_key:
|
146
|
+
specification_version: 4
|
147
|
+
summary: Automatic Rails code style checking tool.
|
148
|
+
test_files: []
|