rubocop-ast 1.15.1 → 1.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 267bd60200cc411795e6c3dadcb9674a3b152144f1516cefba894ba7241e13d6
|
4
|
+
data.tar.gz: 1e2b83c59fb18af18c99debfcda585f670dafbba5d7ba6031d45080f9eb3bca5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c4871cb6d6ac715e84670c52b7534bac124abf0ddf267ba8305071dbec56ffda396e73fe2e92a65acf817a9131218f59ce0f428b0d59f9d53643e840f911090
|
7
|
+
data.tar.gz: f68f78643f318518f4c20d088d267b64f43a34cb59262487b2479b66e5bb63ee5f46cc11e8ffb033e26433df29ed090cef6202ffcd7b995700010d26d2cd0922
|
data/lib/rubocop/ast/node.rb
CHANGED
@@ -57,7 +57,7 @@ module RuboCop
|
|
57
57
|
# @api private
|
58
58
|
BASIC_CONDITIONALS = %i[if while until].to_set.freeze
|
59
59
|
# @api private
|
60
|
-
CONDITIONALS = (BASIC_CONDITIONALS + [
|
60
|
+
CONDITIONALS = (BASIC_CONDITIONALS + %i[case case_match]).freeze
|
61
61
|
# @api private
|
62
62
|
POST_CONDITION_LOOP_TYPES = %i[while_post until_post].to_set.freeze
|
63
63
|
# @api private
|
@@ -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
|
data/lib/rubocop/ast/version.rb
CHANGED
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.
|
4
|
+
version: 1.17.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:
|
13
|
+
date: 2022-04-09 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.
|
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.
|
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.
|
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.
|