rubocop 0.33.0 → 0.34.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 (65) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +62 -1
  3. data/README.md +65 -6
  4. data/config/default.yml +30 -0
  5. data/config/disabled.yml +5 -0
  6. data/config/enabled.yml +19 -3
  7. data/lib/rubocop.rb +7 -2
  8. data/lib/rubocop/cli.rb +1 -1
  9. data/lib/rubocop/config.rb +11 -6
  10. data/lib/rubocop/config_loader.rb +7 -3
  11. data/lib/rubocop/cop/commissioner.rb +6 -11
  12. data/lib/rubocop/cop/cop.rb +7 -3
  13. data/lib/rubocop/cop/lint/deprecated_class_methods.rb +10 -8
  14. data/lib/rubocop/cop/lint/duplicated_key.rb +37 -0
  15. data/lib/rubocop/cop/lint/end_alignment.rb +6 -6
  16. data/lib/rubocop/cop/lint/format_parameter_mismatch.rb +57 -14
  17. data/lib/rubocop/cop/metrics/method_length.rb +1 -3
  18. data/lib/rubocop/cop/mixin/annotation_comment.rb +1 -2
  19. data/lib/rubocop/cop/mixin/autocorrect_alignment.rb +11 -1
  20. data/lib/rubocop/cop/mixin/configurable_naming.rb +14 -3
  21. data/lib/rubocop/cop/mixin/empty_lines_around_body.rb +1 -3
  22. data/lib/rubocop/cop/mixin/end_keyword_alignment.rb +9 -0
  23. data/lib/rubocop/cop/mixin/method_preference.rb +28 -0
  24. data/lib/rubocop/cop/mixin/safe_assignment.rb +2 -2
  25. data/lib/rubocop/cop/performance/case_when_splat.rb +132 -0
  26. data/lib/rubocop/cop/performance/string_replacement.rb +45 -28
  27. data/lib/rubocop/cop/rails/action_filter.rb +31 -5
  28. data/lib/rubocop/cop/rails/date.rb +6 -5
  29. data/lib/rubocop/cop/rails/read_write_attribute.rb +1 -1
  30. data/lib/rubocop/cop/rails/time_zone.rb +12 -1
  31. data/lib/rubocop/cop/style/alias.rb +1 -0
  32. data/lib/rubocop/cop/style/block_delimiters.rb +6 -5
  33. data/lib/rubocop/cop/style/collection_methods.rb +2 -20
  34. data/lib/rubocop/cop/style/else_alignment.rb +2 -1
  35. data/lib/rubocop/cop/style/empty_line_between_defs.rb +42 -13
  36. data/lib/rubocop/cop/style/extra_spacing.rb +17 -3
  37. data/lib/rubocop/cop/style/first_parameter_indentation.rb +1 -1
  38. data/lib/rubocop/cop/style/hash_syntax.rb +5 -0
  39. data/lib/rubocop/cop/style/indentation_width.rb +7 -1
  40. data/lib/rubocop/cop/style/initial_indentation.rb +5 -0
  41. data/lib/rubocop/cop/style/multiline_operation_indentation.rb +1 -1
  42. data/lib/rubocop/cop/style/mutable_constant.rb +35 -0
  43. data/lib/rubocop/cop/style/next.rb +31 -14
  44. data/lib/rubocop/cop/style/option_hash.rb +9 -1
  45. data/lib/rubocop/cop/style/parallel_assignment.rb +21 -44
  46. data/lib/rubocop/cop/style/redundant_freeze.rb +37 -0
  47. data/lib/rubocop/cop/style/rescue_ensure_alignment.rb +2 -1
  48. data/lib/rubocop/cop/style/rescue_modifier.rb +35 -3
  49. data/lib/rubocop/cop/style/space_inside_string_interpolation.rb +1 -0
  50. data/lib/rubocop/cop/style/string_methods.rb +32 -0
  51. data/lib/rubocop/cop/style/symbol_proc.rb +54 -12
  52. data/lib/rubocop/cop/style/trailing_blank_lines.rb +1 -1
  53. data/lib/rubocop/cop/team.rb +2 -2
  54. data/lib/rubocop/cop/util.rb +2 -2
  55. data/lib/rubocop/cop/variable_force.rb +10 -10
  56. data/lib/rubocop/cop/variable_force/locatable.rb +5 -5
  57. data/lib/rubocop/formatter/formatter_set.rb +1 -0
  58. data/lib/rubocop/options.rb +24 -1
  59. data/lib/rubocop/result_cache.rb +121 -0
  60. data/lib/rubocop/runner.rb +55 -15
  61. data/lib/rubocop/target_finder.rb +1 -1
  62. data/lib/rubocop/version.rb +1 -1
  63. data/relnotes/v0.34.0.md +182 -0
  64. data/rubocop.gemspec +1 -1
  65. metadata +12 -4
@@ -3,7 +3,7 @@
3
3
  module RuboCop
4
4
  # This class handles the processing of files, which includes dealing with
5
5
  # formatters and letting cops inspect the files.
6
- class Runner
6
+ class Runner # rubocop:disable Metrics/ClassLength
7
7
  # An exception indicating that the inspection loop got stuck correcting
8
8
  # offenses back and forth.
9
9
  class InfiniteCorrectionLoop < Exception
@@ -27,7 +27,11 @@ module RuboCop
27
27
 
28
28
  def run(paths)
29
29
  target_files = find_target_files(paths)
30
- inspect_files(target_files)
30
+ if @options[:list_target_files]
31
+ list_files(target_files)
32
+ else
33
+ inspect_files(target_files)
34
+ end
31
35
  end
32
36
 
33
37
  def abort
@@ -58,26 +62,36 @@ module RuboCop
58
62
 
59
63
  all_passed
60
64
  ensure
65
+ ResultCache.cleanup(@config_store, @options[:debug]) if cached_run?
61
66
  formatter_set.finished(inspected_files.freeze)
62
67
  formatter_set.close_output_files
63
68
  end
64
69
 
70
+ def list_files(paths)
71
+ paths.each do |path|
72
+ puts PathUtil.relative_path(path)
73
+ end
74
+ end
75
+
65
76
  def process_file(file)
66
77
  puts "Scanning #{file}" if @options[:debug]
67
78
 
68
- processed_source = ProcessedSource.from_file(file)
69
- file_info = {
70
- cop_disabled_line_ranges: processed_source.disabled_line_ranges,
71
- comments: processed_source.comments,
72
- cli_options: @options,
73
- config_store: @config_store
74
- }
75
-
76
- formatter_set.file_started(file, file_info)
77
-
78
- offenses = do_inspection_loop(file, processed_source)
79
+ cache = ResultCache.new(file, @options, @config_store) if cached_run?
80
+ if cache && cache.valid?
81
+ offenses, disabled_line_ranges, comments = cache.load
82
+ file_started(file, disabled_line_ranges, comments)
83
+ else
84
+ processed_source = get_processed_source(file)
85
+ file_started(file, processed_source.disabled_line_ranges,
86
+ processed_source.comments)
87
+ offenses = do_inspection_loop(file, processed_source)
88
+ if cache
89
+ cache.save(offenses, processed_source.disabled_line_ranges,
90
+ processed_source.comments)
91
+ end
92
+ end
79
93
 
80
- formatter_set.file_finished(file, offenses.compact.sort.freeze)
94
+ offenses = formatter_set.file_finished(file, offenses.compact.sort.freeze)
81
95
 
82
96
  offenses
83
97
  rescue InfiniteCorrectionLoop => e
@@ -85,6 +99,27 @@ module RuboCop
85
99
  raise
86
100
  end
87
101
 
102
+ def file_started(file, disabled_line_ranges, comments)
103
+ formatter_set.file_started(file,
104
+ cop_disabled_line_ranges: disabled_line_ranges,
105
+ comments: comments,
106
+ cli_options: @options,
107
+ config_store: @config_store)
108
+ end
109
+
110
+ def cached_run?
111
+ @cached_run ||=
112
+ (@options[:cache] == 'true' ||
113
+ @options[:cache] != 'false' &&
114
+ @config_store.for(Dir.pwd)['AllCops']['UseCache']) &&
115
+ # When running --auto-gen-config, there's some processing done in the
116
+ # cops related to calculating the Max parameters for Metrics cops. We
117
+ # need to do that processing and can not use caching.
118
+ !@options[:auto_gen_config] &&
119
+ # Auto-correction needs a full run. It can not use cached results.
120
+ !@options[:auto_correct]
121
+ end
122
+
88
123
  def do_inspection_loop(file, processed_source)
89
124
  offenses = []
90
125
 
@@ -111,7 +146,7 @@ module RuboCop
111
146
  # loop if we find any.
112
147
  break unless updated_source_file
113
148
 
114
- processed_source = ProcessedSource.from_file(file)
149
+ processed_source = get_processed_source(file)
115
150
  end
116
151
 
117
152
  offenses
@@ -209,5 +244,10 @@ module RuboCop
209
244
  RuboCop::Cop::Severity.new(name)
210
245
  end
211
246
  end
247
+
248
+ def get_processed_source(file)
249
+ return ProcessedSource.new(@options[:stdin], file) if @options[:stdin]
250
+ ProcessedSource.from_file(file)
251
+ end
212
252
  end
213
253
  end
@@ -118,7 +118,7 @@ module RuboCop
118
118
 
119
119
  def ruby_executable?(file)
120
120
  return false unless File.extname(file).empty?
121
- first_line = File.open(file) { |f| f.readline }
121
+ first_line = File.open(file, &:readline)
122
122
  first_line =~ /#!.*ruby/
123
123
  rescue EOFError, ArgumentError => e
124
124
  warn "Unprocessable file #{file}: #{e.class}, #{e.message}" if debug?
@@ -3,7 +3,7 @@
3
3
  module RuboCop
4
4
  # This module holds the RuboCop version information.
5
5
  module Version
6
- STRING = '0.33.0'
6
+ STRING = '0.34.0'
7
7
 
8
8
  MSG = '%s (using Parser %s, running on %s %s %s)'
9
9
 
@@ -0,0 +1,182 @@
1
+ Apart from the usual myriad of bugfixes, improvements and new cops,
2
+ this version introduces a results caching functionality. This
3
+ functionality will speed up tremendously consecutive RuboCop runs on
4
+ the same codebase.
5
+
6
+ Another news to share with you - the project now has a crowdfunding
7
+ campaign [here](https://salt.bountysource.com/). If you like RuboCop
8
+ you might consider supporting its development.
9
+
10
+ Enjoy!
11
+
12
+ ### New features
13
+
14
+ * [#2143](https://github.com/bbatsov/rubocop/pull/2143): New cop `Performance/CaseWhenSplat` will identify and rearange `case` `when` statements that contain a `when` condition with a splat. ([@rrosenblum][])
15
+ * New cop `Lint/DuplicatedKey` checks for duplicated keys in hashes, which Ruby 2.2 warns against. ([@sliuu][])
16
+ * [#2106](https://github.com/bbatsov/rubocop/issues/2106): Add `SuspiciousParamNames` option to `Style/OptionHash`. ([@wli][])
17
+ * [#2193](https://github.com/bbatsov/rubocop/pull/2193): `Style/Next` supports more `Enumerable` methods. ([@rrosenblum][])
18
+ * [#2179](https://github.com/bbatsov/rubocop/issues/2179): Add `--list-target-files` option to CLI, which prints the files which will be inspected. ([@maxjacobson][])
19
+ * New cop `Style/MutableConstant` checks for assignment of mutable objects to constants. ([@bbatsov][])
20
+ * New cop `Style/RedudantFreeze` checks for usages of `Object#freeze` on immutable objects. ([@bbatsov][])
21
+ * [#1924](https://github.com/bbatsov/rubocop/issues/1924): New option `--cache` and configuration parameter `AllCops: UseCache` turn result caching on (default) or off. ([@jonas054][])
22
+ * [#2204](https://github.com/bbatsov/rubocop/pull/2204): New cop `Style/StringMethods` will check for preferred method `to_sym` over `intern`. ([@imtayadeway][])
23
+
24
+ ### Changes
25
+
26
+ * [#1351](https://github.com/bbatsov/rubocop/issues/1351): Allow class emitter methods in `Style/MethodName`. ([@jonas054][])
27
+ * [#2126](https://github.com/bbatsov/rubocop/pull/2126): `Style/RescueModifier` can now auto-correct. ([@rrosenblum][])
28
+ * [#2109](https://github.com/bbatsov/rubocop/issues/2109): Allow alignment with a token on the nearest line with same indentation in `Style/ExtraSpacing`. ([@jonas054][])
29
+ * `Lint/EndAlignment` handles the `case` keyword. ([@lumeet][])
30
+ * [#2146](https://github.com/bbatsov/rubocop/pull/2146): Add STDIN support. ([@caseywebdev][])
31
+ * [#2175](https://github.com/bbatsov/rubocop/pull/2175): Files that are excluded from a cop (e.g. using the `Exclude:` config option) are no longer being processed by that cop. ([@bquorning][])
32
+ * `Rails/ActionFilter` now handles complete list of methods found in the Rails 4.2 [release notes](https://github.com/rails/rails/blob/4115a12da1409c753c747fd4bab6e612c0c6e51a/guides/source/4_2_release_notes.md#notable-changes-1). ([@MGerrior][])
33
+ * [*2138](https://github.com/bbatsov/rubocop/issues/2138): Change the offense in `Style/Next` to highlight the condition instead of the iteration. ([@rrosenblum][])
34
+ * `Style/EmptyLineBetweenDefs` now handles class methods as well. ([@unmanbearpig][])
35
+ * Improve handling of `super` in `Style/SymbolProc`. ([@lumeet][])
36
+ * `Style/SymbolProc` is applied to methods receiving arguments. ([@lumeet][])
37
+ * [#1839](https://github.com/bbatsov/rubocop/issues/1839): Remove Rainbow monkey patching of String which conflicts with other gems like colorize. ([@daviddavis][])
38
+ * `Style/HashSyntax` is now a bit faster when checking Ruby 1.9 syntax hash keys. ([@bquorning][])
39
+ * `Lint/DeprecatedClassMethods` is now a whole lot faster. ([@bquorning][])
40
+ * `Lint/BlockAlignment`, `Style/IndentationWidth`, and `Style/MultilineOperationIndentation` are now quite a bit faster. ([@bquorning][])
41
+
42
+ ### Bug Fixes
43
+
44
+ * [#2123](https://github.com/bbatsov/rubocop/pull/2123): Fix handing of dynamic widths `Lint/FormatParameterMismatch`. ([@edmz][])
45
+ * [#2116](https://github.com/bbatsov/rubocop/pull/2116): Fix named params (using hash) `Lint/FormatParameterMismatch`. ([@edmz][])
46
+ * [#2135](https://github.com/bbatsov/rubocop/issues/2135): Ignore `super` and `zsuper` nodes in `Style/SymbolProc`. ([@bbatsov][])
47
+ * [#2165](https://github.com/bbatsov/rubocop/issues/2165): Fix a NPE in `Style/Alias`. ([@bbatsov][])
48
+ * [#2168](https://github.com/bbatsov/rubocop/issues/2168): Fix a NPE in `Rails/TimeZone`. ([@bbatsov][])
49
+ * [#2169](https://github.com/bbatsov/rubocop/issues/2169): Fix a NPE in `Rails/Date`. ([@bbatsov][])
50
+ * [#2105](https://github.com/bbatsov/rubocop/pull/2105): Fix a warning that was thrown when enabling `Style/OptionHash`. ([@wli][])
51
+ * [#2107](https://github.com/bbatsov/rubocop/pull/2107): Fix auto-correct of `Style/ParallelAssignment` for nested expressions. ([@rrosenblum][])
52
+ * [#2111](https://github.com/bbatsov/rubocop/issues/2111): Deal with byte order mark in `Style/InitialIndentation`. ([@jonas054][])
53
+ * [#2113](https://github.com/bbatsov/rubocop/issues/2113): Handle non-string tokens in `Style/ExtraSpacing`. ([@jonas054][])
54
+ * [#2129](https://github.com/bbatsov/rubocop/issues/2129): Handle empty interpolations in `Style/SpaceInsideStringInterpolation`. ([@lumeet][])
55
+ * [#2119](https://github.com/bbatsov/rubocop/issues/2119): Do not raise an error in `Style/RescueEnsureAlignment` and `Style/RescueModifier` when processing an excluded file. ([@rrosenblum][])
56
+ * [#2149](https://github.com/bbatsov/rubocop/issues/2149): Do not register an offense in `Rails/Date` when `Date#to_time` is called with a time zone argument. ([@maxjacobson][])
57
+ * Do not register a `Rails/TimeZone` offense when using Time.new safely. ([@maxjacobson][])
58
+ * [#2124](https://github.com/bbatsov/rubocop/issues/2124): Fix bug in `Style/EmptyLineBetweenDefs` when there are only comments between method definitions. ([@lumeet][])
59
+ * [#2154](https://github.com/bbatsov/rubocop/issues/2154): `Performance/StringReplacement` can auto-correct replacements with backslash in them. ([@rrosenblum][])
60
+ * [#2009](https://github.com/bbatsov/rubocop/issues/2009): Fix bug in `RuboCop::ConfigLoader.load_file` when `safe_yaml` is required. ([@eitoball][])
61
+ * [#2155](https://github.com/bbatsov/rubocop/issues/2155): Configuration `EndAlignment: AlignWith: variable` only applies when the operands of `=` are on the same line. ([@jonas054][])
62
+ * Fix bug in `Style/IndentationWidth` when `rescue` or `ensure` is preceded by an empty body. ([@lumeet][])
63
+ * [#2183](https://github.com/bbatsov/rubocop/issues/2183): Fix bug in `Style/BlockDelimiters` when auto-correcting adjacent braces. ([@lumeet][])
64
+ * [#2199](https://github.com/bbatsov/rubocop/issues/2199): Make `rubocop` exit with error when there are only `Lint/UnneededDisable` offenses. ([@jonas054][])
65
+ * Fix handling of empty parentheses when auto-correcting in `Style/SymbolProc`. ([@lumeet][])
66
+
67
+ [@bbatsov]: https://github.com/bbatsov
68
+ [@jonas054]: https://github.com/jonas054
69
+ [@yujinakayama]: https://github.com/yujinakayama
70
+ [@dblock]: https://github.com/dblock
71
+ [@nevir]: https://github.com/nevir
72
+ [@daviddavis]: https://github.com/daviddavis
73
+ [@sds]: https://github.com/sds
74
+ [@fancyremarker]: https://github.com/fancyremarker
75
+ [@sinisterchipmunk]: https://github.com/sinisterchipmunk
76
+ [@vonTronje]: https://github.com/vonTronje
77
+ [@agrimm]: https://github.com/agrimm
78
+ [@pmenglund]: https://github.com/pmenglund
79
+ [@chulkilee]: https://github.com/chulkilee
80
+ [@codez]: https://github.com/codez
81
+ [@emou]: https://github.com/emou
82
+ [@skanev]: http://github.com/skanev
83
+ [@claco]: http://github.com/claco
84
+ [@rifraf]: http://github.com/rifraf
85
+ [@scottmatthewman]: https://github.com/scottmatthewman
86
+ [@ma2gedev]: http://github.com/ma2gedev
87
+ [@jeremyolliver]: https://github.com/jeremyolliver
88
+ [@hannestyden]: https://github.com/hannestyden
89
+ [@geniou]: https://github.com/geniou
90
+ [@jkogara]: https://github.com/jkogara
91
+ [@tmorris-fiksu]: https://github.com/tmorris-fiksu
92
+ [@mockdeep]: https://github.com/mockdeep
93
+ [@hiroponz]: https://github.com/hiroponz
94
+ [@tamird]: https://github.com/tamird
95
+ [@fshowalter]: https://github.com/fshowalter
96
+ [@cschramm]: https://github.com/cschramm
97
+ [@bquorning]: https://github.com/bquorning
98
+ [@bcobb]: https://github.com/bcobb
99
+ [@irrationalfab]: https://github.com/irrationalfab
100
+ [@tommeier]: https://github.com/tommeier
101
+ [@sfeldon]: https://github.com/sfeldon
102
+ [@biinari]: https://github.com/biinari
103
+ [@barunio]: https://github.com/barunio
104
+ [@molawson]: https://github.com/molawson
105
+ [@wndhydrnt]: https://github.com/wndhydrnt
106
+ [@ggilder]: https://github.com/ggilder
107
+ [@salbertson]: https://github.com/salbertson
108
+ [@camilleldn]: https://github.com/camilleldn
109
+ [@mcls]: https://github.com/mcls
110
+ [@yous]: https://github.com/yous
111
+ [@vrthra]: https://github.com/vrthra
112
+ [@SkuliOskarsson]: https://github.com/SkuliOskarsson
113
+ [@jspanjers]: https://github.com/jspanjers
114
+ [@sch1zo]: https://github.com/sch1zo
115
+ [@smangelsdorf]: https://github.com/smangelsdorf
116
+ [@mvz]: https://github.com/mvz
117
+ [@jfelchner]: https://github.com/jfelchner
118
+ [@janraasch]: https://github.com/janraasch
119
+ [@jcarbo]: https://github.com/jcarbo
120
+ [@oneamtu]: https://github.com/oneamtu
121
+ [@toy]: https://github.com/toy
122
+ [@Koronen]: https://github.com/Koronen
123
+ [@blainesch]: https://github.com/blainesch
124
+ [@marxarelli]: https://github.com/marxarelli
125
+ [@katieschilling]: https://github.com/katieschilling
126
+ [@kakutani]: https://github.com/kakutani
127
+ [@rrosenblum]: https://github.com/rrosenblum
128
+ [@mattjmcnaughton]: https://github.com/mattjmcnaughton
129
+ [@huerlisi]: https://github.com/huerlisi
130
+ [@volkert]: https://github.com/volkert
131
+ [@lumeet]: https://github.com/lumeet
132
+ [@mmozuras]: https://github.com/mmozuras
133
+ [@d4rk5eed]: https://github.com/d4rk5eed
134
+ [@cshaffer]: https://github.com/cshaffer
135
+ [@eitoball]: https://github.com/eitoball
136
+ [@iainbeeston]: https://github.com/iainbeeston
137
+ [@pimterry]: https://github.com/pimterry
138
+ [@palkan]: https://github.com/palkan
139
+ [@jdoconnor]: https://github.com/jdoconnor
140
+ [@meganemura]: https://github.com/meganemura
141
+ [@zvkemp]: https://github.com/zvkemp
142
+ [@vassilevsky]: https://github.com/vassilevsky
143
+ [@gerry3]: https://github.com/gerry3
144
+ [@ypresto]: https://github.com/ypresto
145
+ [@clowder]: https://github.com/clowder
146
+ [@mudge]: https://github.com/mudge
147
+ [@mzp]: https://github.com/mzp
148
+ [@bankair]: https://github.com/bankair
149
+ [@crimsonknave]: https://github.com/crimsonknave
150
+ [@renuo]: https://github.com/renuo
151
+ [@sdeframond]: https://github.com/sdeframond
152
+ [@til]: https://github.com/til
153
+ [@carhartl]: https://github.com/carhartl
154
+ [@dylandavidson]: https://github.com/dylandavidson
155
+ [@tmr08c]: https://github.com/tmr08c
156
+ [@hbd225]: https://github.com/hbd225
157
+ [@l8nite]: https://github.com/l8nite
158
+ [@sumeet]: https://github.com/sumeet
159
+ [@ojab]: https://github.com/ojab
160
+ [@chastell]: https://github.com/chastell
161
+ [@glasnt]: https://github.com/glasnt
162
+ [@crazydog115]: https://github.com/crazydog115
163
+ [@RGBD]: https://github.com/RGBD
164
+ [@panthomakos]: https://github.com/panthomakos
165
+ [@matugm]: https://github.com/matugm
166
+ [@m1foley]: https://github.com/m1foley
167
+ [@tejasbubane]: https://github.com/tejasbubane
168
+ [@bmorrall]: https://github.com/bmorrall
169
+ [@fphilipe]: https://github.com/fphilipe
170
+ [@gotrevor]: https://github.com/gotrevor
171
+ [@awwaiid]: https://github.com/awwaiid
172
+ [@segiddins]: https://github.com/segiddins
173
+ [@urbanautomaton]: https://github.com/urbanautomaton.com
174
+ [@unmanbearpig]: https://github.com/unmanbearpig
175
+ [@maxjacobson]: https://github.com/maxjacobson
176
+ [@sliuu]: https://github.com/sliuu
177
+ [@edmz]: https://github.com/edmz
178
+ [@syndbg]: https://github.com/syndbg
179
+ [@wli]: https://github.com/wli
180
+ [@caseywebdev]: https://github.com/caseywebdev
181
+ [@MGerrior]: https://github.com/MGerrior
182
+ [@imtayadeway]: https://github.com/imtayadeway
@@ -47,5 +47,5 @@ Gem::Specification.new do |s|
47
47
  s.add_development_dependency('rspec', '~> 3.2.0')
48
48
  s.add_development_dependency('yard', '~> 0.8')
49
49
  s.add_development_dependency('bundler', '~> 1.3')
50
- s.add_development_dependency('simplecov', '~> 0.7')
50
+ s.add_development_dependency('simplecov', '~> 0.10')
51
51
  end
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.33.0
4
+ version: 0.34.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: 2015-08-05 00:00:00.000000000 Z
13
+ date: 2015-09-05 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rainbow
@@ -156,14 +156,14 @@ dependencies:
156
156
  requirements:
157
157
  - - "~>"
158
158
  - !ruby/object:Gem::Version
159
- version: '0.7'
159
+ version: '0.10'
160
160
  type: :development
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - "~>"
165
165
  - !ruby/object:Gem::Version
166
- version: '0.7'
166
+ version: '0.10'
167
167
  description: |2
168
168
  Automatic Ruby code style checking tool.
169
169
  Aims to enforce the community-driven Ruby Style Guide.
@@ -208,6 +208,7 @@ files:
208
208
  - lib/rubocop/cop/lint/def_end_alignment.rb
209
209
  - lib/rubocop/cop/lint/deprecated_class_methods.rb
210
210
  - lib/rubocop/cop/lint/duplicate_methods.rb
211
+ - lib/rubocop/cop/lint/duplicated_key.rb
211
212
  - lib/rubocop/cop/lint/each_with_object_argument.rb
212
213
  - lib/rubocop/cop/lint/else_layout.rb
213
214
  - lib/rubocop/cop/lint/empty_ensure.rb
@@ -266,6 +267,7 @@ files:
266
267
  - lib/rubocop/cop/mixin/end_keyword_alignment.rb
267
268
  - lib/rubocop/cop/mixin/if_node.rb
268
269
  - lib/rubocop/cop/mixin/method_complexity.rb
270
+ - lib/rubocop/cop/mixin/method_preference.rb
269
271
  - lib/rubocop/cop/mixin/min_body_length.rb
270
272
  - lib/rubocop/cop/mixin/negative_conditional.rb
271
273
  - lib/rubocop/cop/mixin/on_method_def.rb
@@ -282,6 +284,7 @@ files:
282
284
  - lib/rubocop/cop/mixin/surrounding_space.rb
283
285
  - lib/rubocop/cop/mixin/unused_argument.rb
284
286
  - lib/rubocop/cop/offense.rb
287
+ - lib/rubocop/cop/performance/case_when_splat.rb
285
288
  - lib/rubocop/cop/performance/count.rb
286
289
  - lib/rubocop/cop/performance/detect.rb
287
290
  - lib/rubocop/cop/performance/flat_map.rb
@@ -389,6 +392,7 @@ files:
389
392
  - lib/rubocop/cop/style/multiline_if_then.rb
390
393
  - lib/rubocop/cop/style/multiline_operation_indentation.rb
391
394
  - lib/rubocop/cop/style/multiline_ternary_operator.rb
395
+ - lib/rubocop/cop/style/mutable_constant.rb
392
396
  - lib/rubocop/cop/style/negated_if.rb
393
397
  - lib/rubocop/cop/style/negated_while.rb
394
398
  - lib/rubocop/cop/style/nested_ternary_operator.rb
@@ -411,6 +415,7 @@ files:
411
415
  - lib/rubocop/cop/style/raise_args.rb
412
416
  - lib/rubocop/cop/style/redundant_begin.rb
413
417
  - lib/rubocop/cop/style/redundant_exception.rb
418
+ - lib/rubocop/cop/style/redundant_freeze.rb
414
419
  - lib/rubocop/cop/style/redundant_return.rb
415
420
  - lib/rubocop/cop/style/redundant_self.rb
416
421
  - lib/rubocop/cop/style/regexp_literal.rb
@@ -446,6 +451,7 @@ files:
446
451
  - lib/rubocop/cop/style/special_global_vars.rb
447
452
  - lib/rubocop/cop/style/string_literals.rb
448
453
  - lib/rubocop/cop/style/string_literals_in_interpolation.rb
454
+ - lib/rubocop/cop/style/string_methods.rb
449
455
  - lib/rubocop/cop/style/struct_inheritance.rb
450
456
  - lib/rubocop/cop/style/symbol_array.rb
451
457
  - lib/rubocop/cop/style/symbol_literal.rb
@@ -493,6 +499,7 @@ files:
493
499
  - lib/rubocop/path_util.rb
494
500
  - lib/rubocop/processed_source.rb
495
501
  - lib/rubocop/rake_task.rb
502
+ - lib/rubocop/result_cache.rb
496
503
  - lib/rubocop/runner.rb
497
504
  - lib/rubocop/string_util.rb
498
505
  - lib/rubocop/target_finder.rb
@@ -524,6 +531,7 @@ files:
524
531
  - relnotes/v0.32.0.md
525
532
  - relnotes/v0.32.1.md
526
533
  - relnotes/v0.33.0.md
534
+ - relnotes/v0.34.0.md
527
535
  - rubocop.gemspec
528
536
  homepage: http://github.com/bbatsov/rubocop
529
537
  licenses: