rubocop-performance 1.26.1 → 1.27.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 +4 -4
- data/LICENSE.txt +1 -1
- data/lib/rubocop/cop/mixin.rb +10 -0
- data/lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb +1 -2
- data/lib/rubocop/cop/performance/chain_array_allocation.rb +3 -3
- data/lib/rubocop/cop/performance/collection_literal_in_loop.rb +1 -2
- data/lib/rubocop/cop/performance/compare_with_block.rb +1 -2
- data/lib/rubocop/cop/performance/delete_prefix.rb +1 -2
- data/lib/rubocop/cop/performance/delete_suffix.rb +1 -2
- data/lib/rubocop/cop/performance/map_compact.rb +1 -1
- data/lib/rubocop/cop/performance/map_method_chain.rb +1 -2
- data/lib/rubocop/cop/performance/redundant_sort_block.rb +1 -0
- data/lib/rubocop/cop/performance/regexp_match.rb +4 -2
- data/lib/rubocop/cop/performance/sort_reverse.rb +1 -0
- data/lib/rubocop/cop/performance/squeeze.rb +1 -2
- data/lib/rubocop/cop/performance/string_include.rb +1 -2
- data/lib/rubocop/cop/performance.rb +66 -0
- data/lib/rubocop/cop/performance_cops.rb +4 -55
- data/lib/rubocop/performance/version.rb +1 -1
- data/lib/rubocop-performance.rb +1 -1
- metadata +8 -9
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6494a135c3883af7e141b3dac6baf9e70f6e3d4389c0bb4970110b09693d979a
|
|
4
|
+
data.tar.gz: 46f88529d27b31e92492bd9d12ea117771a8c8adedcf275db9e19e91d3b58839
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fea19be56b1332f4485a443296aaa1e3e3bf32d335aa7490019de1f564edfdf50521a811df5d3856801e6258eb9b24e8d3b930786c4f3af5c20fc4a4449b82a5
|
|
7
|
+
data.tar.gz: 41ae92842e1372e7c546d837759cc60489ca11df8889384a010580ce4ce4666cf1546e19f1c7b2ab275017d88c406d25dbe2d61cb5edf614201398e0f2a7d1cf
|
data/LICENSE.txt
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module RuboCop
|
|
4
|
+
module Cop
|
|
5
|
+
# Autoloads mixin modules included by cops. Mixins are autoloaded to reduce the number of requires
|
|
6
|
+
# because they're used only when the relevant cop class is loaded.
|
|
7
|
+
autoload :RegexpMetacharacter, "#{__dir__}/mixin/regexp_metacharacter"
|
|
8
|
+
autoload :SortBlock, "#{__dir__}/mixin/sort_block"
|
|
9
|
+
end
|
|
10
|
+
end
|
|
@@ -49,7 +49,7 @@ module RuboCop
|
|
|
49
49
|
(send [!nil? ${float_type? str_type?}] :to_d ...)
|
|
50
50
|
PATTERN
|
|
51
51
|
|
|
52
|
-
# rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity, Metrics/MethodLength
|
|
52
|
+
# rubocop:disable-next Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity, Metrics/MethodLength
|
|
53
53
|
def on_send(node)
|
|
54
54
|
if (numeric = big_decimal_with_numeric_argument(node))
|
|
55
55
|
if numeric.numeric_type?
|
|
@@ -75,7 +75,6 @@ module RuboCop
|
|
|
75
75
|
end
|
|
76
76
|
end
|
|
77
77
|
end
|
|
78
|
-
# rubocop:enable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity, Metrics/MethodLength
|
|
79
78
|
end
|
|
80
79
|
end
|
|
81
80
|
end
|
|
@@ -32,9 +32,9 @@ module RuboCop
|
|
|
32
32
|
|
|
33
33
|
# These methods ALWAYS return a new array
|
|
34
34
|
# after they're called it's safe to mutate the resulting array
|
|
35
|
-
ALWAYS_RETURNS_NEW_ARRAY = %i[* + - collect compact drop
|
|
36
|
-
drop_while flatten map
|
|
37
|
-
reverse rotate select shuffle sort
|
|
35
|
+
ALWAYS_RETURNS_NEW_ARRAY = %i[* + - collect collect_concat compact drop
|
|
36
|
+
drop_while filter_map flat_map flatten map
|
|
37
|
+
reject reverse rotate select shuffle sort
|
|
38
38
|
take take_while transpose uniq
|
|
39
39
|
values_at |].to_set.freeze
|
|
40
40
|
|
|
@@ -109,7 +109,7 @@ module RuboCop
|
|
|
109
109
|
|
|
110
110
|
# Since Ruby 3.4, simple arguments to Array#include? are optimized.
|
|
111
111
|
# See https://github.com/ruby/ruby/pull/12123 for more details.
|
|
112
|
-
# rubocop:disable Metrics/CyclomaticComplexity
|
|
112
|
+
# rubocop:disable-next Metrics/CyclomaticComplexity
|
|
113
113
|
def optimized_array_include?(node, method, arguments)
|
|
114
114
|
return false unless target_ruby_version >= 3.4 && node.array_type? && method == :include?
|
|
115
115
|
# Disallow include?(1, 2)
|
|
@@ -125,7 +125,6 @@ module RuboCop
|
|
|
125
125
|
end
|
|
126
126
|
ARRAY_INCLUDE_OPTIMIZED_TYPES.include?(arg.type)
|
|
127
127
|
end
|
|
128
|
-
# rubocop:enable Metrics/CyclomaticComplexity
|
|
129
128
|
|
|
130
129
|
def nonmutable_method_of_array_or_hash?(node, method)
|
|
131
130
|
(node.array_type? && ARRAY_METHODS.include?(method)) ||
|
|
@@ -87,7 +87,7 @@ module RuboCop
|
|
|
87
87
|
true
|
|
88
88
|
end
|
|
89
89
|
|
|
90
|
-
# rubocop:disable Metrics/MethodLength
|
|
90
|
+
# rubocop:disable-next Metrics/MethodLength
|
|
91
91
|
def message(send, method, var_a, var_b, args)
|
|
92
92
|
compare_method = send.method_name
|
|
93
93
|
replacement_method = REPLACEMENT[compare_method]
|
|
@@ -109,7 +109,6 @@ module RuboCop
|
|
|
109
109
|
str_a: str_a,
|
|
110
110
|
str_b: str_b)
|
|
111
111
|
end
|
|
112
|
-
# rubocop:enable Metrics/MethodLength
|
|
113
112
|
|
|
114
113
|
def compare_range(send, node)
|
|
115
114
|
range_between(send.loc.selector.begin_pos, node.loc.end.end_pos)
|
|
@@ -67,7 +67,7 @@ module RuboCop
|
|
|
67
67
|
(call $!nil? ${:gsub :gsub! :sub :sub!} (regexp (str $#literal_at_start?) (regopt)) (str $_))
|
|
68
68
|
PATTERN
|
|
69
69
|
|
|
70
|
-
# rubocop:disable Metrics/AbcSize
|
|
70
|
+
# rubocop:disable-next Metrics/AbcSize
|
|
71
71
|
def on_send(node)
|
|
72
72
|
return unless (receiver, bad_method, regexp_str, replace_string = delete_prefix_candidate?(node))
|
|
73
73
|
return unless replace_string.empty?
|
|
@@ -86,7 +86,6 @@ module RuboCop
|
|
|
86
86
|
corrector.replace(node, new_code)
|
|
87
87
|
end
|
|
88
88
|
end
|
|
89
|
-
# rubocop:enable Metrics/AbcSize
|
|
90
89
|
alias on_csend on_send
|
|
91
90
|
end
|
|
92
91
|
end
|
|
@@ -67,7 +67,7 @@ module RuboCop
|
|
|
67
67
|
(call $!nil? ${:gsub :gsub! :sub :sub!} (regexp (str $#literal_at_end?) (regopt)) (str $_))
|
|
68
68
|
PATTERN
|
|
69
69
|
|
|
70
|
-
# rubocop:disable Metrics/AbcSize
|
|
70
|
+
# rubocop:disable-next Metrics/AbcSize
|
|
71
71
|
def on_send(node)
|
|
72
72
|
return unless (receiver, bad_method, regexp_str, replace_string = delete_suffix_candidate?(node))
|
|
73
73
|
return unless replace_string.empty?
|
|
@@ -86,7 +86,6 @@ module RuboCop
|
|
|
86
86
|
corrector.replace(node, new_code)
|
|
87
87
|
end
|
|
88
88
|
end
|
|
89
|
-
# rubocop:enable Metrics/AbcSize
|
|
90
89
|
alias on_csend on_send
|
|
91
90
|
end
|
|
92
91
|
end
|
|
@@ -69,7 +69,7 @@ module RuboCop
|
|
|
69
69
|
def remove_compact_method(corrector, map_node, compact_node, chained_method)
|
|
70
70
|
compact_method_range = compact_node.loc.selector
|
|
71
71
|
|
|
72
|
-
if compact_node.multiline? && chained_method&.loc
|
|
72
|
+
if compact_node.multiline? && chained_method&.loc?(:selector) && use_dot?(chained_method) &&
|
|
73
73
|
!map_method_and_compact_method_on_same_line?(map_node, compact_node) &&
|
|
74
74
|
!invoke_method_after_map_compact_on_same_line?(compact_node, chained_method)
|
|
75
75
|
compact_method_range = compact_method_with_final_newline_range(compact_method_range)
|
|
@@ -68,7 +68,7 @@ module RuboCop
|
|
|
68
68
|
|
|
69
69
|
private
|
|
70
70
|
|
|
71
|
-
# rubocop:disable Metrics/CyclomaticComplexity
|
|
71
|
+
# rubocop:disable-next Metrics/CyclomaticComplexity
|
|
72
72
|
def find_begin_of_chained_map_method(node, map_args)
|
|
73
73
|
return unless (chained_map_method = node.receiver)
|
|
74
74
|
return if !chained_map_method.call_type? || !RESTRICT_ON_SEND.include?(chained_map_method.method_name)
|
|
@@ -82,7 +82,6 @@ module RuboCop
|
|
|
82
82
|
|
|
83
83
|
find_begin_of_chained_map_method(chained_map_method, map_args)
|
|
84
84
|
end
|
|
85
|
-
# rubocop:enable Metrics/CyclomaticComplexity
|
|
86
85
|
end
|
|
87
86
|
end
|
|
88
87
|
end
|
|
@@ -81,7 +81,7 @@ module RuboCop
|
|
|
81
81
|
# Constants are included in this list because it is unlikely that
|
|
82
82
|
# someone will store `nil` as a constant and then use it for comparison
|
|
83
83
|
TYPES_IMPLEMENTING_MATCH = %i[const regexp str sym].freeze
|
|
84
|
-
MSG = 'Use
|
|
84
|
+
MSG = 'Use `%<negation>smatch?` instead of `%<current>s` when `MatchData` is not used.'
|
|
85
85
|
|
|
86
86
|
def_node_matcher :match_method?, <<~PATTERN
|
|
87
87
|
{
|
|
@@ -175,7 +175,9 @@ module RuboCop
|
|
|
175
175
|
end
|
|
176
176
|
|
|
177
177
|
def message(node)
|
|
178
|
-
|
|
178
|
+
negation = ('!' if node.send_type? && node.method?(:!~))
|
|
179
|
+
|
|
180
|
+
format(MSG, negation: negation, current: node.loc.selector.source)
|
|
179
181
|
end
|
|
180
182
|
|
|
181
183
|
def last_match_used?(match_node)
|
|
@@ -19,6 +19,7 @@ module RuboCop
|
|
|
19
19
|
|
|
20
20
|
MSG = 'Use `%<prefer>s` instead.'
|
|
21
21
|
|
|
22
|
+
# rubocop:disable-next InternalAffairs/ItblockHandler -- `it` block accepts only a single block parameter.
|
|
22
23
|
def on_block(node)
|
|
23
24
|
sort_with_block?(node) do |send, var_a, var_b, body|
|
|
24
25
|
replaceable_body?(body, var_b, var_a) do
|
|
@@ -35,7 +35,7 @@ module RuboCop
|
|
|
35
35
|
(str $_))
|
|
36
36
|
PATTERN
|
|
37
37
|
|
|
38
|
-
# rubocop:disable Metrics/AbcSize
|
|
38
|
+
# rubocop:disable-next Metrics/AbcSize
|
|
39
39
|
def on_send(node)
|
|
40
40
|
squeeze_candidate?(node) do |receiver, bad_method, regexp_str, replace_str|
|
|
41
41
|
regexp_str = regexp_str[0..-2] # delete '+' from the end
|
|
@@ -57,7 +57,6 @@ module RuboCop
|
|
|
57
57
|
end
|
|
58
58
|
end
|
|
59
59
|
end
|
|
60
|
-
# rubocop:enable Metrics/AbcSize
|
|
61
60
|
alias on_csend on_send
|
|
62
61
|
|
|
63
62
|
private
|
|
@@ -33,7 +33,7 @@ module RuboCop
|
|
|
33
33
|
(send (regexp (str $#literal?) (regopt)) :=~ $_)}
|
|
34
34
|
PATTERN
|
|
35
35
|
|
|
36
|
-
# rubocop:disable Metrics/AbcSize
|
|
36
|
+
# rubocop:disable-next Metrics/AbcSize
|
|
37
37
|
def on_send(node)
|
|
38
38
|
return unless (receiver, regex_str = redundant_regex?(node))
|
|
39
39
|
|
|
@@ -50,7 +50,6 @@ module RuboCop
|
|
|
50
50
|
corrector.replace(node, new_source)
|
|
51
51
|
end
|
|
52
52
|
end
|
|
53
|
-
# rubocop:enable Metrics/AbcSize
|
|
54
53
|
alias on_csend on_send
|
|
55
54
|
alias on_match_with_lvasgn on_send
|
|
56
55
|
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative 'mixin'
|
|
4
|
+
|
|
5
|
+
module RuboCop
|
|
6
|
+
module Cop
|
|
7
|
+
# Cops for the `Performance` department. The department's cops are registered for lazy loading
|
|
8
|
+
# and their files are loaded on demand.
|
|
9
|
+
module Performance
|
|
10
|
+
extend LazyLoader
|
|
11
|
+
|
|
12
|
+
register_cop :AncestorsInclude, "#{__dir__}/performance/ancestors_include"
|
|
13
|
+
register_cop :ArraySemiInfiniteRangeSlice, "#{__dir__}/performance/array_semi_infinite_range_slice"
|
|
14
|
+
register_cop :BigDecimalWithNumericArgument, "#{__dir__}/performance/big_decimal_with_numeric_argument"
|
|
15
|
+
register_cop :BindCall, "#{__dir__}/performance/bind_call"
|
|
16
|
+
register_cop :BlockGivenWithExplicitBlock, "#{__dir__}/performance/block_given_with_explicit_block"
|
|
17
|
+
register_cop :Caller, "#{__dir__}/performance/caller"
|
|
18
|
+
register_cop :CaseWhenSplat, "#{__dir__}/performance/case_when_splat"
|
|
19
|
+
register_cop :Casecmp, "#{__dir__}/performance/casecmp"
|
|
20
|
+
register_cop :CollectionLiteralInLoop, "#{__dir__}/performance/collection_literal_in_loop"
|
|
21
|
+
register_cop :CompareWithBlock, "#{__dir__}/performance/compare_with_block"
|
|
22
|
+
register_cop :ConcurrentMonotonicTime, "#{__dir__}/performance/concurrent_monotonic_time"
|
|
23
|
+
register_cop :ConstantRegexp, "#{__dir__}/performance/constant_regexp"
|
|
24
|
+
register_cop :Count, "#{__dir__}/performance/count"
|
|
25
|
+
register_cop :DeletePrefix, "#{__dir__}/performance/delete_prefix"
|
|
26
|
+
register_cop :DeleteSuffix, "#{__dir__}/performance/delete_suffix"
|
|
27
|
+
register_cop :Detect, "#{__dir__}/performance/detect"
|
|
28
|
+
register_cop :DoubleStartEndWith, "#{__dir__}/performance/double_start_end_with"
|
|
29
|
+
register_cop :EndWith, "#{__dir__}/performance/end_with"
|
|
30
|
+
register_cop :FixedSize, "#{__dir__}/performance/fixed_size"
|
|
31
|
+
register_cop :FlatMap, "#{__dir__}/performance/flat_map"
|
|
32
|
+
register_cop :InefficientHashSearch, "#{__dir__}/performance/inefficient_hash_search"
|
|
33
|
+
register_cop :MapCompact, "#{__dir__}/performance/map_compact"
|
|
34
|
+
register_cop :MapMethodChain, "#{__dir__}/performance/map_method_chain"
|
|
35
|
+
register_cop :MethodObjectAsBlock, "#{__dir__}/performance/method_object_as_block"
|
|
36
|
+
register_cop :OpenStruct, "#{__dir__}/performance/open_struct"
|
|
37
|
+
register_cop :RangeInclude, "#{__dir__}/performance/range_include"
|
|
38
|
+
register_cop :IoReadlines, "#{__dir__}/performance/io_readlines"
|
|
39
|
+
register_cop :RedundantBlockCall, "#{__dir__}/performance/redundant_block_call"
|
|
40
|
+
register_cop :RedundantEqualityComparisonBlock, "#{__dir__}/performance/redundant_equality_comparison_block"
|
|
41
|
+
register_cop :RedundantMatch, "#{__dir__}/performance/redundant_match"
|
|
42
|
+
register_cop :RedundantMerge, "#{__dir__}/performance/redundant_merge"
|
|
43
|
+
register_cop :RedundantSortBlock, "#{__dir__}/performance/redundant_sort_block"
|
|
44
|
+
register_cop :RedundantSplitRegexpArgument, "#{__dir__}/performance/redundant_split_regexp_argument"
|
|
45
|
+
register_cop :RedundantStringChars, "#{__dir__}/performance/redundant_string_chars"
|
|
46
|
+
register_cop :RegexpMatch, "#{__dir__}/performance/regexp_match"
|
|
47
|
+
register_cop :ReverseEach, "#{__dir__}/performance/reverse_each"
|
|
48
|
+
register_cop :ReverseFirst, "#{__dir__}/performance/reverse_first"
|
|
49
|
+
register_cop :SelectMap, "#{__dir__}/performance/select_map"
|
|
50
|
+
register_cop :Size, "#{__dir__}/performance/size"
|
|
51
|
+
register_cop :SortReverse, "#{__dir__}/performance/sort_reverse"
|
|
52
|
+
register_cop :Squeeze, "#{__dir__}/performance/squeeze"
|
|
53
|
+
register_cop :StringBytesize, "#{__dir__}/performance/string_bytesize"
|
|
54
|
+
register_cop :StartWith, "#{__dir__}/performance/start_with"
|
|
55
|
+
register_cop :StringIdentifierArgument, "#{__dir__}/performance/string_identifier_argument"
|
|
56
|
+
register_cop :StringInclude, "#{__dir__}/performance/string_include"
|
|
57
|
+
register_cop :StringReplacement, "#{__dir__}/performance/string_replacement"
|
|
58
|
+
register_cop :Sum, "#{__dir__}/performance/sum"
|
|
59
|
+
register_cop :TimesMap, "#{__dir__}/performance/times_map"
|
|
60
|
+
register_cop :UnfreezeString, "#{__dir__}/performance/unfreeze_string"
|
|
61
|
+
register_cop :UriDefaultParser, "#{__dir__}/performance/uri_default_parser"
|
|
62
|
+
register_cop :ChainArrayAllocation, "#{__dir__}/performance/chain_array_allocation"
|
|
63
|
+
register_cop :ZipWithoutBlock, "#{__dir__}/performance/zip_without_block"
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
@@ -1,57 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
require_relative 'performance
|
|
7
|
-
require_relative 'performance/array_semi_infinite_range_slice'
|
|
8
|
-
require_relative 'performance/big_decimal_with_numeric_argument'
|
|
9
|
-
require_relative 'performance/bind_call'
|
|
10
|
-
require_relative 'performance/block_given_with_explicit_block'
|
|
11
|
-
require_relative 'performance/caller'
|
|
12
|
-
require_relative 'performance/case_when_splat'
|
|
13
|
-
require_relative 'performance/casecmp'
|
|
14
|
-
require_relative 'performance/collection_literal_in_loop'
|
|
15
|
-
require_relative 'performance/compare_with_block'
|
|
16
|
-
require_relative 'performance/concurrent_monotonic_time'
|
|
17
|
-
require_relative 'performance/constant_regexp'
|
|
18
|
-
require_relative 'performance/count'
|
|
19
|
-
require_relative 'performance/delete_prefix'
|
|
20
|
-
require_relative 'performance/delete_suffix'
|
|
21
|
-
require_relative 'performance/detect'
|
|
22
|
-
require_relative 'performance/double_start_end_with'
|
|
23
|
-
require_relative 'performance/end_with'
|
|
24
|
-
require_relative 'performance/fixed_size'
|
|
25
|
-
require_relative 'performance/flat_map'
|
|
26
|
-
require_relative 'performance/inefficient_hash_search'
|
|
27
|
-
require_relative 'performance/map_compact'
|
|
28
|
-
require_relative 'performance/map_method_chain'
|
|
29
|
-
require_relative 'performance/method_object_as_block'
|
|
30
|
-
require_relative 'performance/open_struct'
|
|
31
|
-
require_relative 'performance/range_include'
|
|
32
|
-
require_relative 'performance/io_readlines'
|
|
33
|
-
require_relative 'performance/redundant_block_call'
|
|
34
|
-
require_relative 'performance/redundant_equality_comparison_block'
|
|
35
|
-
require_relative 'performance/redundant_match'
|
|
36
|
-
require_relative 'performance/redundant_merge'
|
|
37
|
-
require_relative 'performance/redundant_sort_block'
|
|
38
|
-
require_relative 'performance/redundant_split_regexp_argument'
|
|
39
|
-
require_relative 'performance/redundant_string_chars'
|
|
40
|
-
require_relative 'performance/regexp_match'
|
|
41
|
-
require_relative 'performance/reverse_each'
|
|
42
|
-
require_relative 'performance/reverse_first'
|
|
43
|
-
require_relative 'performance/select_map'
|
|
44
|
-
require_relative 'performance/size'
|
|
45
|
-
require_relative 'performance/sort_reverse'
|
|
46
|
-
require_relative 'performance/squeeze'
|
|
47
|
-
require_relative 'performance/string_bytesize'
|
|
48
|
-
require_relative 'performance/start_with'
|
|
49
|
-
require_relative 'performance/string_identifier_argument'
|
|
50
|
-
require_relative 'performance/string_include'
|
|
51
|
-
require_relative 'performance/string_replacement'
|
|
52
|
-
require_relative 'performance/sum'
|
|
53
|
-
require_relative 'performance/times_map'
|
|
54
|
-
require_relative 'performance/unfreeze_string'
|
|
55
|
-
require_relative 'performance/uri_default_parser'
|
|
56
|
-
require_relative 'performance/chain_array_allocation'
|
|
57
|
-
require_relative 'performance/zip_without_block'
|
|
3
|
+
# @deprecated This file is deprecated. Cops are registered for lazy loading in
|
|
4
|
+
# `rubocop/cop/performance`; this file is kept for compatibility with code
|
|
5
|
+
# that requires it directly.
|
|
6
|
+
require_relative 'performance'
|
data/lib/rubocop-performance.rb
CHANGED
|
@@ -5,7 +5,7 @@ require 'rubocop'
|
|
|
5
5
|
require_relative 'rubocop/performance'
|
|
6
6
|
require_relative 'rubocop/performance/version'
|
|
7
7
|
require_relative 'rubocop/performance/plugin'
|
|
8
|
-
require_relative 'rubocop/cop/
|
|
8
|
+
require_relative 'rubocop/cop/performance'
|
|
9
9
|
|
|
10
10
|
autocorrect_incompatible_with_block_given_with_explicit_block = Module.new do
|
|
11
11
|
def autocorrect_incompatible_with
|
metadata
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rubocop-performance
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.27.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Bozhidar Batsov
|
|
8
8
|
- Jonas Arvidsson
|
|
9
9
|
- Yuji Nakayama
|
|
10
|
-
autorequire:
|
|
11
10
|
bindir: bin
|
|
12
11
|
cert_chain: []
|
|
13
|
-
date:
|
|
12
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
14
13
|
dependencies:
|
|
15
14
|
- !ruby/object:Gem::Dependency
|
|
16
15
|
name: lint_roller
|
|
@@ -32,7 +31,7 @@ dependencies:
|
|
|
32
31
|
requirements:
|
|
33
32
|
- - ">="
|
|
34
33
|
- !ruby/object:Gem::Version
|
|
35
|
-
version: 1.
|
|
34
|
+
version: 1.89.0
|
|
36
35
|
- - "<"
|
|
37
36
|
- !ruby/object:Gem::Version
|
|
38
37
|
version: '2.0'
|
|
@@ -42,7 +41,7 @@ dependencies:
|
|
|
42
41
|
requirements:
|
|
43
42
|
- - ">="
|
|
44
43
|
- !ruby/object:Gem::Version
|
|
45
|
-
version: 1.
|
|
44
|
+
version: 1.89.0
|
|
46
45
|
- - "<"
|
|
47
46
|
- !ruby/object:Gem::Version
|
|
48
47
|
version: '2.0'
|
|
@@ -81,8 +80,10 @@ files:
|
|
|
81
80
|
- config/default.yml
|
|
82
81
|
- config/obsoletion.yml
|
|
83
82
|
- lib/rubocop-performance.rb
|
|
83
|
+
- lib/rubocop/cop/mixin.rb
|
|
84
84
|
- lib/rubocop/cop/mixin/regexp_metacharacter.rb
|
|
85
85
|
- lib/rubocop/cop/mixin/sort_block.rb
|
|
86
|
+
- lib/rubocop/cop/performance.rb
|
|
86
87
|
- lib/rubocop/cop/performance/ancestors_include.rb
|
|
87
88
|
- lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb
|
|
88
89
|
- lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb
|
|
@@ -146,11 +147,10 @@ metadata:
|
|
|
146
147
|
homepage_uri: https://docs.rubocop.org/rubocop-performance/
|
|
147
148
|
changelog_uri: https://github.com/rubocop/rubocop-performance/blob/master/CHANGELOG.md
|
|
148
149
|
source_code_uri: https://github.com/rubocop/rubocop-performance/
|
|
149
|
-
documentation_uri: https://docs.rubocop.org/rubocop-performance/1.
|
|
150
|
+
documentation_uri: https://docs.rubocop.org/rubocop-performance/1.27/
|
|
150
151
|
bug_tracker_uri: https://github.com/rubocop/rubocop-performance/issues
|
|
151
152
|
rubygems_mfa_required: 'true'
|
|
152
153
|
default_lint_roller_plugin: RuboCop::Performance::Plugin
|
|
153
|
-
post_install_message:
|
|
154
154
|
rdoc_options: []
|
|
155
155
|
require_paths:
|
|
156
156
|
- lib
|
|
@@ -165,8 +165,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
165
165
|
- !ruby/object:Gem::Version
|
|
166
166
|
version: '0'
|
|
167
167
|
requirements: []
|
|
168
|
-
rubygems_version:
|
|
169
|
-
signing_key:
|
|
168
|
+
rubygems_version: 4.0.3
|
|
170
169
|
specification_version: 4
|
|
171
170
|
summary: Automatic performance checking tool for Ruby code.
|
|
172
171
|
test_files: []
|