rubocop 0.67.0 → 0.67.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cd2f651847d82c143bc686cdb3f1eb0b8abdf2054ecdc017d0572dfe5a89171e
4
- data.tar.gz: bc59c6c04526cb7caeb6edd33501442082540408857dc16ed9fa757cc446406b
3
+ metadata.gz: 03c624133c90502798d0222665547c79131424bafe7a3a510cd35045436e57df
4
+ data.tar.gz: fb33bcb26137fd6d682c8ae856f6ca9bda7fa3cf382db841366502e82550402b
5
5
  SHA512:
6
- metadata.gz: ef9d7cefbb978c4f9430fa5efc0cd9c45ce7e272d618974cce68e8b426df5c115745ebc5b2e3aeeadc892612a743937157473b9399eca40794a61b0f2a489994
7
- data.tar.gz: 53fa08a90ffc2256b7f667ed9a00892809154192d78d918e8c8db45cd398e2cd156c9b9166c882346035edfc45643d5996dac3b6492e7aae08513b3ec64c43d0
6
+ metadata.gz: 395e690f9116faa81bcef7d436bbd0d86489a694acfb8e011e57705d6264e16f3ff629f7e88af393bfe924cbc61f70c33f8a58aafba67ed2579b28eb2065d2d1
7
+ data.tar.gz: ccfd1658013fc71b1d82f9e1e133a4c8c14a86e50e8b5c48c94217578de87b226f94aaf843f0a97cf103688ba5049ace1b2c6926d9da7b4a5ccee0aad962827d
data/README.md CHANGED
@@ -53,7 +53,7 @@ haven't reached version 1.0 yet). To prevent an unwanted RuboCop update you
53
53
  might want to use a conservative version lock in your `Gemfile`:
54
54
 
55
55
  ```rb
56
- gem 'rubocop', '~> 0.67.0', require: false
56
+ gem 'rubocop', '~> 0.67.1', require: false
57
57
  ```
58
58
 
59
59
  ## Quickstart
@@ -1939,7 +1939,7 @@ Naming/RescuedExceptionsVariableName:
1939
1939
  Description: 'Use consistent rescued exceptions variables naming.'
1940
1940
  Enabled: true
1941
1941
  VersionAdded: '0.67'
1942
- PreferredName: ex
1942
+ PreferredName: e
1943
1943
 
1944
1944
  Naming/UncommunicativeBlockParamName:
1945
1945
  Description: >-
@@ -45,23 +45,21 @@ module RuboCop
45
45
  act_on_options
46
46
  apply_default_formatter
47
47
  execute_runners(paths)
48
- rescue ConfigNotFoundError,
49
- IncorrectCopNameError,
50
- OptionArgumentError => ex
51
- warn ex.message
48
+ rescue ConfigNotFoundError, IncorrectCopNameError, OptionArgumentError => e
49
+ warn e.message
52
50
  STATUS_ERROR
53
- rescue RuboCop::Error => ex
54
- warn Rainbow("Error: #{ex.message}").red
51
+ rescue RuboCop::Error => e
52
+ warn Rainbow("Error: #{e.message}").red
55
53
  STATUS_ERROR
56
54
  rescue Finished
57
55
  STATUS_SUCCESS
58
- rescue OptionParser::InvalidOption => ex
59
- warn ex.message
56
+ rescue OptionParser::InvalidOption => e
57
+ warn e.message
60
58
  warn 'For usage information, use --help'
61
59
  STATUS_ERROR
62
- rescue StandardError, SyntaxError, LoadError => ex
63
- warn ex.message
64
- warn ex.backtrace
60
+ rescue StandardError, SyntaxError, LoadError => e
61
+ warn e.message
62
+ warn e.backtrace
65
63
  STATUS_ERROR
66
64
  end
67
65
  # rubocop:enable Metrics/MethodLength, Metrics/AbcSize
@@ -190,9 +190,9 @@ module RuboCop
190
190
  def gem_config_path(gem_name, relative_config_path)
191
191
  spec = Gem::Specification.find_by_name(gem_name)
192
192
  File.join(spec.gem_dir, relative_config_path)
193
- rescue Gem::LoadError => ex
193
+ rescue Gem::LoadError => e
194
194
  raise Gem::LoadError,
195
- "Unable to find gem #{gem_name}; is the gem installed? #{ex}"
195
+ "Unable to find gem #{gem_name}; is the gem installed? #{e}"
196
196
  end
197
197
  end
198
198
  end
@@ -104,14 +104,14 @@ module RuboCop
104
104
  # cops' `#investigate` methods.
105
105
  def with_cop_error_handling(cop, node = nil)
106
106
  yield
107
- rescue StandardError => ex
108
- raise ex if @options[:raise_error]
107
+ rescue StandardError => e
108
+ raise e if @options[:raise_error]
109
109
 
110
110
  if node
111
111
  line = node.first_line
112
112
  column = node.loc.column
113
113
  end
114
- error = CopError.new(ex, line, column)
114
+ error = CopError.new(e, line, column)
115
115
  @errors[cop] << error
116
116
  end
117
117
  end
@@ -13,7 +13,7 @@ module RuboCop
13
13
  # # bad
14
14
  # begin
15
15
  # # do something
16
- # rescue MyException => exc
16
+ # rescue MyException => exception
17
17
  # # do something
18
18
  # end
19
19
  #
@@ -35,7 +35,7 @@ module RuboCop
35
35
  # # good
36
36
  # begin
37
37
  # # do something
38
- # rescue MyException => ex
38
+ # rescue MyException => exception
39
39
  # # do something
40
40
  # end
41
41
  #
@@ -41,10 +41,10 @@ module RuboCop
41
41
  when Regexp
42
42
  begin
43
43
  path =~ pattern
44
- rescue ArgumentError => ex
45
- return false if ex.message.start_with?('invalid byte sequence')
44
+ rescue ArgumentError => e
45
+ return false if e.message.start_with?('invalid byte sequence')
46
46
 
47
- raise exception
47
+ raise e
48
48
  end
49
49
  end
50
50
  end
@@ -146,8 +146,8 @@ module RuboCop
146
146
 
147
147
  begin
148
148
  @buffer.source = source
149
- rescue EncodingError => ex
150
- @parser_error = ex
149
+ rescue EncodingError => e
150
+ @parser_error = e
151
151
  return
152
152
  end
153
153
 
@@ -47,8 +47,8 @@ module RuboCop
47
47
  generate_request(uri) do |request|
48
48
  begin
49
49
  handle_response(http.request(request), limit, &block)
50
- rescue SocketError => ex
51
- handle_response(ex, limit, &block)
50
+ rescue SocketError => e
51
+ handle_response(e, limit, &block)
52
52
  end
53
53
  end
54
54
  end
@@ -72,10 +72,10 @@ module RuboCop
72
72
  else
73
73
  begin
74
74
  response.error!
75
- rescue StandardError => ex
76
- message = "#{ex.message} while downloading remote config"\
75
+ rescue StandardError => e
76
+ message = "#{e.message} while downloading remote config"\
77
77
  " file #{uri}"
78
- raise ex, message
78
+ raise e, message
79
79
  end
80
80
  end
81
81
  end
@@ -100,9 +100,9 @@ module RuboCop
100
100
 
101
101
  begin
102
102
  FileUtils.mkdir_p(dir)
103
- rescue Errno::EACCES => ex
103
+ rescue Errno::EACCES => e
104
104
  warn "Couldn't create cache directory. Continuing without cache."\
105
- "\n #{ex.message}"
105
+ "\n #{e.message}"
106
106
  return
107
107
  end
108
108
 
@@ -108,8 +108,8 @@ module RuboCop
108
108
  end
109
109
  formatter_set.file_finished(file, offenses)
110
110
  offenses
111
- rescue InfiniteCorrectionLoop => ex
112
- formatter_set.file_finished(file, ex.offenses.compact.sort.freeze)
111
+ rescue InfiniteCorrectionLoop => e
112
+ formatter_set.file_finished(file, e.offenses.compact.sort.freeze)
113
113
  raise
114
114
  end
115
115
 
@@ -145,12 +145,8 @@ module RuboCop
145
145
 
146
146
  first_line = File.open(file, &:readline)
147
147
  !(first_line =~ /#!.*(#{ruby_interpreters(file).join('|')})/).nil?
148
- rescue EOFError, ArgumentError => ex
149
- if debug?
150
- warn(
151
- "Unprocessable file #{file}: #{ex.class}, #{ex.message}"
152
- )
153
- end
148
+ rescue EOFError, ArgumentError => e
149
+ warn("Unprocessable file #{file}: #{e.class}, #{e.message}") if debug?
154
150
 
155
151
  false
156
152
  end
@@ -3,7 +3,7 @@
3
3
  module RuboCop
4
4
  # This module holds the RuboCop version information.
5
5
  module Version
6
- STRING = '0.67.0'.freeze
6
+ STRING = '0.67.1'.freeze
7
7
 
8
8
  MSG = '%<version>s (using Parser %<parser_version>s, running on ' \
9
9
  '%<ruby_engine>s %<ruby_version>s %<ruby_platform>s)'.freeze
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.67.0
4
+ version: 0.67.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bozhidar Batsov