rubocop 1.63.0 → 1.63.1
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 +4 -4
- data/lib/rubocop/cop/lint/assignment_in_condition.rb +3 -1
- data/lib/rubocop/cop/lint/empty_conditional_body.rb +1 -1
- data/lib/rubocop/cop/lint/non_deterministic_require_order.rb +1 -1
- data/lib/rubocop/cop/style/eval_with_location.rb +1 -1
- data/lib/rubocop/cop/style/require_order.rb +1 -1
- data/lib/rubocop/lockfile.rb +14 -5
- data/lib/rubocop/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2e73eb2f54012899b388f6a92a079c80233fe1dfc570abfeedf2091cb0abc71d
|
4
|
+
data.tar.gz: cc1ef25acb1541f1873ebeb945254c430b175b468bc9645000008a5f7d9aea88
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c4a4d23a528df832913cd6e469942415f2e9af4b2c8893862f7cd2dada8da960f8fbd3525934ab325d290a0161a576c38318222edc55e26a150596ca99235d11
|
7
|
+
data.tar.gz: c84f81ba55dd33a44a42ea9851d910738e8faffc3a02b0e6095eb17b17e4e1bf5fa90a0db5aac365a58bde4ff748782f6d6941575fb506122bc4afd2627b966c
|
@@ -88,7 +88,9 @@ module RuboCop
|
|
88
88
|
end
|
89
89
|
|
90
90
|
def skip_children?(asgn_node)
|
91
|
-
|
91
|
+
(asgn_node.call_type? && !asgn_node.assignment_method?) ||
|
92
|
+
empty_condition?(asgn_node) ||
|
93
|
+
(safe_assignment_allowed? && safe_assignment?(asgn_node))
|
92
94
|
end
|
93
95
|
|
94
96
|
def traverse_node(node, &block)
|
@@ -146,7 +146,7 @@ module RuboCop
|
|
146
146
|
node.source_range.with(end_pos: node.condition.source_range.end_pos)
|
147
147
|
elsif all_branches_body_missing?(node)
|
148
148
|
if_node = node.ancestors.detect(&:if?)
|
149
|
-
node.source_range.
|
149
|
+
node.source_range.join(if_node.loc.end.end)
|
150
150
|
else
|
151
151
|
node.source_range
|
152
152
|
end
|
@@ -130,7 +130,7 @@ module RuboCop
|
|
130
130
|
# @return [Parser::Source::Range]
|
131
131
|
#
|
132
132
|
def last_arg_range(node)
|
133
|
-
node.last_argument.source_range.
|
133
|
+
node.last_argument.source_range.join(node.arguments[-2].source_range.end)
|
134
134
|
end
|
135
135
|
|
136
136
|
def unsorted_dir_loop?(node)
|
@@ -131,7 +131,7 @@ module RuboCop
|
|
131
131
|
end
|
132
132
|
|
133
133
|
def in_same_section?(node1, node2)
|
134
|
-
!node1.source_range.
|
134
|
+
!node1.source_range.join(node2.source_range.end).source.include?("\n\n")
|
135
135
|
end
|
136
136
|
end
|
137
137
|
end
|
data/lib/rubocop/lockfile.rb
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
begin
|
4
|
+
require 'bundler'
|
5
|
+
rescue LoadError
|
6
|
+
nil
|
7
|
+
end
|
8
|
+
|
3
9
|
module RuboCop
|
4
10
|
# Encapsulation of a lockfile for use when checking for gems.
|
5
11
|
# Does not actually resolve gems, just parses the lockfile.
|
@@ -59,12 +65,15 @@ module RuboCop
|
|
59
65
|
# @return [Bundler::LockfileParser, nil]
|
60
66
|
def parser
|
61
67
|
return @parser if defined?(@parser)
|
62
|
-
return unless @lockfile_path
|
63
68
|
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
69
|
+
@parser = if defined?(::Bundler) && @lockfile_path
|
70
|
+
begin
|
71
|
+
lockfile = ::Bundler.read_file(@lockfile_path)
|
72
|
+
lockfile ? ::Bundler::LockfileParser.new(lockfile) : nil
|
73
|
+
rescue ::Bundler::BundlerError
|
74
|
+
nil
|
75
|
+
end
|
76
|
+
end
|
68
77
|
end
|
69
78
|
end
|
70
79
|
end
|
data/lib/rubocop/version.rb
CHANGED
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: 1.63.
|
4
|
+
version: 1.63.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bozhidar Batsov
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2024-04-
|
13
|
+
date: 2024-04-10 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: json
|
@@ -1032,7 +1032,7 @@ licenses:
|
|
1032
1032
|
- MIT
|
1033
1033
|
metadata:
|
1034
1034
|
homepage_uri: https://rubocop.org/
|
1035
|
-
changelog_uri: https://github.com/rubocop/rubocop/releases/tag/v1.63.
|
1035
|
+
changelog_uri: https://github.com/rubocop/rubocop/releases/tag/v1.63.1
|
1036
1036
|
source_code_uri: https://github.com/rubocop/rubocop/
|
1037
1037
|
documentation_uri: https://docs.rubocop.org/rubocop/1.63/
|
1038
1038
|
bug_tracker_uri: https://github.com/rubocop/rubocop/issues
|