rubocop-ast 1.14.0 → 1.16.0

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: 1693e1ea234859e4e84ac9ff85465e2779d1588aa82593e41e2fe1348611a286
4
- data.tar.gz: d8fee8a82d5fa065c29f8801979d4a90a45b4fb8ac25ee9b8dc0f3c44da07c20
3
+ metadata.gz: e65c7ca3cc4f7a4345d3584be2d2f1ed5ddb737c6c9dd9698c61ee8082041439
4
+ data.tar.gz: b5c6e4a5e460af4a8c4fd5e8941f2a997b94dbffcd54b53549c9147ec7cd9dcc
5
5
  SHA512:
6
- metadata.gz: 6219c5798d3f7a9f8cf40a3ee1e85754547ae2ded2b037a4847811db03b575d558e183919bab53c11b824cca19d012846aa9b3e6d208fb217729a54c0b0cd4b1
7
- data.tar.gz: 1b2db6a28cb91be686411c52de1af8b1dcceb09c1726e173a7d3d91c0c5384cfa6ac165fb12110e01156496b2b64da37998828eb1752423230ff64091a2fadd3
6
+ metadata.gz: e422e89790ad586e0d26d8af780a15d14c892830c550a5f536e349ac46be76348760cf4f837be42fea912910db9ea2923c47d09d5e854b6ca2fb0fb72e3ebd8f
7
+ data.tar.gz: e7c2c6af704a97d5102a96304eec899f63edc2a5d4eabe656205324a8e5aae4237851e6d16665dbc51a8023bd370d1090cee35ab0c6fdb36a48801a1719afb5d
@@ -62,6 +62,13 @@ module RuboCop
62
62
  def value_on_new_line?
63
63
  key.loc.line != value.loc.line
64
64
  end
65
+
66
+ # Checks whether the `pair` uses hash value omission.
67
+ #
68
+ # @return [Boolean] whether this `pair` uses hash value omission
69
+ def value_omission?
70
+ source.end_with?(':')
71
+ end
65
72
  end
66
73
  end
67
74
  end
@@ -274,7 +274,7 @@ module RuboCop
274
274
 
275
275
  # @!method receiver(node = self)
276
276
  def_node_matcher :receiver, <<~PATTERN
277
- {(send $_ ...) ({block numblock} (send $_ ...) ...)}
277
+ {(send $_ ...) ({block numblock} (call $_ ...) ...)}
278
278
  PATTERN
279
279
 
280
280
  # @!method str_content(node = self)
@@ -12,7 +12,7 @@ class RuboCop::AST::NodePattern::LexerRex
12
12
 
13
13
  macros
14
14
  CONST_NAME /[A-Z:][a-zA-Z_:]+/
15
- SYMBOL_NAME /[\w+@*\/?!<>=~|%^-]+|\[\]=?/
15
+ SYMBOL_NAME /[\w+@*\/?!<>=~|%^&-]+|\[\]=?/
16
16
  IDENTIFIER /[a-z][a-zA-Z0-9_]*/
17
17
  NODE_TYPE /[a-z][a-zA-Z0-9_-]*/ # Same as identifier but allows '-'
18
18
  CALL /(?:#{CONST_NAME}\.)?#{IDENTIFIER}[!?]?/
@@ -25,7 +25,7 @@ class RuboCop::AST::NodePattern::LexerRex
25
25
 
26
26
  # :stopdoc:
27
27
  CONST_NAME = /[A-Z:][a-zA-Z_:]+/
28
- SYMBOL_NAME = /[\w+@*\/?!<>=~|%^-]+|\[\]=?/
28
+ SYMBOL_NAME = /[\w+@*\/?!<>=~|%^&-]+|\[\]=?/
29
29
  IDENTIFIER = /[a-z][a-zA-Z0-9_]*/
30
30
  NODE_TYPE = /[a-z][a-zA-Z0-9_-]*/
31
31
  CALL = /(?:#{CONST_NAME}\.)?#{IDENTIFIER}[!?]?/
@@ -226,7 +226,7 @@ module RuboCop
226
226
  [ast, comments, tokens]
227
227
  end
228
228
 
229
- # rubocop:disable Metrics/MethodLength
229
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/MethodLength
230
230
  def parser_class(ruby_version)
231
231
  case ruby_version
232
232
  when 2.4
@@ -247,12 +247,15 @@ module RuboCop
247
247
  when 3.1
248
248
  require 'parser/ruby31'
249
249
  Parser::Ruby31
250
+ when 3.2
251
+ require 'parser/ruby32'
252
+ Parser::Ruby32
250
253
  else
251
254
  raise ArgumentError,
252
255
  "RuboCop found unknown Ruby version: #{ruby_version.inspect}"
253
256
  end
254
257
  end
255
- # rubocop:enable Metrics/MethodLength
258
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/MethodLength
256
259
 
257
260
  def create_parser(ruby_version)
258
261
  builder = RuboCop::AST::Builder.new
@@ -3,7 +3,7 @@
3
3
  module RuboCop
4
4
  module AST
5
5
  module Version
6
- STRING = '1.14.0'
6
+ STRING = '1.16.0'
7
7
  end
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-ast
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.14.0
4
+ version: 1.16.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: 2021-12-02 00:00:00.000000000 Z
13
+ date: 2022-02-22 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: parser
@@ -18,14 +18,14 @@ dependencies:
18
18
  requirements:
19
19
  - - ">="
20
20
  - !ruby/object:Gem::Version
21
- version: 3.0.1.1
21
+ version: 3.1.1.0
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - ">="
27
27
  - !ruby/object:Gem::Version
28
- version: 3.0.1.1
28
+ version: 3.1.1.0
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: bundler
31
31
  requirement: !ruby/object:Gem::Requirement
@@ -175,7 +175,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
175
175
  - !ruby/object:Gem::Version
176
176
  version: '0'
177
177
  requirements: []
178
- rubygems_version: 3.2.3
178
+ rubygems_version: 3.3.3
179
179
  signing_key:
180
180
  specification_version: 4
181
181
  summary: RuboCop tools to deal with Ruby code AST.