rubocop 0.40.0 → 0.41.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of rubocop might be problematic. Click here for more details.

Files changed (103) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +7 -1014
  3. data/config/default.yml +61 -5
  4. data/config/disabled.yml +6 -0
  5. data/config/enabled.yml +63 -4
  6. data/lib/rubocop.rb +17 -1
  7. data/lib/rubocop/ast_node.rb +56 -42
  8. data/lib/rubocop/ast_node/traversal.rb +3 -3
  9. data/lib/rubocop/cli.rb +14 -9
  10. data/lib/rubocop/comment_config.rb +85 -32
  11. data/lib/rubocop/config.rb +29 -8
  12. data/lib/rubocop/config_loader.rb +1 -1
  13. data/lib/rubocop/cop/cop.rb +1 -1
  14. data/lib/rubocop/cop/corrector.rb +13 -0
  15. data/lib/rubocop/cop/lint/block_alignment.rb +25 -11
  16. data/lib/rubocop/cop/lint/format_parameter_mismatch.rb +5 -2
  17. data/lib/rubocop/cop/lint/inherit_exception.rb +69 -0
  18. data/lib/rubocop/cop/lint/percent_string_array.rb +60 -0
  19. data/lib/rubocop/cop/lint/percent_symbol_array.rb +57 -0
  20. data/lib/rubocop/cop/lint/shadowed_exception.rb +95 -0
  21. data/lib/rubocop/cop/lint/useless_access_modifier.rb +28 -13
  22. data/lib/rubocop/cop/mixin/autocorrect_alignment.rb +25 -19
  23. data/lib/rubocop/cop/mixin/end_keyword_alignment.rb +16 -8
  24. data/lib/rubocop/cop/mixin/if_node.rb +1 -2
  25. data/lib/rubocop/cop/mixin/integer_node.rb +13 -0
  26. data/lib/rubocop/cop/mixin/match_range.rb +26 -0
  27. data/lib/rubocop/cop/mixin/multiline_expression_indentation.rb +16 -7
  28. data/lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb +18 -1
  29. data/lib/rubocop/cop/mixin/negative_conditional.rb +6 -4
  30. data/lib/rubocop/cop/mixin/percent_literal.rb +10 -0
  31. data/lib/rubocop/cop/mixin/space_after_punctuation.rb +24 -6
  32. data/lib/rubocop/cop/mixin/space_before_punctuation.rb +20 -7
  33. data/lib/rubocop/cop/mixin/string_literals_help.rb +2 -2
  34. data/lib/rubocop/cop/mixin/trailing_comma.rb +34 -20
  35. data/lib/rubocop/cop/performance/flat_map.rb +23 -10
  36. data/lib/rubocop/cop/performance/push_splat.rb +47 -0
  37. data/lib/rubocop/cop/performance/redundant_block_call.rb +24 -1
  38. data/lib/rubocop/cop/performance/redundant_merge.rb +3 -5
  39. data/lib/rubocop/cop/performance/sample.rb +15 -11
  40. data/lib/rubocop/cop/rails/exit.rb +62 -0
  41. data/lib/rubocop/cop/rails/output_safety.rb +45 -0
  42. data/lib/rubocop/cop/rails/pluralization_grammar.rb +12 -4
  43. data/lib/rubocop/cop/rails/request_referer.rb +40 -0
  44. data/lib/rubocop/cop/rails/uniq_before_pluck.rb +63 -28
  45. data/lib/rubocop/cop/rails/validation.rb +37 -23
  46. data/lib/rubocop/cop/style/alias.rb +10 -6
  47. data/lib/rubocop/cop/style/bare_percent_literals.rb +18 -7
  48. data/lib/rubocop/cop/style/block_delimiters.rb +15 -22
  49. data/lib/rubocop/cop/style/closing_parenthesis_indentation.rb +19 -8
  50. data/lib/rubocop/cop/style/comment_indentation.rb +13 -5
  51. data/lib/rubocop/cop/style/conditional_assignment.rb +111 -59
  52. data/lib/rubocop/cop/style/documentation.rb +7 -1
  53. data/lib/rubocop/cop/style/each_for_simple_loop.rb +43 -0
  54. data/lib/rubocop/cop/style/each_with_object.rb +25 -14
  55. data/lib/rubocop/cop/style/empty_else.rb +6 -10
  56. data/lib/rubocop/cop/style/extra_spacing.rb +20 -3
  57. data/lib/rubocop/cop/style/file_name.rb +16 -4
  58. data/lib/rubocop/cop/style/frozen_string_literal_comment.rb +1 -1
  59. data/lib/rubocop/cop/style/hash_syntax.rb +9 -2
  60. data/lib/rubocop/cop/style/if_unless_modifier.rb +20 -13
  61. data/lib/rubocop/cop/style/implicit_runtime_error.rb +32 -0
  62. data/lib/rubocop/cop/style/infinite_loop.rb +42 -5
  63. data/lib/rubocop/cop/style/lambda.rb +22 -0
  64. data/lib/rubocop/cop/style/method_def_parentheses.rb +12 -4
  65. data/lib/rubocop/cop/style/module_function.rb +28 -6
  66. data/lib/rubocop/cop/style/multiline_method_call_indentation.rb +49 -12
  67. data/lib/rubocop/cop/style/mutable_constant.rb +8 -1
  68. data/lib/rubocop/cop/style/nested_modifier.rb +1 -1
  69. data/lib/rubocop/cop/style/next.rb +43 -31
  70. data/lib/rubocop/cop/style/not.rb +33 -13
  71. data/lib/rubocop/cop/style/numeric_literal_prefix.rb +92 -0
  72. data/lib/rubocop/cop/style/numeric_literals.rb +1 -4
  73. data/lib/rubocop/cop/style/parallel_assignment.rb +26 -8
  74. data/lib/rubocop/cop/style/{deprecated_hash_methods.rb → preferred_hash_methods.rb} +8 -8
  75. data/lib/rubocop/cop/style/redundant_parentheses.rb +29 -19
  76. data/lib/rubocop/cop/style/redundant_self.rb +13 -6
  77. data/lib/rubocop/cop/style/space_after_not.rb +7 -5
  78. data/lib/rubocop/cop/style/space_around_keyword.rb +6 -0
  79. data/lib/rubocop/cop/style/space_around_operators.rb +5 -1
  80. data/lib/rubocop/cop/style/space_before_first_arg.rb +21 -9
  81. data/lib/rubocop/cop/style/space_inside_array_percent_literal.rb +53 -0
  82. data/lib/rubocop/cop/style/space_inside_block_braces.rb +2 -2
  83. data/lib/rubocop/cop/style/space_inside_hash_literal_braces.rb +26 -6
  84. data/lib/rubocop/cop/style/space_inside_percent_literal_delimiters.rb +64 -0
  85. data/lib/rubocop/cop/style/string_literals.rb +37 -8
  86. data/lib/rubocop/cop/style/symbol_array.rb +21 -12
  87. data/lib/rubocop/cop/style/symbol_proc.rb +26 -19
  88. data/lib/rubocop/cop/style/word_array.rb +1 -5
  89. data/lib/rubocop/cop/style/zero_length_predicate.rb +6 -6
  90. data/lib/rubocop/cop/team.rb +40 -27
  91. data/lib/rubocop/cop/util.rb +13 -42
  92. data/lib/rubocop/formatter/disabled_config_formatter.rb +37 -14
  93. data/lib/rubocop/formatter/html_formatter.rb +3 -7
  94. data/lib/rubocop/result_cache.rb +18 -4
  95. data/{spec/support → lib/rubocop/rspec}/cop_helper.rb +3 -0
  96. data/lib/rubocop/rspec/host_environment_simulation_helper.rb +33 -0
  97. data/lib/rubocop/rspec/shared_contexts.rb +75 -0
  98. data/lib/rubocop/rspec/shared_examples.rb +101 -0
  99. data/lib/rubocop/rspec/support.rb +9 -0
  100. data/lib/rubocop/runner.rb +2 -2
  101. data/lib/rubocop/string_interpreter.rb +58 -0
  102. data/lib/rubocop/version.rb +1 -1
  103. metadata +27 -7
@@ -3,6 +3,7 @@
3
3
 
4
4
  require 'tempfile'
5
5
 
6
+ # This module provides methods that make it easier to test Cops.
6
7
  module CopHelper
7
8
  extend RSpec::SharedContext
8
9
 
@@ -64,6 +65,8 @@ end
64
65
 
65
66
  module RuboCop
66
67
  module Cop
68
+ # Monkey-patch Cop for tests to provide easy access to messages and
69
+ # highlights.
67
70
  class Cop
68
71
  def messages
69
72
  offenses.sort.map(&:message)
@@ -0,0 +1,33 @@
1
+ # encoding: utf-8
2
+ # frozen_string_literal: true
3
+
4
+ # RuboCop can be run in contexts where unexpected other libraries are included,
5
+ # which may interfere with its normal behavior. In order to test those
6
+ # situations, it may be necessary to require another library for the duration
7
+ # of one spec
8
+ module HostEnvironmentSimulatorHelper
9
+ def in_its_own_process_with(*files)
10
+ if ::Process.respond_to?(:fork)
11
+ pid = ::Process.fork do
12
+ # Need to write coverage result under different name
13
+ if defined?(SimpleCov)
14
+ SimpleCov.command_name "rspec_#{Process.pid}"
15
+ SimpleCov.pid = Process.pid
16
+ end
17
+
18
+ files.each { |file| require file }
19
+ yield
20
+ end
21
+ ::Process.wait(pid)
22
+
23
+ # assert that the block did not fail
24
+ expect($CHILD_STATUS).to be_success
25
+ else
26
+ warn 'Process.fork is not available.'
27
+ end
28
+ end
29
+ end
30
+
31
+ RSpec.configure do |config|
32
+ config.include HostEnvironmentSimulatorHelper
33
+ end
@@ -0,0 +1,75 @@
1
+ # encoding: utf-8
2
+ # frozen_string_literal: true
3
+
4
+ require 'tmpdir'
5
+ require 'fileutils'
6
+
7
+ shared_context 'isolated environment', :isolated_environment do
8
+ around do |example|
9
+ Dir.mktmpdir do |tmpdir|
10
+ original_home = ENV['HOME']
11
+
12
+ # Make sure to expand all symlinks in the path first. Otherwise we may
13
+ # get mismatched pathnames when loading config files later on.
14
+ tmpdir = File.realpath(tmpdir)
15
+
16
+ # Make upwards search for .rubocop.yml files stop at this directory.
17
+ RuboCop::ConfigLoader.root_level = tmpdir
18
+
19
+ begin
20
+ virtual_home = File.expand_path(File.join(tmpdir, 'home'))
21
+ Dir.mkdir(virtual_home)
22
+ ENV['HOME'] = virtual_home
23
+
24
+ working_dir = File.join(tmpdir, 'work')
25
+ Dir.mkdir(working_dir)
26
+
27
+ Dir.chdir(working_dir) do
28
+ example.run
29
+ end
30
+ ensure
31
+ ENV['HOME'] = original_home
32
+ end
33
+ end
34
+ end
35
+ end
36
+
37
+ # `cop_config` must be declared with #let.
38
+ shared_context 'config', :config do
39
+ let(:config) do
40
+ # Module#<
41
+ unless described_class < RuboCop::Cop::Cop
42
+ raise '`config` must be used in `describe SomeCopClass do .. end`'
43
+ end
44
+
45
+ hash = { 'AllCops' => { 'TargetRubyVersion' => ruby_version } }
46
+ if respond_to?(:cop_config)
47
+ cop_name = described_class.cop_name
48
+ hash[cop_name] = RuboCop::ConfigLoader
49
+ .default_configuration[cop_name]
50
+ .merge(cop_config)
51
+ end
52
+
53
+ RuboCop::Config.new(hash, "#{Dir.pwd}/.rubocop.yml")
54
+ end
55
+ end
56
+
57
+ shared_context 'ruby 1.9', :ruby19 do
58
+ let(:ruby_version) { 1.9 }
59
+ end
60
+
61
+ shared_context 'ruby 2.0', :ruby20 do
62
+ let(:ruby_version) { 2.0 }
63
+ end
64
+
65
+ shared_context 'ruby 2.1', :ruby21 do
66
+ let(:ruby_version) { 2.1 }
67
+ end
68
+
69
+ shared_context 'ruby 2.2', :ruby22 do
70
+ let(:ruby_version) { 2.2 }
71
+ end
72
+
73
+ shared_context 'ruby 2.3', :ruby23 do
74
+ let(:ruby_version) { 2.3 }
75
+ end
@@ -0,0 +1,101 @@
1
+ # encoding: utf-8
2
+ # frozen_string_literal: true
3
+
4
+ # `cop` and `source` must be declared with #let.
5
+
6
+ shared_examples_for 'accepts' do
7
+ it 'accepts' do
8
+ inspect_source(cop, source)
9
+ expect(cop.offenses).to be_empty
10
+ end
11
+ end
12
+
13
+ shared_examples_for 'mimics MRI 2.1' do |grep_mri_warning|
14
+ if RUBY_ENGINE == 'ruby' && RUBY_VERSION.start_with?('2.1')
15
+ it "mimics MRI #{RUBY_VERSION} built-in syntax checking" do
16
+ inspect_source(cop, source)
17
+ offenses_by_mri = MRISyntaxChecker.offenses_for_source(
18
+ source, cop.name, grep_mri_warning
19
+ )
20
+
21
+ # Compare objects before comparing counts for clear failure output.
22
+ cop.offenses.each_with_index do |offense_by_cop, index|
23
+ offense_by_mri = offenses_by_mri[index]
24
+ # Exclude column attribute since MRI does not
25
+ # output column number.
26
+ [:severity, :line, :cop_name].each do |a|
27
+ expect(offense_by_cop.send(a)).to eq(offense_by_mri.send(a))
28
+ end
29
+ end
30
+
31
+ expect(cop.offenses.count).to eq(offenses_by_mri.count)
32
+ end
33
+ end
34
+ end
35
+
36
+ shared_examples_for 'misaligned' do |prefix, alignment_base, arg, end_kw, name|
37
+ name ||= alignment_base
38
+ source = ["#{prefix}#{alignment_base} #{arg}",
39
+ end_kw]
40
+
41
+ it "registers an offense for mismatched #{name} ... end" do
42
+ inspect_source(cop, source)
43
+ expect(cop.offenses.size).to eq(1)
44
+ base_regexp = Regexp.escape(alignment_base)
45
+ regexp = /`end` at 2, \d+ is not aligned with `#{base_regexp}` at 1,/
46
+ expect(cop.messages.first).to match(regexp)
47
+ expect(cop.highlights.first).to eq('end')
48
+
49
+ other_styles = (cop.supported_styles - [cop.style]).map(&:to_s)
50
+ # In some cases, the code under test will happen to match an alternative
51
+ # style. In other cases, it won't match any style at all
52
+ expect(cop.config_to_allow_offenses).to(
53
+ eq('Enabled' => false).or(
54
+ satisfy { |h| other_styles.include?(h['AlignWith']) }
55
+ )
56
+ )
57
+ end
58
+
59
+ it "auto-corrects mismatched #{name} ... end" do
60
+ aligned_source = ["#{prefix}#{alignment_base} #{arg}",
61
+ "#{' ' * prefix.length}#{end_kw.strip}"].join("\n")
62
+ corrected = autocorrect_source(cop, source)
63
+ expect(corrected).to eq(aligned_source)
64
+ end
65
+ end
66
+
67
+ shared_examples_for 'aligned' do |alignment_base, arg, end_kw, name|
68
+ name ||= alignment_base
69
+ name = name.gsub(/\n/, ' <newline>')
70
+ it "accepts matching #{name} ... end" do
71
+ inspect_source(cop, ["#{alignment_base} #{arg}",
72
+ end_kw])
73
+ expect(cop.offenses).to be_empty
74
+ end
75
+ end
76
+
77
+ shared_examples_for 'debugger' do |name, src|
78
+ it "reports an offense for a #{name} call" do
79
+ inspect_source(cop, src)
80
+ src = [src] if src.is_a? String
81
+ expect(cop.offenses.size).to eq(src.size)
82
+ expect(cop.messages)
83
+ .to eq(src.map { |s| "Remove debugger entry point `#{s}`." })
84
+ expect(cop.highlights).to eq(src)
85
+ end
86
+
87
+ it "can autocorrect a #{name} call" do
88
+ lines = src.is_a?(String) ? src : src.join("\n")
89
+ new_source = autocorrect_source(cop, ['def a',
90
+ " #{lines}",
91
+ 'end'].join("\n"))
92
+ expect(new_source).to eq("def a\nend")
93
+ end
94
+ end
95
+
96
+ shared_examples_for 'non-debugger' do |name, src|
97
+ it "does not report an offense for #{name}" do
98
+ inspect_source(cop, src)
99
+ expect(cop.offenses).to be_empty
100
+ end
101
+ end
@@ -0,0 +1,9 @@
1
+ # encoding: utf-8
2
+ # frozen_string_literal: true
3
+
4
+ # Require this file to load code that supports testing using RSpec.
5
+
6
+ require 'rubocop/rspec/cop_helper'
7
+ require 'rubocop/rspec/host_environment_simulation_helper'
8
+ require 'rubocop/rspec/shared_contexts'
9
+ require 'rubocop/rspec/shared_examples'
@@ -7,7 +7,7 @@ module RuboCop
7
7
  class Runner # rubocop:disable Metrics/ClassLength
8
8
  # An exception indicating that the inspection loop got stuck correcting
9
9
  # offenses back and forth.
10
- class InfiniteCorrectionLoop < Exception
10
+ class InfiniteCorrectionLoop < RuntimeError
11
11
  attr_reader :offenses
12
12
 
13
13
  def initialize(path, offenses)
@@ -273,7 +273,7 @@ module RuboCop
273
273
  end
274
274
 
275
275
  def get_processed_source(file)
276
- ruby_version = @config_store.for(file).for_all_cops['TargetRubyVersion']
276
+ ruby_version = @config_store.for(file).target_ruby_version
277
277
 
278
278
  if @options[:stdin]
279
279
  ProcessedSource.new(@options[:stdin], ruby_version, file)
@@ -0,0 +1,58 @@
1
+ # encoding: utf-8
2
+ # frozen_string_literal: true
3
+
4
+ module RuboCop
5
+ # Take a string with embedded escapes, and convert the escapes as the Ruby
6
+ # interpreter would when reading a double-quoted string literal.
7
+ # For example, "\\n" will be converted to "\n".
8
+ class StringInterpreter
9
+ STRING_ESCAPES = {
10
+ '\a' => "\a", '\b' => "\b", '\e' => "\e", '\f' => "\f", '\n' => "\n",
11
+ '\r' => "\r", '\s' => ' ', '\t' => "\t", '\v' => "\v", "\\\n" => ''
12
+ }.freeze
13
+ STRING_ESCAPE_REGEX = /\\(?:
14
+ [abefnrstv\n] | # simple escapes (above)
15
+ \d{1,3} | # octal byte escape
16
+ x[0-9a-fA-F]{1,2} | # hex byte escape
17
+ u[0-9a-fA-F]{4} | # unicode char escape
18
+ u\{[^}]*\} | # extended unicode escape
19
+ . # any other escaped char
20
+ )/x
21
+ class << self
22
+ def interpret(string)
23
+ # We currently don't handle \cx, \C-x, and \M-x
24
+ string.gsub(STRING_ESCAPE_REGEX) do |escape|
25
+ STRING_ESCAPES[escape] || interpret_string_escape(escape)
26
+ end
27
+ end
28
+
29
+ private
30
+
31
+ def interpret_string_escape(escape)
32
+ case escape[1]
33
+ when 'u'.freeze then interpret_unicode(escape)
34
+ when 'x'.freeze then interpret_hex(escape)
35
+ when /\d/ then interpret_octal(escape)
36
+ else
37
+ escape[1] # literal escaped char, like \\
38
+ end
39
+ end
40
+
41
+ def interpret_unicode(escape)
42
+ if escape[2] == '{'.freeze
43
+ escape[3..-1].split(/\s+/).map(&:hex).pack('U*'.freeze)
44
+ else
45
+ [escape[2..-1].hex].pack('U'.freeze)
46
+ end
47
+ end
48
+
49
+ def interpret_hex(escape)
50
+ [escape[2..-1].hex].pack('C'.freeze)
51
+ end
52
+
53
+ def interpret_octal(escape)
54
+ [escape[1..-1].to_i(8)].pack('C'.freeze)
55
+ end
56
+ end
57
+ end
58
+ end
@@ -4,7 +4,7 @@
4
4
  module RuboCop
5
5
  # This module holds the RuboCop version information.
6
6
  module Version
7
- STRING = '0.40.0'.freeze
7
+ STRING = '0.41.0'.freeze
8
8
 
9
9
  MSG = '%s (using Parser %s, running on %s %s %s)'.freeze
10
10
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.40.0
4
+ version: 0.41.0
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: 2016-05-09 00:00:00.000000000 Z
13
+ date: 2016-06-25 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rainbow
@@ -38,7 +38,7 @@ dependencies:
38
38
  requirements:
39
39
  - - ">="
40
40
  - !ruby/object:Gem::Version
41
- version: 2.3.1.0
41
+ version: 2.3.1.1
42
42
  - - "<"
43
43
  - !ruby/object:Gem::Version
44
44
  version: '3.0'
@@ -48,7 +48,7 @@ dependencies:
48
48
  requirements:
49
49
  - - ">="
50
50
  - !ruby/object:Gem::Version
51
- version: 2.3.1.0
51
+ version: 2.3.1.1
52
52
  - - "<"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '3.0'
@@ -175,6 +175,7 @@ files:
175
175
  - lib/rubocop/cop/lint/handle_exceptions.rb
176
176
  - lib/rubocop/cop/lint/implicit_string_concatenation.rb
177
177
  - lib/rubocop/cop/lint/ineffective_access_modifier.rb
178
+ - lib/rubocop/cop/lint/inherit_exception.rb
178
179
  - lib/rubocop/cop/lint/invalid_character_literal.rb
179
180
  - lib/rubocop/cop/lint/literal_in_condition.rb
180
181
  - lib/rubocop/cop/lint/literal_in_interpolation.rb
@@ -183,9 +184,12 @@ files:
183
184
  - lib/rubocop/cop/lint/next_without_accumulator.rb
184
185
  - lib/rubocop/cop/lint/non_local_exit_from_iterator.rb
185
186
  - lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb
187
+ - lib/rubocop/cop/lint/percent_string_array.rb
188
+ - lib/rubocop/cop/lint/percent_symbol_array.rb
186
189
  - lib/rubocop/cop/lint/rand_one.rb
187
190
  - lib/rubocop/cop/lint/require_parentheses.rb
188
191
  - lib/rubocop/cop/lint/rescue_exception.rb
192
+ - lib/rubocop/cop/lint/shadowed_exception.rb
189
193
  - lib/rubocop/cop/lint/shadowing_outer_local_variable.rb
190
194
  - lib/rubocop/cop/lint/string_conversion_in_interpolation.rb
191
195
  - lib/rubocop/cop/lint/syntax.rb
@@ -227,6 +231,8 @@ files:
227
231
  - lib/rubocop/cop/mixin/frozen_string_literal.rb
228
232
  - lib/rubocop/cop/mixin/hash_node.rb
229
233
  - lib/rubocop/cop/mixin/if_node.rb
234
+ - lib/rubocop/cop/mixin/integer_node.rb
235
+ - lib/rubocop/cop/mixin/match_range.rb
230
236
  - lib/rubocop/cop/mixin/method_complexity.rb
231
237
  - lib/rubocop/cop/mixin/method_preference.rb
232
238
  - lib/rubocop/cop/mixin/min_body_length.rb
@@ -260,6 +266,7 @@ files:
260
266
  - lib/rubocop/cop/performance/flat_map.rb
261
267
  - lib/rubocop/cop/performance/hash_each.rb
262
268
  - lib/rubocop/cop/performance/lstrip_rstrip.rb
269
+ - lib/rubocop/cop/performance/push_splat.rb
263
270
  - lib/rubocop/cop/performance/range_include.rb
264
271
  - lib/rubocop/cop/performance/redundant_block_call.rb
265
272
  - lib/rubocop/cop/performance/redundant_match.rb
@@ -274,12 +281,15 @@ files:
274
281
  - lib/rubocop/cop/rails/action_filter.rb
275
282
  - lib/rubocop/cop/rails/date.rb
276
283
  - lib/rubocop/cop/rails/delegate.rb
284
+ - lib/rubocop/cop/rails/exit.rb
277
285
  - lib/rubocop/cop/rails/find_by.rb
278
286
  - lib/rubocop/cop/rails/find_each.rb
279
287
  - lib/rubocop/cop/rails/has_and_belongs_to_many.rb
280
288
  - lib/rubocop/cop/rails/output.rb
289
+ - lib/rubocop/cop/rails/output_safety.rb
281
290
  - lib/rubocop/cop/rails/pluralization_grammar.rb
282
291
  - lib/rubocop/cop/rails/read_write_attribute.rb
292
+ - lib/rubocop/cop/rails/request_referer.rb
283
293
  - lib/rubocop/cop/rails/scope_args.rb
284
294
  - lib/rubocop/cop/rails/time_zone.rb
285
295
  - lib/rubocop/cop/rails/uniq_before_pluck.rb
@@ -321,10 +331,10 @@ files:
321
331
  - lib/rubocop/cop/style/constant_name.rb
322
332
  - lib/rubocop/cop/style/copyright.rb
323
333
  - lib/rubocop/cop/style/def_with_parentheses.rb
324
- - lib/rubocop/cop/style/deprecated_hash_methods.rb
325
334
  - lib/rubocop/cop/style/documentation.rb
326
335
  - lib/rubocop/cop/style/dot_position.rb
327
336
  - lib/rubocop/cop/style/double_negation.rb
337
+ - lib/rubocop/cop/style/each_for_simple_loop.rb
328
338
  - lib/rubocop/cop/style/each_with_object.rb
329
339
  - lib/rubocop/cop/style/else_alignment.rb
330
340
  - lib/rubocop/cop/style/empty_case_condition.rb
@@ -360,6 +370,7 @@ files:
360
370
  - lib/rubocop/cop/style/if_unless_modifier.rb
361
371
  - lib/rubocop/cop/style/if_unless_modifier_of_if_unless.rb
362
372
  - lib/rubocop/cop/style/if_with_semicolon.rb
373
+ - lib/rubocop/cop/style/implicit_runtime_error.rb
363
374
  - lib/rubocop/cop/style/indent_array.rb
364
375
  - lib/rubocop/cop/style/indent_assignment.rb
365
376
  - lib/rubocop/cop/style/indent_hash.rb
@@ -399,6 +410,7 @@ files:
399
410
  - lib/rubocop/cop/style/nil_comparison.rb
400
411
  - lib/rubocop/cop/style/non_nil_check.rb
401
412
  - lib/rubocop/cop/style/not.rb
413
+ - lib/rubocop/cop/style/numeric_literal_prefix.rb
402
414
  - lib/rubocop/cop/style/numeric_literals.rb
403
415
  - lib/rubocop/cop/style/one_line_conditional.rb
404
416
  - lib/rubocop/cop/style/op_method.rb
@@ -410,6 +422,7 @@ files:
410
422
  - lib/rubocop/cop/style/percent_q_literals.rb
411
423
  - lib/rubocop/cop/style/perl_backrefs.rb
412
424
  - lib/rubocop/cop/style/predicate_name.rb
425
+ - lib/rubocop/cop/style/preferred_hash_methods.rb
413
426
  - lib/rubocop/cop/style/proc.rb
414
427
  - lib/rubocop/cop/style/raise_args.rb
415
428
  - lib/rubocop/cop/style/redundant_begin.rb
@@ -441,10 +454,12 @@ files:
441
454
  - lib/rubocop/cop/style/space_before_comment.rb
442
455
  - lib/rubocop/cop/style/space_before_first_arg.rb
443
456
  - lib/rubocop/cop/style/space_before_semicolon.rb
457
+ - lib/rubocop/cop/style/space_inside_array_percent_literal.rb
444
458
  - lib/rubocop/cop/style/space_inside_block_braces.rb
445
459
  - lib/rubocop/cop/style/space_inside_brackets.rb
446
460
  - lib/rubocop/cop/style/space_inside_hash_literal_braces.rb
447
461
  - lib/rubocop/cop/style/space_inside_parens.rb
462
+ - lib/rubocop/cop/style/space_inside_percent_literal_delimiters.rb
448
463
  - lib/rubocop/cop/style/space_inside_range_literal.rb
449
464
  - lib/rubocop/cop/style/space_inside_string_interpolation.rb
450
465
  - lib/rubocop/cop/style/special_global_vars.rb
@@ -508,13 +523,18 @@ files:
508
523
  - lib/rubocop/rake_task.rb
509
524
  - lib/rubocop/remote_config.rb
510
525
  - lib/rubocop/result_cache.rb
526
+ - lib/rubocop/rspec/cop_helper.rb
527
+ - lib/rubocop/rspec/host_environment_simulation_helper.rb
528
+ - lib/rubocop/rspec/shared_contexts.rb
529
+ - lib/rubocop/rspec/shared_examples.rb
530
+ - lib/rubocop/rspec/support.rb
511
531
  - lib/rubocop/runner.rb
532
+ - lib/rubocop/string_interpreter.rb
512
533
  - lib/rubocop/string_util.rb
513
534
  - lib/rubocop/target_finder.rb
514
535
  - lib/rubocop/token.rb
515
536
  - lib/rubocop/version.rb
516
537
  - lib/rubocop/warning.rb
517
- - spec/support/cop_helper.rb
518
538
  homepage: http://github.com/bbatsov/rubocop
519
539
  licenses:
520
540
  - MIT
@@ -535,7 +555,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
535
555
  version: '0'
536
556
  requirements: []
537
557
  rubyforge_project:
538
- rubygems_version: 2.4.5
558
+ rubygems_version: 2.2.2
539
559
  signing_key:
540
560
  specification_version: 4
541
561
  summary: Automatic Ruby code style checking tool.