lunchmoney 1.2.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/build_and_publish_yard_docs.yml +1 -1
- data/.github/workflows/check_pipeline.yml +2 -2
- data/.github/workflows/ci.yml +1 -1
- data/.github/workflows/{dependabot-rbi-updater.yml → rbi-updater.yml} +2 -3
- data/Gemfile +1 -1
- data/Gemfile.lock +25 -28
- data/lib/lunchmoney/objects/user.rb +4 -1
- data/lib/lunchmoney/version.rb +1 -1
- data/sorbet/rbi/dsl/active_support/callbacks.rbi +1 -0
- data/sorbet/rbi/gems/{dotenv@3.1.0.rbi → dotenv@3.1.2.rbi} +20 -17
- data/sorbet/rbi/gems/{json@2.7.1.rbi → json@2.7.2.rbi} +72 -72
- data/sorbet/rbi/gems/{mocha@2.1.0.rbi → mocha@2.2.0.rbi} +149 -113
- data/sorbet/rbi/gems/{prism@0.24.0.rbi → prism@0.29.0.rbi} +19135 -12188
- data/sorbet/rbi/gems/{rbi@0.1.9.rbi → rbi@0.1.13.rbi} +211 -156
- data/sorbet/rbi/gems/{regexp_parser@2.9.0.rbi → regexp_parser@2.9.1.rbi} +1 -0
- data/sorbet/rbi/gems/{rubocop-ast@1.31.2.rbi → rubocop-ast@1.31.3.rbi} +10 -12
- data/sorbet/rbi/gems/{rubocop-sorbet@0.8.0.rbi → rubocop-sorbet@0.8.3.rbi} +142 -74
- data/sorbet/rbi/gems/{rubocop@1.62.1.rbi → rubocop@1.63.5.rbi} +813 -572
- data/sorbet/rbi/gems/{spoom@1.2.4.rbi → spoom@1.3.2.rbi} +1057 -413
- data/sorbet/rbi/gems/{tapioca@0.13.1.rbi → tapioca@0.14.1.rbi} +101 -87
- metadata +16 -18
- data/sorbet/rbi/gems/prettier_print@1.2.1.rbi +0 -951
- data/sorbet/rbi/gems/syntax_tree@6.2.0.rbi +0 -23136
- /data/sorbet/rbi/gems/{parser@3.3.0.5.rbi → parser@3.3.1.0.rbi} +0 -0
@@ -4,6 +4,7 @@
|
|
4
4
|
# This is an autogenerated file for types exported from the `rubocop` gem.
|
5
5
|
# Please instead update this file by running `bin/tapioca gem rubocop`.
|
6
6
|
|
7
|
+
|
7
8
|
class Parser::Source::Comment
|
8
9
|
include ::RuboCop::Ext::Comment
|
9
10
|
end
|
@@ -97,44 +98,44 @@ class RuboCop::CLI
|
|
97
98
|
|
98
99
|
private
|
99
100
|
|
100
|
-
# source://rubocop//lib/rubocop/cli.rb#
|
101
|
+
# source://rubocop//lib/rubocop/cli.rb#156
|
101
102
|
def act_on_options; end
|
102
103
|
|
103
|
-
# source://rubocop//lib/rubocop/cli.rb#
|
104
|
+
# source://rubocop//lib/rubocop/cli.rb#198
|
104
105
|
def apply_default_formatter; end
|
105
106
|
|
106
|
-
# source://rubocop//lib/rubocop/cli.rb#
|
107
|
+
# source://rubocop//lib/rubocop/cli.rb#125
|
107
108
|
def execute_runners; end
|
108
109
|
|
109
|
-
# source://rubocop//lib/rubocop/cli.rb#
|
110
|
+
# source://rubocop//lib/rubocop/cli.rb#182
|
110
111
|
def handle_editor_mode; end
|
111
112
|
|
112
113
|
# @raise [Finished]
|
113
114
|
#
|
114
|
-
# source://rubocop//lib/rubocop/cli.rb#
|
115
|
+
# source://rubocop//lib/rubocop/cli.rb#187
|
115
116
|
def handle_exiting_options; end
|
116
117
|
|
117
|
-
# source://rubocop//lib/rubocop/cli.rb#
|
118
|
+
# source://rubocop//lib/rubocop/cli.rb#144
|
118
119
|
def parallel_by_default!; end
|
119
120
|
|
120
|
-
# source://rubocop//lib/rubocop/cli.rb#
|
121
|
+
# source://rubocop//lib/rubocop/cli.rb#80
|
121
122
|
def profile_if_needed; end
|
122
123
|
|
123
|
-
# source://rubocop//lib/rubocop/cli.rb#
|
124
|
+
# source://rubocop//lib/rubocop/cli.rb#113
|
124
125
|
def require_gem(name); end
|
125
126
|
|
126
|
-
# source://rubocop//lib/rubocop/cli.rb#
|
127
|
+
# source://rubocop//lib/rubocop/cli.rb#121
|
127
128
|
def run_command(name); end
|
128
129
|
|
129
|
-
# source://rubocop//lib/rubocop/cli.rb#
|
130
|
+
# source://rubocop//lib/rubocop/cli.rb#174
|
130
131
|
def set_options_to_config_loader; end
|
131
132
|
|
132
|
-
# source://rubocop//lib/rubocop/cli.rb#
|
133
|
+
# source://rubocop//lib/rubocop/cli.rb#133
|
133
134
|
def suggest_extensions; end
|
134
135
|
|
135
136
|
# @raise [OptionArgumentError]
|
136
137
|
#
|
137
|
-
# source://rubocop//lib/rubocop/cli.rb#
|
138
|
+
# source://rubocop//lib/rubocop/cli.rb#137
|
138
139
|
def validate_options_vs_config; end
|
139
140
|
end
|
140
141
|
|
@@ -744,6 +745,11 @@ class RuboCop::CachedData
|
|
744
745
|
# source://rubocop//lib/rubocop/cached_data.rb#47
|
745
746
|
def deserialize_offenses(offenses); end
|
746
747
|
|
748
|
+
# @api private
|
749
|
+
#
|
750
|
+
# source://rubocop//lib/rubocop/cached_data.rb#56
|
751
|
+
def location_from_source_buffer(offense, source_buffer); end
|
752
|
+
|
747
753
|
# @api private
|
748
754
|
#
|
749
755
|
# source://rubocop//lib/rubocop/cached_data.rb#40
|
@@ -999,7 +1005,9 @@ class RuboCop::Config
|
|
999
1005
|
# source://rubocop//lib/rubocop/config.rb#237
|
1000
1006
|
def base_dir_for_path_parameters; end
|
1001
1007
|
|
1002
|
-
#
|
1008
|
+
# @return [String, nil]
|
1009
|
+
#
|
1010
|
+
# source://rubocop//lib/rubocop/config.rb#267
|
1003
1011
|
def bundler_lock_file_path; end
|
1004
1012
|
|
1005
1013
|
# source://rubocop//lib/rubocop/config.rb#51
|
@@ -1075,7 +1083,12 @@ class RuboCop::Config
|
|
1075
1083
|
# source://rubocop//lib/rubocop/config.rb#153
|
1076
1084
|
def for_department(department_name); end
|
1077
1085
|
|
1078
|
-
#
|
1086
|
+
# Returns target's locked gem versions (i.e. from Gemfile.lock or gems.locked)
|
1087
|
+
#
|
1088
|
+
# source://rubocop//lib/rubocop/config.rb#292
|
1089
|
+
def gem_versions_in_target; end
|
1090
|
+
|
1091
|
+
# source://rubocop//lib/rubocop/config.rb#296
|
1079
1092
|
def inspect; end
|
1080
1093
|
|
1081
1094
|
# True if this is a config file that is shipped with RuboCop
|
@@ -1120,7 +1133,7 @@ class RuboCop::Config
|
|
1120
1133
|
# source://rubocop//lib/rubocop/config.rb#220
|
1121
1134
|
def patterns_to_include; end
|
1122
1135
|
|
1123
|
-
# source://rubocop//lib/rubocop/config.rb#
|
1136
|
+
# source://rubocop//lib/rubocop/config.rb#278
|
1124
1137
|
def pending_cops; end
|
1125
1138
|
|
1126
1139
|
# Returns true if there's a chance that an Include pattern matches hidden
|
@@ -1166,18 +1179,31 @@ class RuboCop::Config
|
|
1166
1179
|
|
1167
1180
|
private
|
1168
1181
|
|
1169
|
-
# source://rubocop//lib/rubocop/config.rb#
|
1182
|
+
# source://rubocop//lib/rubocop/config.rb#347
|
1170
1183
|
def department_of(qualified_cop_name); end
|
1171
1184
|
|
1172
1185
|
# @return [Boolean]
|
1173
1186
|
#
|
1174
|
-
# source://rubocop//lib/rubocop/config.rb#
|
1187
|
+
# source://rubocop//lib/rubocop/config.rb#335
|
1175
1188
|
def enable_cop?(qualified_cop_name, cop_options); end
|
1176
1189
|
|
1177
|
-
#
|
1190
|
+
# @param gem_version [Gem::Version] an object like `Gem::Version.new("7.1.2.3")`
|
1191
|
+
# @return [Float] The major and minor version, like `7.1`
|
1192
|
+
#
|
1193
|
+
# source://rubocop//lib/rubocop/config.rb#321
|
1194
|
+
def gem_version_to_major_minor_float(gem_version); end
|
1195
|
+
|
1196
|
+
# source://rubocop//lib/rubocop/config.rb#328
|
1197
|
+
def read_gem_versions_from_target_lockfile; end
|
1198
|
+
|
1199
|
+
# @return [Float, nil] The Rails version as a `major.minor` Float.
|
1200
|
+
#
|
1201
|
+
# source://rubocop//lib/rubocop/config.rb#308
|
1178
1202
|
def read_rails_version_from_bundler_lock_file; end
|
1179
1203
|
|
1180
|
-
#
|
1204
|
+
# @return [Float, nil] The Rails version as a `major.minor` Float.
|
1205
|
+
#
|
1206
|
+
# source://rubocop//lib/rubocop/config.rb#303
|
1181
1207
|
def target_rails_version_from_bundler_lock_file; end
|
1182
1208
|
|
1183
1209
|
class << self
|
@@ -2913,18 +2939,18 @@ class RuboCop::Cop::Base
|
|
2913
2939
|
|
2914
2940
|
# @return [Base] a new instance of Base
|
2915
2941
|
#
|
2916
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
2942
|
+
# source://rubocop//lib/rubocop/cop/base.rb#153
|
2917
2943
|
def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end
|
2918
2944
|
|
2919
2945
|
# @return [Boolean]
|
2920
2946
|
#
|
2921
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
2947
|
+
# source://rubocop//lib/rubocop/cop/base.rb#269
|
2922
2948
|
def active_support_extensions_enabled?; end
|
2923
2949
|
|
2924
2950
|
# Adds an offense that has no particular location.
|
2925
2951
|
# No correction can be applied to global offenses
|
2926
2952
|
#
|
2927
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
2953
|
+
# source://rubocop//lib/rubocop/cop/base.rb#186
|
2928
2954
|
def add_global_offense(message = T.unsafe(nil), severity: T.unsafe(nil)); end
|
2929
2955
|
|
2930
2956
|
# Adds an offense on the specified range (or node with an expression)
|
@@ -2932,25 +2958,25 @@ class RuboCop::Cop::Base
|
|
2932
2958
|
# to provide the cop the opportunity to autocorrect the offense.
|
2933
2959
|
# If message is not specified, the method `message` will be called.
|
2934
2960
|
#
|
2935
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
2961
|
+
# source://rubocop//lib/rubocop/cop/base.rb#198
|
2936
2962
|
def add_offense(node_or_range, message: T.unsafe(nil), severity: T.unsafe(nil), &block); end
|
2937
2963
|
|
2938
2964
|
# @api private
|
2939
2965
|
# @return [Boolean]
|
2940
2966
|
#
|
2941
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
2967
|
+
# source://rubocop//lib/rubocop/cop/base.rb#340
|
2942
2968
|
def always_autocorrect?; end
|
2943
2969
|
|
2944
2970
|
# Called before any investigation
|
2945
2971
|
#
|
2946
2972
|
# @api private
|
2947
2973
|
#
|
2948
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
2974
|
+
# source://rubocop//lib/rubocop/cop/base.rb#326
|
2949
2975
|
def begin_investigation(processed_source, offset: T.unsafe(nil), original: T.unsafe(nil)); end
|
2950
2976
|
|
2951
2977
|
# @api private
|
2952
2978
|
#
|
2953
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
2979
|
+
# source://rubocop//lib/rubocop/cop/base.rb#311
|
2954
2980
|
def callbacks_needed; end
|
2955
2981
|
|
2956
2982
|
# Returns the value of attribute config.
|
@@ -2958,29 +2984,29 @@ class RuboCop::Cop::Base
|
|
2958
2984
|
# source://rubocop//lib/rubocop/cop/base.rb#43
|
2959
2985
|
def config; end
|
2960
2986
|
|
2961
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
2987
|
+
# source://rubocop//lib/rubocop/cop/base.rb#249
|
2962
2988
|
def config_to_allow_offenses; end
|
2963
2989
|
|
2964
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
2990
|
+
# source://rubocop//lib/rubocop/cop/base.rb#253
|
2965
2991
|
def config_to_allow_offenses=(hash); end
|
2966
2992
|
|
2967
2993
|
# @api private
|
2968
2994
|
# @return [Boolean]
|
2969
2995
|
#
|
2970
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
2996
|
+
# source://rubocop//lib/rubocop/cop/base.rb#346
|
2971
2997
|
def contextual_autocorrect?; end
|
2972
2998
|
|
2973
2999
|
# Configuration Helpers
|
2974
3000
|
#
|
2975
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3001
|
+
# source://rubocop//lib/rubocop/cop/base.rb#243
|
2976
3002
|
def cop_config; end
|
2977
3003
|
|
2978
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3004
|
+
# source://rubocop//lib/rubocop/cop/base.rb#235
|
2979
3005
|
def cop_name; end
|
2980
3006
|
|
2981
3007
|
# @return [Boolean]
|
2982
3008
|
#
|
2983
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3009
|
+
# source://rubocop//lib/rubocop/cop/base.rb#282
|
2984
3010
|
def excluded_file?(file); end
|
2985
3011
|
|
2986
3012
|
# This method should be overridden when a cop's behavior depends
|
@@ -2999,51 +3025,51 @@ class RuboCop::Cop::Base
|
|
2999
3025
|
# ResultCache system when those external dependencies change,
|
3000
3026
|
# ie when the ResultCache should be invalidated.
|
3001
3027
|
#
|
3002
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3028
|
+
# source://rubocop//lib/rubocop/cop/base.rb#231
|
3003
3029
|
def external_dependency_checksum; end
|
3004
3030
|
|
3005
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3031
|
+
# source://rubocop//lib/rubocop/cop/base.rb#350
|
3006
3032
|
def inspect; end
|
3007
3033
|
|
3008
3034
|
# Gets called if no message is specified when calling `add_offense` or
|
3009
3035
|
# `add_global_offense`
|
3010
3036
|
# Cops are discouraged to override this; instead pass your message directly
|
3011
3037
|
#
|
3012
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3038
|
+
# source://rubocop//lib/rubocop/cop/base.rb#180
|
3013
3039
|
def message(_range = T.unsafe(nil)); end
|
3014
3040
|
|
3015
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3041
|
+
# source://rubocop//lib/rubocop/cop/base.rb#235
|
3016
3042
|
def name; end
|
3017
3043
|
|
3018
3044
|
# @deprecated Make potential errors with previous API more obvious
|
3019
3045
|
#
|
3020
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3046
|
+
# source://rubocop//lib/rubocop/cop/base.rb#302
|
3021
3047
|
def offenses; end
|
3022
3048
|
|
3023
3049
|
# Called after all on_... have been called
|
3024
3050
|
# When refining this method, always call `super`
|
3025
3051
|
#
|
3026
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3052
|
+
# source://rubocop//lib/rubocop/cop/base.rb#167
|
3027
3053
|
def on_investigation_end; end
|
3028
3054
|
|
3029
3055
|
# Called before all on_... have been called
|
3030
3056
|
# When refining this method, always call `super`
|
3031
3057
|
#
|
3032
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3058
|
+
# source://rubocop//lib/rubocop/cop/base.rb#161
|
3033
3059
|
def on_new_investigation; end
|
3034
3060
|
|
3035
3061
|
# Called instead of all on_... callbacks for unrecognized files / syntax errors
|
3036
3062
|
# When refining this method, always call `super`
|
3037
3063
|
#
|
3038
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3064
|
+
# source://rubocop//lib/rubocop/cop/base.rb#173
|
3039
3065
|
def on_other_file; end
|
3040
3066
|
|
3041
3067
|
# There should be very limited reasons for a Cop to do it's own parsing
|
3042
3068
|
#
|
3043
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3069
|
+
# source://rubocop//lib/rubocop/cop/base.rb#287
|
3044
3070
|
def parse(source, path = T.unsafe(nil)); end
|
3045
3071
|
|
3046
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3072
|
+
# source://rubocop//lib/rubocop/cop/base.rb#261
|
3047
3073
|
def parser_engine; end
|
3048
3074
|
|
3049
3075
|
# Returns the value of attribute processed_source.
|
@@ -3055,99 +3081,104 @@ class RuboCop::Cop::Base
|
|
3055
3081
|
#
|
3056
3082
|
# @api private
|
3057
3083
|
#
|
3058
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3084
|
+
# source://rubocop//lib/rubocop/cop/base.rb#293
|
3059
3085
|
def ready; end
|
3060
3086
|
|
3061
3087
|
# @return [Boolean]
|
3062
3088
|
#
|
3063
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3089
|
+
# source://rubocop//lib/rubocop/cop/base.rb#273
|
3064
3090
|
def relevant_file?(file); end
|
3065
3091
|
|
3066
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3092
|
+
# source://rubocop//lib/rubocop/cop/base.rb#265
|
3067
3093
|
def target_rails_version; end
|
3068
3094
|
|
3069
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3095
|
+
# source://rubocop//lib/rubocop/cop/base.rb#257
|
3070
3096
|
def target_ruby_version; end
|
3071
3097
|
|
3072
3098
|
private
|
3073
3099
|
|
3074
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3100
|
+
# source://rubocop//lib/rubocop/cop/base.rb#478
|
3075
3101
|
def annotate(message); end
|
3076
3102
|
|
3077
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3103
|
+
# source://rubocop//lib/rubocop/cop/base.rb#362
|
3078
3104
|
def apply_correction(corrector); end
|
3079
3105
|
|
3080
3106
|
# @return [Symbol] offense status
|
3081
3107
|
#
|
3082
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3108
|
+
# source://rubocop//lib/rubocop/cop/base.rb#442
|
3083
3109
|
def attempt_correction(range, corrector); end
|
3084
3110
|
|
3085
3111
|
# Reserved for Cop::Cop
|
3086
3112
|
#
|
3087
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3113
|
+
# source://rubocop//lib/rubocop/cop/base.rb#358
|
3088
3114
|
def callback_argument(range); end
|
3089
3115
|
|
3090
3116
|
# Called to complete an investigation
|
3091
3117
|
#
|
3092
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3118
|
+
# source://rubocop//lib/rubocop/cop/base.rb#391
|
3093
3119
|
def complete_investigation; end
|
3094
3120
|
|
3095
3121
|
# @return [Symbol, Corrector] offense status
|
3096
3122
|
#
|
3097
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3123
|
+
# source://rubocop//lib/rubocop/cop/base.rb#416
|
3098
3124
|
def correct(range); end
|
3099
3125
|
|
3100
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3126
|
+
# source://rubocop//lib/rubocop/cop/base.rb#376
|
3101
3127
|
def current_corrector; end
|
3102
3128
|
|
3103
3129
|
# Reserved for Commissioner:
|
3104
3130
|
#
|
3105
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3131
|
+
# source://rubocop//lib/rubocop/cop/base.rb#368
|
3106
3132
|
def current_offense_locations; end
|
3107
3133
|
|
3108
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3134
|
+
# source://rubocop//lib/rubocop/cop/base.rb#380
|
3109
3135
|
def current_offenses; end
|
3110
3136
|
|
3111
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3137
|
+
# source://rubocop//lib/rubocop/cop/base.rb#372
|
3112
3138
|
def currently_disabled_lines; end
|
3113
3139
|
|
3114
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3140
|
+
# source://rubocop//lib/rubocop/cop/base.rb#506
|
3115
3141
|
def custom_severity; end
|
3116
3142
|
|
3117
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3143
|
+
# source://rubocop//lib/rubocop/cop/base.rb#502
|
3118
3144
|
def default_severity; end
|
3119
3145
|
|
3120
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3146
|
+
# source://rubocop//lib/rubocop/cop/base.rb#456
|
3121
3147
|
def disable_uncorrectable(range); end
|
3122
3148
|
|
3123
3149
|
# @return [Boolean]
|
3124
3150
|
#
|
3125
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3151
|
+
# source://rubocop//lib/rubocop/cop/base.rb#492
|
3126
3152
|
def enabled_line?(line_number); end
|
3127
3153
|
|
3128
3154
|
# @return [Boolean]
|
3129
3155
|
#
|
3130
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3156
|
+
# source://rubocop//lib/rubocop/cop/base.rb#484
|
3131
3157
|
def file_name_matches_any?(file, parameter, default_result); end
|
3132
3158
|
|
3133
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3159
|
+
# source://rubocop//lib/rubocop/cop/base.rb#474
|
3134
3160
|
def find_message(range, message); end
|
3135
3161
|
|
3136
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3162
|
+
# source://rubocop//lib/rubocop/cop/base.rb#498
|
3137
3163
|
def find_severity(_range, severity); end
|
3138
3164
|
|
3139
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3165
|
+
# source://rubocop//lib/rubocop/cop/base.rb#519
|
3140
3166
|
def range_for_original(range); end
|
3141
3167
|
|
3142
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3168
|
+
# source://rubocop//lib/rubocop/cop/base.rb#463
|
3143
3169
|
def range_from_node_or_range(node_or_range); end
|
3144
3170
|
|
3145
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3171
|
+
# source://rubocop//lib/rubocop/cop/base.rb#411
|
3146
3172
|
def reset_investigation; end
|
3147
3173
|
|
3174
|
+
# @return [Boolean]
|
3175
|
+
#
|
3176
|
+
# source://rubocop//lib/rubocop/cop/base.rb#527
|
3177
|
+
def target_satisfies_all_gem_version_requirements?; end
|
3178
|
+
|
3148
3179
|
# @return [Symbol] offense status
|
3149
3180
|
#
|
3150
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3181
|
+
# source://rubocop//lib/rubocop/cop/base.rb#431
|
3151
3182
|
def use_corrector(range, corrector); end
|
3152
3183
|
|
3153
3184
|
class << self
|
@@ -3162,18 +3193,18 @@ class RuboCop::Cop::Base
|
|
3162
3193
|
|
3163
3194
|
# Naming
|
3164
3195
|
#
|
3165
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3196
|
+
# source://rubocop//lib/rubocop/cop/base.rb#90
|
3166
3197
|
def badge; end
|
3167
3198
|
|
3168
3199
|
# @api private
|
3169
3200
|
#
|
3170
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3201
|
+
# source://rubocop//lib/rubocop/cop/base.rb#316
|
3171
3202
|
def callbacks_needed; end
|
3172
3203
|
|
3173
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3204
|
+
# source://rubocop//lib/rubocop/cop/base.rb#94
|
3174
3205
|
def cop_name; end
|
3175
3206
|
|
3176
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3207
|
+
# source://rubocop//lib/rubocop/cop/base.rb#98
|
3177
3208
|
def department; end
|
3178
3209
|
|
3179
3210
|
# Cops (other than builtin) are encouraged to implement this
|
@@ -3186,9 +3217,14 @@ class RuboCop::Cop::Base
|
|
3186
3217
|
|
3187
3218
|
# Call for abstract Cop classes
|
3188
3219
|
#
|
3189
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3220
|
+
# source://rubocop//lib/rubocop/cop/base.rb#78
|
3190
3221
|
def exclude_from_registry; end
|
3191
3222
|
|
3223
|
+
# Returns the value of attribute gem_requirements.
|
3224
|
+
#
|
3225
|
+
# source://rubocop//lib/rubocop/cop/base.rb#135
|
3226
|
+
def gem_requirements; end
|
3227
|
+
|
3192
3228
|
# @private
|
3193
3229
|
#
|
3194
3230
|
# source://rubocop//lib/rubocop/cop/base.rb#71
|
@@ -3196,12 +3232,12 @@ class RuboCop::Cop::Base
|
|
3196
3232
|
|
3197
3233
|
# Override and return the Force class(es) you need to join
|
3198
3234
|
#
|
3199
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3235
|
+
# source://rubocop//lib/rubocop/cop/base.rb#115
|
3200
3236
|
def joining_forces; end
|
3201
3237
|
|
3202
3238
|
# @return [Boolean]
|
3203
3239
|
#
|
3204
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3240
|
+
# source://rubocop//lib/rubocop/cop/base.rb#102
|
3205
3241
|
def lint?; end
|
3206
3242
|
|
3207
3243
|
# Returns true if the cop name or the cop namespace matches any of the
|
@@ -3209,15 +3245,30 @@ class RuboCop::Cop::Base
|
|
3209
3245
|
#
|
3210
3246
|
# @return [Boolean]
|
3211
3247
|
#
|
3212
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3248
|
+
# source://rubocop//lib/rubocop/cop/base.rb#108
|
3213
3249
|
def match?(given_names); end
|
3214
3250
|
|
3251
|
+
# Register a version requirement for the given gem name.
|
3252
|
+
# This cop will be skipped unless the target satisfies *all* requirements.
|
3253
|
+
#
|
3254
|
+
# @api public
|
3255
|
+
# @param gem_name [String]
|
3256
|
+
# @param version_requirements [Array<String>] The version requirements,
|
3257
|
+
# using the same syntax as a Gemfile, e.g. ">= 1.2.3"
|
3258
|
+
#
|
3259
|
+
# If omitted, any version of the gem will be accepted.
|
3260
|
+
#
|
3261
|
+
# https://guides.rubygems.org/patterns/#declaring-dependencies
|
3262
|
+
#
|
3263
|
+
# source://rubocop//lib/rubocop/cop/base.rb#148
|
3264
|
+
def requires_gem(gem_name, *version_requirements); end
|
3265
|
+
|
3215
3266
|
# Returns if class supports autocorrect.
|
3216
3267
|
# It is recommended to extend AutoCorrector instead of overriding
|
3217
3268
|
#
|
3218
3269
|
# @return [Boolean]
|
3219
3270
|
#
|
3220
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3271
|
+
# source://rubocop//lib/rubocop/cop/base.rb#84
|
3221
3272
|
def support_autocorrect?; end
|
3222
3273
|
|
3223
3274
|
# Override if your cop should be called repeatedly for multiple investigations
|
@@ -3230,22 +3281,22 @@ class RuboCop::Cop::Base
|
|
3230
3281
|
#
|
3231
3282
|
# @return [Boolean]
|
3232
3283
|
#
|
3233
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3284
|
+
# source://rubocop//lib/rubocop/cop/base.rb#126
|
3234
3285
|
def support_multiple_source?; end
|
3235
3286
|
|
3236
3287
|
private
|
3237
3288
|
|
3238
3289
|
# @return [Boolean]
|
3239
3290
|
#
|
3240
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3291
|
+
# source://rubocop//lib/rubocop/cop/base.rb#402
|
3241
3292
|
def builtin?; end
|
3242
3293
|
|
3243
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3294
|
+
# source://rubocop//lib/rubocop/cop/base.rb#384
|
3244
3295
|
def restrict_on_send; end
|
3245
3296
|
end
|
3246
3297
|
end
|
3247
3298
|
|
3248
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3299
|
+
# source://rubocop//lib/rubocop/cop/base.rb#388
|
3249
3300
|
RuboCop::Cop::Base::EMPTY_OFFENSES = T.let(T.unsafe(nil), Array)
|
3250
3301
|
|
3251
3302
|
# Reports of an investigation.
|
@@ -4134,6 +4185,9 @@ module RuboCop::Cop::CodeLength
|
|
4134
4185
|
# source://rubocop//lib/rubocop/cop/mixin/code_length.rb#45
|
4135
4186
|
def irrelevant_line(source_line); end
|
4136
4187
|
|
4188
|
+
# source://rubocop//lib/rubocop/cop/mixin/code_length.rb#58
|
4189
|
+
def location(node); end
|
4190
|
+
|
4137
4191
|
# source://rubocop//lib/rubocop/cop/mixin/code_length.rb#19
|
4138
4192
|
def max_length; end
|
4139
4193
|
|
@@ -5039,7 +5093,7 @@ class RuboCop::Cop::Corrector < ::Parser::Source::TreeRewriter
|
|
5039
5093
|
|
5040
5094
|
# Legacy
|
5041
5095
|
#
|
5042
|
-
# source://parser/3.3.0
|
5096
|
+
# source://parser/3.3.1.0/lib/parser/source/tree_rewriter.rb#252
|
5043
5097
|
def rewrite; end
|
5044
5098
|
|
5045
5099
|
# Swaps sources at the given ranges.
|
@@ -5368,24 +5422,24 @@ RuboCop::Cop::EndKeywordAlignment::MSG = T.let(T.unsafe(nil), String)
|
|
5368
5422
|
module RuboCop::Cop::EnforceSuperclass
|
5369
5423
|
# @api private
|
5370
5424
|
#
|
5371
|
-
# source://rubocop-rails/2.24.
|
5425
|
+
# source://rubocop-rails/2.24.1/lib/rubocop/cop/mixin/enforce_superclass.rb#19
|
5372
5426
|
def on_class(node); end
|
5373
5427
|
|
5374
5428
|
# @api private
|
5375
5429
|
#
|
5376
|
-
# source://rubocop-rails/2.24.
|
5430
|
+
# source://rubocop-rails/2.24.1/lib/rubocop/cop/mixin/enforce_superclass.rb#25
|
5377
5431
|
def on_send(node); end
|
5378
5432
|
|
5379
5433
|
private
|
5380
5434
|
|
5381
|
-
# source://rubocop-rails/2.24.
|
5435
|
+
# source://rubocop-rails/2.24.1/lib/rubocop/cop/mixin/enforce_superclass.rb#33
|
5382
5436
|
def register_offense(offense_node); end
|
5383
5437
|
|
5384
5438
|
class << self
|
5385
5439
|
# @api private
|
5386
5440
|
# @private
|
5387
5441
|
#
|
5388
|
-
# source://rubocop-rails/2.24.
|
5442
|
+
# source://rubocop-rails/2.24.1/lib/rubocop/cop/mixin/enforce_superclass.rb#7
|
5389
5443
|
def included(base); end
|
5390
5444
|
end
|
5391
5445
|
end
|
@@ -9068,14 +9122,19 @@ RuboCop::Cop::Layout::EmptyLineAfterMultilineCondition::MSG = T.let(T.unsafe(nil
|
|
9068
9122
|
# `AllowAdjacentOneLineDefs` configures whether adjacent
|
9069
9123
|
# one-line definitions are considered an offense.
|
9070
9124
|
#
|
9071
|
-
# @example
|
9072
|
-
# # checks for empty lines between method definitions.
|
9125
|
+
# @example AllowAdjacentOneLineDefs: false
|
9073
9126
|
#
|
9074
9127
|
# # bad
|
9075
|
-
#
|
9076
|
-
# end
|
9077
|
-
#
|
9078
|
-
#
|
9128
|
+
# class ErrorA < BaseError; end
|
9129
|
+
# class ErrorB < BaseError; end
|
9130
|
+
# class ErrorC < BaseError; end
|
9131
|
+
#
|
9132
|
+
# # good
|
9133
|
+
# class ErrorA < BaseError; end
|
9134
|
+
#
|
9135
|
+
# class ErrorB < BaseError; end
|
9136
|
+
#
|
9137
|
+
# class ErrorC < BaseError; end
|
9079
9138
|
# @example
|
9080
9139
|
#
|
9081
9140
|
# # good
|
@@ -9139,19 +9198,14 @@ RuboCop::Cop::Layout::EmptyLineAfterMultilineCondition::MSG = T.let(T.unsafe(nil
|
|
9139
9198
|
# class ErrorB < BaseError; end
|
9140
9199
|
#
|
9141
9200
|
# class ErrorC < BaseError; end
|
9142
|
-
# @example
|
9201
|
+
# @example EmptyLineBetweenMethodDefs: true (default)
|
9202
|
+
# # checks for empty lines between method definitions.
|
9143
9203
|
#
|
9144
9204
|
# # bad
|
9145
|
-
#
|
9146
|
-
#
|
9147
|
-
#
|
9148
|
-
#
|
9149
|
-
# # good
|
9150
|
-
# class ErrorA < BaseError; end
|
9151
|
-
#
|
9152
|
-
# class ErrorB < BaseError; end
|
9153
|
-
#
|
9154
|
-
# class ErrorC < BaseError; end
|
9205
|
+
# def a
|
9206
|
+
# end
|
9207
|
+
# def b
|
9208
|
+
# end
|
9155
9209
|
#
|
9156
9210
|
# source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#108
|
9157
9211
|
class RuboCop::Cop::Layout::EmptyLineBetweenDefs < ::RuboCop::Cop::Base
|
@@ -10663,43 +10717,43 @@ class RuboCop::Cop::Layout::FirstArrayElementIndentation < ::RuboCop::Cop::Base
|
|
10663
10717
|
# source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#94
|
10664
10718
|
def on_array(node); end
|
10665
10719
|
|
10666
|
-
# source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#
|
10720
|
+
# source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#100
|
10667
10721
|
def on_csend(node); end
|
10668
10722
|
|
10669
|
-
# source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#
|
10723
|
+
# source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#100
|
10670
10724
|
def on_send(node); end
|
10671
10725
|
|
10672
10726
|
private
|
10673
10727
|
|
10674
|
-
# source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#
|
10728
|
+
# source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#191
|
10675
10729
|
def array_alignment_config; end
|
10676
10730
|
|
10677
|
-
# source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#
|
10731
|
+
# source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#111
|
10678
10732
|
def autocorrect(corrector, node); end
|
10679
10733
|
|
10680
10734
|
# Returns the description of what the correct indentation is based on.
|
10681
10735
|
#
|
10682
|
-
# source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#
|
10736
|
+
# source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#149
|
10683
10737
|
def base_description(indent_base_type); end
|
10684
10738
|
|
10685
|
-
# source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#
|
10739
|
+
# source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#115
|
10686
10740
|
def brace_alignment_style; end
|
10687
10741
|
|
10688
|
-
# source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#
|
10742
|
+
# source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#119
|
10689
10743
|
def check(array_node, left_parenthesis); end
|
10690
10744
|
|
10691
|
-
# source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#
|
10745
|
+
# source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#133
|
10692
10746
|
def check_right_bracket(right_bracket, first_elem, left_bracket, left_parenthesis); end
|
10693
10747
|
|
10694
10748
|
# @return [Boolean]
|
10695
10749
|
#
|
10696
|
-
# source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#
|
10750
|
+
# source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#185
|
10697
10751
|
def enforce_first_argument_with_fixed_indentation?; end
|
10698
10752
|
|
10699
|
-
# source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#
|
10753
|
+
# source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#162
|
10700
10754
|
def message(base_description); end
|
10701
10755
|
|
10702
|
-
# source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#
|
10756
|
+
# source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#170
|
10703
10757
|
def message_for_right_bracket(indent_base_type); end
|
10704
10758
|
end
|
10705
10759
|
|
@@ -11232,22 +11286,16 @@ RuboCop::Cop::Layout::FirstParameterIndentation::MSG = T.let(T.unsafe(nil), Stri
|
|
11232
11286
|
# Alternatively you can specify multiple allowed styles. That's done by
|
11233
11287
|
# passing a list of styles to EnforcedStyles.
|
11234
11288
|
#
|
11235
|
-
# @example
|
11289
|
+
# @example EnforcedLastArgumentHashStyle: ignore_explicit
|
11290
|
+
# # Ignore only explicit hashes.
|
11291
|
+
#
|
11236
11292
|
# # bad
|
11237
|
-
#
|
11238
|
-
# :
|
11239
|
-
# :ba => baz
|
11240
|
-
# }
|
11241
|
-
# {
|
11242
|
-
# :foo => bar,
|
11243
|
-
# :ba => baz
|
11244
|
-
# }
|
11293
|
+
# do_something(foo: 1,
|
11294
|
+
# bar: 2)
|
11245
11295
|
#
|
11246
11296
|
# # good
|
11247
|
-
# {
|
11248
|
-
# :
|
11249
|
-
# :ba => baz
|
11250
|
-
# }
|
11297
|
+
# do_something({foo: 1,
|
11298
|
+
# bar: 2})
|
11251
11299
|
# @example EnforcedHashRocketStyle: separator
|
11252
11300
|
# # bad
|
11253
11301
|
# {
|
@@ -11366,16 +11414,22 @@ RuboCop::Cop::Layout::FirstParameterIndentation::MSG = T.let(T.unsafe(nil), Stri
|
|
11366
11414
|
# # good
|
11367
11415
|
# do_something(foo: 1,
|
11368
11416
|
# bar: 2)
|
11369
|
-
# @example
|
11370
|
-
# # Ignore only explicit hashes.
|
11371
|
-
#
|
11417
|
+
# @example EnforcedHashRocketStyle: key (default)
|
11372
11418
|
# # bad
|
11373
|
-
#
|
11374
|
-
#
|
11419
|
+
# {
|
11420
|
+
# :foo => bar,
|
11421
|
+
# :ba => baz
|
11422
|
+
# }
|
11423
|
+
# {
|
11424
|
+
# :foo => bar,
|
11425
|
+
# :ba => baz
|
11426
|
+
# }
|
11375
11427
|
#
|
11376
11428
|
# # good
|
11377
|
-
#
|
11378
|
-
#
|
11429
|
+
# {
|
11430
|
+
# :foo => bar,
|
11431
|
+
# :ba => baz
|
11432
|
+
# }
|
11379
11433
|
#
|
11380
11434
|
# source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#178
|
11381
11435
|
class RuboCop::Cop::Layout::HashAlignment < ::RuboCop::Cop::Base
|
@@ -17372,6 +17426,11 @@ RuboCop::Cop::Lint::ConstantResolution::MSG = T.let(T.unsafe(nil), String)
|
|
17372
17426
|
# MyDebugger.debug_this
|
17373
17427
|
# ----
|
17374
17428
|
#
|
17429
|
+
# Some gems also ship files that will start a debugging session when required,
|
17430
|
+
# for example `require 'debug/start'` from `ruby/debug`. These requires can
|
17431
|
+
# be configured through `DebuggerRequires`. It has the same structure as
|
17432
|
+
# `DebuggerMethods`, which you can read about above.
|
17433
|
+
#
|
17375
17434
|
# @example
|
17376
17435
|
#
|
17377
17436
|
# # bad (ok during development)
|
@@ -17404,43 +17463,56 @@ RuboCop::Cop::Lint::ConstantResolution::MSG = T.let(T.unsafe(nil), String)
|
|
17404
17463
|
# def some_method
|
17405
17464
|
# my_debugger
|
17406
17465
|
# end
|
17466
|
+
# @example DebuggerRequires: [my_debugger/start]
|
17467
|
+
#
|
17468
|
+
# # bad (ok during development)
|
17407
17469
|
#
|
17408
|
-
#
|
17470
|
+
# require 'my_debugger/start'
|
17471
|
+
#
|
17472
|
+
# source://rubocop//lib/rubocop/cop/lint/debugger.rb#78
|
17409
17473
|
class RuboCop::Cop::Lint::Debugger < ::RuboCop::Cop::Base
|
17410
|
-
# source://rubocop//lib/rubocop/cop/lint/debugger.rb#
|
17474
|
+
# source://rubocop//lib/rubocop/cop/lint/debugger.rb#82
|
17411
17475
|
def on_send(node); end
|
17412
17476
|
|
17413
17477
|
private
|
17414
17478
|
|
17415
17479
|
# @return [Boolean]
|
17416
17480
|
#
|
17417
|
-
# source://rubocop//lib/rubocop/cop/lint/debugger.rb#
|
17481
|
+
# source://rubocop//lib/rubocop/cop/lint/debugger.rb#142
|
17418
17482
|
def assumed_argument?(node); end
|
17419
17483
|
|
17420
17484
|
# @return [Boolean]
|
17421
17485
|
#
|
17422
|
-
# source://rubocop//lib/rubocop/cop/lint/debugger.rb#
|
17486
|
+
# source://rubocop//lib/rubocop/cop/lint/debugger.rb#121
|
17423
17487
|
def assumed_usage_context?(node); end
|
17424
17488
|
|
17425
|
-
# source://rubocop//lib/rubocop/cop/lint/debugger.rb#
|
17489
|
+
# source://rubocop//lib/rubocop/cop/lint/debugger.rb#131
|
17426
17490
|
def chained_method_name(send_node); end
|
17427
17491
|
|
17428
17492
|
# @return [Boolean]
|
17429
17493
|
#
|
17430
|
-
# source://rubocop//lib/rubocop/cop/lint/debugger.rb#
|
17494
|
+
# source://rubocop//lib/rubocop/cop/lint/debugger.rb#108
|
17431
17495
|
def debugger_method?(send_node); end
|
17432
17496
|
|
17433
|
-
# source://rubocop//lib/rubocop/cop/lint/debugger.rb#
|
17497
|
+
# source://rubocop//lib/rubocop/cop/lint/debugger.rb#94
|
17434
17498
|
def debugger_methods; end
|
17435
17499
|
|
17436
|
-
#
|
17500
|
+
# @return [Boolean]
|
17501
|
+
#
|
17502
|
+
# source://rubocop//lib/rubocop/cop/lint/debugger.rb#114
|
17503
|
+
def debugger_require?(send_node); end
|
17504
|
+
|
17505
|
+
# source://rubocop//lib/rubocop/cop/lint/debugger.rb#101
|
17506
|
+
def debugger_requires; end
|
17507
|
+
|
17508
|
+
# source://rubocop//lib/rubocop/cop/lint/debugger.rb#90
|
17437
17509
|
def message(node); end
|
17438
17510
|
end
|
17439
17511
|
|
17440
|
-
# source://rubocop//lib/rubocop/cop/lint/debugger.rb#
|
17512
|
+
# source://rubocop//lib/rubocop/cop/lint/debugger.rb#80
|
17441
17513
|
RuboCop::Cop::Lint::Debugger::BLOCK_TYPES = T.let(T.unsafe(nil), Array)
|
17442
17514
|
|
17443
|
-
# source://rubocop//lib/rubocop/cop/lint/debugger.rb#
|
17515
|
+
# source://rubocop//lib/rubocop/cop/lint/debugger.rb#79
|
17444
17516
|
RuboCop::Cop::Lint::Debugger::MSG = T.let(T.unsafe(nil), String)
|
17445
17517
|
|
17446
17518
|
# Checks for uses of the deprecated class method usages.
|
@@ -20455,7 +20527,7 @@ class RuboCop::Cop::Lint::MixedCaseRange < ::RuboCop::Cop::Base
|
|
20455
20527
|
include ::RuboCop::Cop::RangeHelp
|
20456
20528
|
extend ::RuboCop::Cop::AutoCorrector
|
20457
20529
|
|
20458
|
-
# source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#
|
20530
|
+
# source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#58
|
20459
20531
|
def each_unsafe_regexp_range(node); end
|
20460
20532
|
|
20461
20533
|
# source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#37
|
@@ -20469,31 +20541,31 @@ class RuboCop::Cop::Lint::MixedCaseRange < ::RuboCop::Cop::Base
|
|
20469
20541
|
|
20470
20542
|
private
|
20471
20543
|
|
20472
|
-
# source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#
|
20544
|
+
# source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#74
|
20473
20545
|
def build_source_range(range_start, range_end); end
|
20474
20546
|
|
20475
|
-
# source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#
|
20547
|
+
# source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#78
|
20476
20548
|
def range_for(char); end
|
20477
20549
|
|
20478
|
-
# source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#
|
20550
|
+
# source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#84
|
20479
20551
|
def range_pairs(expr); end
|
20480
20552
|
|
20481
|
-
# source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#
|
20482
|
-
def
|
20553
|
+
# source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#104
|
20554
|
+
def regexp_range(source); end
|
20483
20555
|
|
20484
20556
|
# @return [Boolean]
|
20485
20557
|
#
|
20486
|
-
# source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#
|
20558
|
+
# source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#94
|
20487
20559
|
def skip_expression?(expr); end
|
20488
20560
|
|
20489
20561
|
# @return [Boolean]
|
20490
20562
|
#
|
20491
|
-
# source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#
|
20563
|
+
# source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#98
|
20492
20564
|
def skip_range?(range_start, range_end); end
|
20493
20565
|
|
20494
20566
|
# @return [Boolean]
|
20495
20567
|
#
|
20496
|
-
# source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#
|
20568
|
+
# source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#88
|
20497
20569
|
def unsafe_range?(range_start, range_end); end
|
20498
20570
|
end
|
20499
20571
|
|
@@ -20570,17 +20642,14 @@ RuboCop::Cop::Lint::MultipleComparison::SET_OPERATION_OPERATORS = T.let(T.unsafe
|
|
20570
20642
|
|
20571
20643
|
# Checks for nested method definitions.
|
20572
20644
|
#
|
20573
|
-
# @example
|
20574
|
-
#
|
20575
|
-
#
|
20576
|
-
#
|
20577
|
-
# # `bar` definition actually produces methods in the same scope
|
20578
|
-
# # as the outer `foo` method. Furthermore, the `bar` method
|
20579
|
-
# # will be redefined every time `foo` is invoked.
|
20580
|
-
# def foo
|
20645
|
+
# @example AllowedPatterns: ['baz']
|
20646
|
+
# # good
|
20647
|
+
# def foo(obj)
|
20648
|
+
# obj.do_baz do
|
20581
20649
|
# def bar
|
20582
20650
|
# end
|
20583
20651
|
# end
|
20652
|
+
# end
|
20584
20653
|
# @example
|
20585
20654
|
#
|
20586
20655
|
# # good
|
@@ -20643,14 +20712,17 @@ RuboCop::Cop::Lint::MultipleComparison::SET_OPERATION_OPERATORS = T.let(T.unsafe
|
|
20643
20712
|
# end
|
20644
20713
|
# end
|
20645
20714
|
# end
|
20646
|
-
# @example
|
20647
|
-
#
|
20648
|
-
#
|
20649
|
-
#
|
20715
|
+
# @example
|
20716
|
+
#
|
20717
|
+
# # bad
|
20718
|
+
#
|
20719
|
+
# # `bar` definition actually produces methods in the same scope
|
20720
|
+
# # as the outer `foo` method. Furthermore, the `bar` method
|
20721
|
+
# # will be redefined every time `foo` is invoked.
|
20722
|
+
# def foo
|
20650
20723
|
# def bar
|
20651
20724
|
# end
|
20652
20725
|
# end
|
20653
|
-
# end
|
20654
20726
|
#
|
20655
20727
|
# source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#97
|
20656
20728
|
class RuboCop::Cop::Lint::NestedMethodDefinition < ::RuboCop::Cop::Base
|
@@ -22470,21 +22542,21 @@ class RuboCop::Cop::Lint::RedundantWithIndex < ::RuboCop::Cop::Base
|
|
22470
22542
|
include ::RuboCop::Cop::RangeHelp
|
22471
22543
|
extend ::RuboCop::Cop::AutoCorrector
|
22472
22544
|
|
22473
|
-
# source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#
|
22545
|
+
# source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#37
|
22474
22546
|
def on_block(node); end
|
22475
22547
|
|
22476
|
-
# source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#
|
22548
|
+
# source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#37
|
22477
22549
|
def on_numblock(node); end
|
22478
22550
|
|
22479
|
-
# source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#
|
22551
|
+
# source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#60
|
22480
22552
|
def redundant_with_index?(param0 = T.unsafe(nil)); end
|
22481
22553
|
|
22482
22554
|
private
|
22483
22555
|
|
22484
|
-
# source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#
|
22556
|
+
# source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#70
|
22485
22557
|
def message(node); end
|
22486
22558
|
|
22487
|
-
# source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#
|
22559
|
+
# source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#78
|
22488
22560
|
def with_index_range(send); end
|
22489
22561
|
end
|
22490
22562
|
|
@@ -24503,7 +24575,7 @@ class RuboCop::Cop::Lint::UnreachableLoop < ::RuboCop::Cop::Base
|
|
24503
24575
|
|
24504
24576
|
# @return [Boolean]
|
24505
24577
|
#
|
24506
|
-
# source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#
|
24578
|
+
# source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#200
|
24507
24579
|
def conditional_continue_keyword?(break_statement); end
|
24508
24580
|
|
24509
24581
|
# @return [Boolean]
|
@@ -24513,7 +24585,7 @@ class RuboCop::Cop::Lint::UnreachableLoop < ::RuboCop::Cop::Base
|
|
24513
24585
|
|
24514
24586
|
# @return [Boolean]
|
24515
24587
|
#
|
24516
|
-
# source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#
|
24588
|
+
# source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#190
|
24517
24589
|
def preceded_by_continue_statement?(break_statement); end
|
24518
24590
|
|
24519
24591
|
# source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#130
|
@@ -25876,6 +25948,11 @@ module RuboCop::Cop::MethodComplexity
|
|
25876
25948
|
#
|
25877
25949
|
# source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#61
|
25878
25950
|
def complexity(body); end
|
25951
|
+
|
25952
|
+
# @api private
|
25953
|
+
#
|
25954
|
+
# source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#73
|
25955
|
+
def location(node); end
|
25879
25956
|
end
|
25880
25957
|
|
25881
25958
|
# Common code for cops that deal with preferred methods.
|
@@ -27494,43 +27571,66 @@ class RuboCop::Cop::Naming::BlockForwarding < ::RuboCop::Cop::Base
|
|
27494
27571
|
extend ::RuboCop::Cop::AutoCorrector
|
27495
27572
|
extend ::RuboCop::Cop::TargetRubyVersion
|
27496
27573
|
|
27497
|
-
# source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#
|
27574
|
+
# source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#54
|
27498
27575
|
def on_def(node); end
|
27499
27576
|
|
27500
|
-
# source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#
|
27577
|
+
# source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#54
|
27501
27578
|
def on_defs(node); end
|
27502
27579
|
|
27503
27580
|
private
|
27504
27581
|
|
27505
27582
|
# @return [Boolean]
|
27506
27583
|
#
|
27507
|
-
# source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#
|
27584
|
+
# source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#114
|
27508
27585
|
def anonymous_block_argument?(node); end
|
27509
27586
|
|
27510
|
-
#
|
27587
|
+
# @return [Boolean]
|
27588
|
+
#
|
27589
|
+
# source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#87
|
27590
|
+
def block_argument_name_matched?(block_pass_node, last_argument); end
|
27591
|
+
|
27592
|
+
# source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#146
|
27511
27593
|
def block_forwarding_name; end
|
27512
27594
|
|
27513
27595
|
# @return [Boolean]
|
27514
27596
|
#
|
27515
|
-
# source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#
|
27597
|
+
# source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#77
|
27516
27598
|
def expected_block_forwarding_style?(node, last_argument); end
|
27517
27599
|
|
27518
27600
|
# @return [Boolean]
|
27519
27601
|
#
|
27520
|
-
# source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#
|
27602
|
+
# source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#118
|
27521
27603
|
def explicit_block_argument?(node); end
|
27522
27604
|
|
27523
|
-
#
|
27605
|
+
# Prevents the following syntax error:
|
27606
|
+
#
|
27607
|
+
# # foo.rb
|
27608
|
+
# def foo(&)
|
27609
|
+
# block_method do
|
27610
|
+
# bar(&)
|
27611
|
+
# end
|
27612
|
+
# end
|
27613
|
+
#
|
27614
|
+
# $ ruby -vc foo.rb
|
27615
|
+
# ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-darwin22]
|
27616
|
+
# foo.rb: foo.rb:4: anonymous block parameter is also used within block (SyntaxError)
|
27617
|
+
#
|
27618
|
+
# @return [Boolean]
|
27619
|
+
#
|
27620
|
+
# source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#106
|
27621
|
+
def invalidates_syntax?(block_pass_node); end
|
27622
|
+
|
27623
|
+
# source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#122
|
27524
27624
|
def register_offense(block_argument, node); end
|
27525
27625
|
|
27526
27626
|
# @return [Boolean]
|
27527
27627
|
#
|
27528
|
-
# source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#
|
27628
|
+
# source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#138
|
27529
27629
|
def use_block_argument_as_local_variable?(node, last_argument); end
|
27530
27630
|
|
27531
27631
|
# @return [Boolean]
|
27532
27632
|
#
|
27533
|
-
# source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#
|
27633
|
+
# source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#110
|
27534
27634
|
def use_kwarg_in_method_definition?(node); end
|
27535
27635
|
|
27536
27636
|
class << self
|
@@ -27756,8 +27856,6 @@ class RuboCop::Cop::Naming::FileName < ::RuboCop::Cop::Base
|
|
27756
27856
|
# source://rubocop//lib/rubocop/cop/naming/file_name.rb#165
|
27757
27857
|
def find_definition(node); end
|
27758
27858
|
|
27759
|
-
# @yield [source_range(processed_source.buffer, 1, 0), msg]
|
27760
|
-
#
|
27761
27859
|
# source://rubocop//lib/rubocop/cop/naming/file_name.rb#65
|
27762
27860
|
def for_bad_filename(file_path); end
|
27763
27861
|
|
@@ -28009,13 +28107,13 @@ class RuboCop::Cop::Naming::InclusiveLanguage < ::RuboCop::Cop::Base
|
|
28009
28107
|
# source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#126
|
28010
28108
|
def check_token?(type); end
|
28011
28109
|
|
28012
|
-
# source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#
|
28110
|
+
# source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#243
|
28013
28111
|
def create_message(word, message = T.unsafe(nil)); end
|
28014
28112
|
|
28015
|
-
# source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#
|
28113
|
+
# source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#217
|
28016
28114
|
def create_multiple_word_message_for_file(words); end
|
28017
28115
|
|
28018
|
-
# source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#
|
28116
|
+
# source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#213
|
28019
28117
|
def create_single_word_message_for_file(word); end
|
28020
28118
|
|
28021
28119
|
# source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#189
|
@@ -28024,10 +28122,10 @@ class RuboCop::Cop::Naming::InclusiveLanguage < ::RuboCop::Cop::Base
|
|
28024
28122
|
# source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#160
|
28025
28123
|
def extract_regexp(term, term_definition); end
|
28026
28124
|
|
28027
|
-
# source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#
|
28125
|
+
# source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#251
|
28028
28126
|
def find_flagged_term(word); end
|
28029
28127
|
|
28030
|
-
# source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#
|
28128
|
+
# source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#265
|
28031
28129
|
def format_suggestions(suggestions); end
|
28032
28130
|
|
28033
28131
|
# source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#197
|
@@ -28036,10 +28134,10 @@ class RuboCop::Cop::Naming::InclusiveLanguage < ::RuboCop::Cop::Base
|
|
28036
28134
|
# source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#100
|
28037
28135
|
def investigate_tokens; end
|
28038
28136
|
|
28039
|
-
# source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#
|
28137
|
+
# source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#231
|
28040
28138
|
def mask_input(str); end
|
28041
28139
|
|
28042
|
-
# source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#
|
28140
|
+
# source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#280
|
28043
28141
|
def offense_range(token, word); end
|
28044
28142
|
|
28045
28143
|
# source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#130
|
@@ -28048,13 +28146,13 @@ class RuboCop::Cop::Naming::InclusiveLanguage < ::RuboCop::Cop::Base
|
|
28048
28146
|
# source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#144
|
28049
28147
|
def preprocess_flagged_terms; end
|
28050
28148
|
|
28051
|
-
# source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#
|
28149
|
+
# source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#258
|
28052
28150
|
def preprocess_suggestions(suggestions); end
|
28053
28151
|
|
28054
28152
|
# source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#179
|
28055
28153
|
def process_allowed_regex(allowed); end
|
28056
28154
|
|
28057
|
-
# source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#
|
28155
|
+
# source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#221
|
28058
28156
|
def scan_for_words(input); end
|
28059
28157
|
|
28060
28158
|
# source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#174
|
@@ -28682,22 +28780,9 @@ RuboCop::Cop::Naming::VariableName::MSG = T.let(T.unsafe(nil), String)
|
|
28682
28780
|
# can be used to specify whether method names and symbols should be checked.
|
28683
28781
|
# Both are enabled by default.
|
28684
28782
|
#
|
28685
|
-
# @example
|
28686
|
-
# # bad
|
28687
|
-
# :some_sym_1
|
28688
|
-
# variable_1 = 1
|
28689
|
-
#
|
28690
|
-
# def some_method_1; end
|
28691
|
-
#
|
28692
|
-
# def some_method1(arg_1); end
|
28693
|
-
#
|
28783
|
+
# @example AllowedPatterns: ['_v\d+\z']
|
28694
28784
|
# # good
|
28695
|
-
# :
|
28696
|
-
# variable1 = 1
|
28697
|
-
#
|
28698
|
-
# def some_method1; end
|
28699
|
-
#
|
28700
|
-
# def some_method1(arg1); end
|
28785
|
+
# :some_sym_v1
|
28701
28786
|
# @example EnforcedStyle: snake_case
|
28702
28787
|
# # bad
|
28703
28788
|
# :some_sym1
|
@@ -28759,9 +28844,22 @@ RuboCop::Cop::Naming::VariableName::MSG = T.let(T.unsafe(nil), String)
|
|
28759
28844
|
# @example AllowedIdentifiers: [capture3]
|
28760
28845
|
# # good
|
28761
28846
|
# expect(Open3).to receive(:capture3)
|
28762
|
-
# @example
|
28847
|
+
# @example EnforcedStyle: normalcase (default)
|
28848
|
+
# # bad
|
28849
|
+
# :some_sym_1
|
28850
|
+
# variable_1 = 1
|
28851
|
+
#
|
28852
|
+
# def some_method_1; end
|
28853
|
+
#
|
28854
|
+
# def some_method1(arg_1); end
|
28855
|
+
#
|
28763
28856
|
# # good
|
28764
|
-
# :
|
28857
|
+
# :some_sym1
|
28858
|
+
# variable1 = 1
|
28859
|
+
#
|
28860
|
+
# def some_method1; end
|
28861
|
+
#
|
28862
|
+
# def some_method1(arg1); end
|
28765
28863
|
#
|
28766
28864
|
# source://rubocop//lib/rubocop/cop/naming/variable_number.rb#103
|
28767
28865
|
class RuboCop::Cop::Naming::VariableNumber < ::RuboCop::Cop::Base
|
@@ -30801,7 +30899,7 @@ class RuboCop::Cop::Style::Alias < ::RuboCop::Cop::Base
|
|
30801
30899
|
include ::RuboCop::Cop::ConfigurableEnforcedStyle
|
30802
30900
|
extend ::RuboCop::Cop::AutoCorrector
|
30803
30901
|
|
30804
|
-
# source://rubocop//lib/rubocop/cop/style/alias.rb#
|
30902
|
+
# source://rubocop//lib/rubocop/cop/style/alias.rb#52
|
30805
30903
|
def on_alias(node); end
|
30806
30904
|
|
30807
30905
|
# source://rubocop//lib/rubocop/cop/style/alias.rb#41
|
@@ -30809,47 +30907,47 @@ class RuboCop::Cop::Style::Alias < ::RuboCop::Cop::Base
|
|
30809
30907
|
|
30810
30908
|
private
|
30811
30909
|
|
30812
|
-
# source://rubocop//lib/rubocop/cop/style/alias.rb#
|
30910
|
+
# source://rubocop//lib/rubocop/cop/style/alias.rb#86
|
30813
30911
|
def add_offense_for_args(node, &block); end
|
30814
30912
|
|
30815
30913
|
# @return [Boolean]
|
30816
30914
|
#
|
30817
|
-
# source://rubocop//lib/rubocop/cop/style/alias.rb#
|
30915
|
+
# source://rubocop//lib/rubocop/cop/style/alias.rb#76
|
30818
30916
|
def alias_keyword_possible?(node); end
|
30819
30917
|
|
30820
30918
|
# @return [Boolean]
|
30821
30919
|
#
|
30822
|
-
# source://rubocop//lib/rubocop/cop/style/alias.rb#
|
30920
|
+
# source://rubocop//lib/rubocop/cop/style/alias.rb#80
|
30823
30921
|
def alias_method_possible?(node); end
|
30824
30922
|
|
30825
|
-
# source://rubocop//lib/rubocop/cop/style/alias.rb#
|
30923
|
+
# source://rubocop//lib/rubocop/cop/style/alias.rb#66
|
30826
30924
|
def autocorrect(corrector, node); end
|
30827
30925
|
|
30828
30926
|
# @return [Boolean]
|
30829
30927
|
#
|
30830
|
-
# source://rubocop//lib/rubocop/cop/style/alias.rb#
|
30928
|
+
# source://rubocop//lib/rubocop/cop/style/alias.rb#125
|
30831
30929
|
def bareword?(sym_node); end
|
30832
30930
|
|
30833
|
-
# source://rubocop//lib/rubocop/cop/style/alias.rb#
|
30931
|
+
# source://rubocop//lib/rubocop/cop/style/alias.rb#129
|
30834
30932
|
def correct_alias_method_to_alias(corrector, send_node); end
|
30835
30933
|
|
30836
|
-
# source://rubocop//lib/rubocop/cop/style/alias.rb#
|
30934
|
+
# source://rubocop//lib/rubocop/cop/style/alias.rb#136
|
30837
30935
|
def correct_alias_to_alias_method(corrector, node); end
|
30838
30936
|
|
30839
|
-
# source://rubocop//lib/rubocop/cop/style/alias.rb#
|
30937
|
+
# source://rubocop//lib/rubocop/cop/style/alias.rb#143
|
30840
30938
|
def correct_alias_with_symbol_args(corrector, node); end
|
30841
30939
|
|
30842
|
-
# source://rubocop//lib/rubocop/cop/style/alias.rb#
|
30940
|
+
# source://rubocop//lib/rubocop/cop/style/alias.rb#148
|
30843
30941
|
def identifier(node); end
|
30844
30942
|
|
30845
|
-
# source://rubocop//lib/rubocop/cop/style/alias.rb#
|
30943
|
+
# source://rubocop//lib/rubocop/cop/style/alias.rb#114
|
30846
30944
|
def lexical_scope_type(node); end
|
30847
30945
|
|
30848
30946
|
# In this expression, will `self` be the same as the innermost enclosing
|
30849
30947
|
# class or module block (:lexical)? Or will it be something else
|
30850
30948
|
# (:dynamic)? If we're in an instance_eval block, return that.
|
30851
30949
|
#
|
30852
|
-
# source://rubocop//lib/rubocop/cop/style/alias.rb#
|
30950
|
+
# source://rubocop//lib/rubocop/cop/style/alias.rb#97
|
30853
30951
|
def scope_type(node); end
|
30854
30952
|
end
|
30855
30953
|
|
@@ -30994,20 +31092,15 @@ RuboCop::Cop::Style::AndOr::MSG = T.let(T.unsafe(nil), String)
|
|
30994
31092
|
#
|
30995
31093
|
# Names not on this list are likely to be meaningful and are allowed by default.
|
30996
31094
|
#
|
30997
|
-
# @example
|
30998
|
-
# # bad
|
30999
|
-
# def foo(
|
31000
|
-
# bar(
|
31001
|
-
# end
|
31002
|
-
#
|
31003
|
-
# # bad
|
31004
|
-
# def foo(*args, **kwargs, &block)
|
31005
|
-
# bar(*args, **kwargs, &block)
|
31095
|
+
# @example RedundantBlockArgumentNames: ['blk', 'block', 'proc'] (default)
|
31096
|
+
# # bad - But it is good with `EnforcedStyle: explicit` set for `Naming/BlockForwarding`.
|
31097
|
+
# def foo(&block)
|
31098
|
+
# bar(&block)
|
31006
31099
|
# end
|
31007
31100
|
#
|
31008
31101
|
# # good
|
31009
|
-
# def foo(
|
31010
|
-
# bar(
|
31102
|
+
# def foo(&)
|
31103
|
+
# bar(&)
|
31011
31104
|
# end
|
31012
31105
|
# @example UseAnonymousForwarding: true (default, only relevant for Ruby >= 3.2)
|
31013
31106
|
# # bad
|
@@ -31070,15 +31163,20 @@ RuboCop::Cop::Style::AndOr::MSG = T.let(T.unsafe(nil), String)
|
|
31070
31163
|
# def foo(**)
|
31071
31164
|
# bar(**)
|
31072
31165
|
# end
|
31073
|
-
# @example
|
31074
|
-
# # bad
|
31075
|
-
# def foo(&block)
|
31076
|
-
# bar(&block)
|
31166
|
+
# @example
|
31167
|
+
# # bad
|
31168
|
+
# def foo(*args, &block)
|
31169
|
+
# bar(*args, &block)
|
31170
|
+
# end
|
31171
|
+
#
|
31172
|
+
# # bad
|
31173
|
+
# def foo(*args, **kwargs, &block)
|
31174
|
+
# bar(*args, **kwargs, &block)
|
31077
31175
|
# end
|
31078
31176
|
#
|
31079
31177
|
# # good
|
31080
|
-
# def foo(
|
31081
|
-
# bar(
|
31178
|
+
# def foo(...)
|
31179
|
+
# bar(...)
|
31082
31180
|
# end
|
31083
31181
|
#
|
31084
31182
|
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#125
|
@@ -31098,7 +31196,7 @@ class RuboCop::Cop::Style::ArgumentsForwarding < ::RuboCop::Cop::Base
|
|
31098
31196
|
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#185
|
31099
31197
|
def add_forward_all_offenses(node, send_classifications, forwardable_args); end
|
31100
31198
|
|
31101
|
-
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#
|
31199
|
+
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#351
|
31102
31200
|
def add_parens_if_missing(node, corrector); end
|
31103
31201
|
|
31104
31202
|
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#212
|
@@ -31106,10 +31204,10 @@ class RuboCop::Cop::Style::ArgumentsForwarding < ::RuboCop::Cop::Base
|
|
31106
31204
|
|
31107
31205
|
# @return [Boolean]
|
31108
31206
|
#
|
31109
|
-
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#
|
31207
|
+
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#343
|
31110
31208
|
def allow_only_rest_arguments?; end
|
31111
31209
|
|
31112
|
-
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#
|
31210
|
+
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#335
|
31113
31211
|
def arguments_range(node, first_node); end
|
31114
31212
|
|
31115
31213
|
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#263
|
@@ -31120,7 +31218,7 @@ class RuboCop::Cop::Style::ArgumentsForwarding < ::RuboCop::Cop::Base
|
|
31120
31218
|
|
31121
31219
|
# @return [Boolean]
|
31122
31220
|
#
|
31123
|
-
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#
|
31221
|
+
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#495
|
31124
31222
|
def explicit_block_name?; end
|
31125
31223
|
|
31126
31224
|
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#168
|
@@ -31145,7 +31243,7 @@ class RuboCop::Cop::Style::ArgumentsForwarding < ::RuboCop::Cop::Base
|
|
31145
31243
|
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#282
|
31146
31244
|
def redundant_named_arg(arg, config_name, keyword); end
|
31147
31245
|
|
31148
|
-
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#
|
31246
|
+
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#325
|
31149
31247
|
def register_forward_all_offense(def_or_send, send_or_arguments, rest_or_splat); end
|
31150
31248
|
|
31151
31249
|
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#298
|
@@ -31159,7 +31257,7 @@ class RuboCop::Cop::Style::ArgumentsForwarding < ::RuboCop::Cop::Base
|
|
31159
31257
|
|
31160
31258
|
# @return [Boolean]
|
31161
31259
|
#
|
31162
|
-
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#
|
31260
|
+
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#347
|
31163
31261
|
def use_anonymous_forwarding?; end
|
31164
31262
|
|
31165
31263
|
class << self
|
@@ -31188,115 +31286,115 @@ RuboCop::Cop::Style::ArgumentsForwarding::KWARGS_MSG = T.let(T.unsafe(nil), Stri
|
|
31188
31286
|
|
31189
31287
|
# Classifies send nodes for possible rest/kwrest/all (including block) forwarding.
|
31190
31288
|
#
|
31191
|
-
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#
|
31289
|
+
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#358
|
31192
31290
|
class RuboCop::Cop::Style::ArgumentsForwarding::SendNodeClassifier
|
31193
31291
|
extend ::RuboCop::AST::NodePattern::Macros
|
31194
31292
|
|
31195
31293
|
# @return [SendNodeClassifier] a new instance of SendNodeClassifier
|
31196
31294
|
#
|
31197
|
-
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#
|
31295
|
+
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#370
|
31198
31296
|
def initialize(def_node, send_node, referenced_lvars, forwardable_args, **config); end
|
31199
31297
|
|
31200
|
-
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#
|
31298
|
+
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#398
|
31201
31299
|
def classification; end
|
31202
31300
|
|
31203
|
-
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#
|
31301
|
+
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#365
|
31204
31302
|
def extract_forwarded_kwrest_arg(param0 = T.unsafe(nil), param1); end
|
31205
31303
|
|
31206
|
-
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#
|
31304
|
+
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#392
|
31207
31305
|
def forwarded_block_arg; end
|
31208
31306
|
|
31209
|
-
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#
|
31307
|
+
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#368
|
31210
31308
|
def forwarded_block_arg?(param0 = T.unsafe(nil), param1); end
|
31211
31309
|
|
31212
|
-
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#
|
31310
|
+
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#386
|
31213
31311
|
def forwarded_kwrest_arg; end
|
31214
31312
|
|
31215
|
-
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#
|
31313
|
+
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#380
|
31216
31314
|
def forwarded_rest_arg; end
|
31217
31315
|
|
31218
|
-
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#
|
31316
|
+
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#362
|
31219
31317
|
def forwarded_rest_arg?(param0 = T.unsafe(nil), param1); end
|
31220
31318
|
|
31221
31319
|
private
|
31222
31320
|
|
31223
31321
|
# @return [Boolean]
|
31224
31322
|
#
|
31225
|
-
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#
|
31323
|
+
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#466
|
31226
31324
|
def additional_kwargs?; end
|
31227
31325
|
|
31228
31326
|
# @return [Boolean]
|
31229
31327
|
#
|
31230
|
-
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#
|
31328
|
+
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#462
|
31231
31329
|
def additional_kwargs_or_forwarded_kwargs?; end
|
31232
31330
|
|
31233
31331
|
# @return [Boolean]
|
31234
31332
|
#
|
31235
|
-
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#
|
31333
|
+
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#476
|
31236
31334
|
def allow_offense_for_no_block?; end
|
31237
31335
|
|
31238
31336
|
# @return [Boolean]
|
31239
31337
|
#
|
31240
|
-
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#
|
31338
|
+
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#447
|
31241
31339
|
def any_arg_referenced?; end
|
31242
31340
|
|
31243
|
-
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#
|
31341
|
+
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#431
|
31244
31342
|
def arguments; end
|
31245
31343
|
|
31246
31344
|
# @return [Boolean]
|
31247
31345
|
#
|
31248
|
-
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#
|
31346
|
+
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#410
|
31249
31347
|
def can_forward_all?; end
|
31250
31348
|
|
31251
31349
|
# @return [Boolean]
|
31252
31350
|
#
|
31253
|
-
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#
|
31351
|
+
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#470
|
31254
31352
|
def forward_additional_kwargs?; end
|
31255
31353
|
|
31256
|
-
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#
|
31354
|
+
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#427
|
31257
31355
|
def forwarded_rest_and_kwrest_args; end
|
31258
31356
|
|
31259
31357
|
# @return [Boolean]
|
31260
31358
|
#
|
31261
|
-
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#
|
31359
|
+
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#489
|
31262
31360
|
def missing_rest_arg_or_kwrest_arg?; end
|
31263
31361
|
|
31264
31362
|
# @return [Boolean]
|
31265
31363
|
#
|
31266
|
-
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#
|
31364
|
+
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#480
|
31267
31365
|
def no_additional_args?; end
|
31268
31366
|
|
31269
31367
|
# @return [Boolean]
|
31270
31368
|
#
|
31271
|
-
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#
|
31369
|
+
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#455
|
31272
31370
|
def no_post_splat_args?; end
|
31273
31371
|
|
31274
31372
|
# @return [Boolean]
|
31275
31373
|
#
|
31276
|
-
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#
|
31374
|
+
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#423
|
31277
31375
|
def offensive_block_forwarding?; end
|
31278
31376
|
|
31279
31377
|
# @return [Boolean]
|
31280
31378
|
#
|
31281
|
-
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#
|
31379
|
+
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#443
|
31282
31380
|
def referenced_block_arg?; end
|
31283
31381
|
|
31284
31382
|
# @return [Boolean]
|
31285
31383
|
#
|
31286
|
-
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#
|
31384
|
+
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#439
|
31287
31385
|
def referenced_kwrest_arg?; end
|
31288
31386
|
|
31289
31387
|
# @return [Boolean]
|
31290
31388
|
#
|
31291
|
-
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#
|
31389
|
+
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#435
|
31292
31390
|
def referenced_rest_arg?; end
|
31293
31391
|
|
31294
31392
|
# @return [Boolean]
|
31295
31393
|
#
|
31296
|
-
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#
|
31394
|
+
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#419
|
31297
31395
|
def ruby_32_missing_rest_or_kwest?; end
|
31298
31396
|
|
31299
|
-
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#
|
31397
|
+
# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#451
|
31300
31398
|
def target_ruby_version; end
|
31301
31399
|
end
|
31302
31400
|
|
@@ -31880,24 +31978,13 @@ RuboCop::Cop::Style::BlockComments::MSG = T.let(T.unsafe(nil), String)
|
|
31880
31978
|
# `lambda`, `proc`, and `it` are their defaults.
|
31881
31979
|
# Additional methods can be added to the `AllowedMethods`.
|
31882
31980
|
#
|
31883
|
-
# @example
|
31884
|
-
# # bad - single line block
|
31885
|
-
# items.each do |item| item / 5 end
|
31886
|
-
#
|
31887
|
-
# # good - single line block
|
31888
|
-
# items.each { |item| item / 5 }
|
31981
|
+
# @example AllowedPatterns: ['map']
|
31889
31982
|
#
|
31890
|
-
# #
|
31983
|
+
# # good
|
31891
31984
|
# things.map { |thing|
|
31892
31985
|
# something = thing.some_method
|
31893
31986
|
# process(something)
|
31894
31987
|
# }
|
31895
|
-
#
|
31896
|
-
# # good - multi-line block
|
31897
|
-
# things.map do |thing|
|
31898
|
-
# something = thing.some_method
|
31899
|
-
# process(something)
|
31900
|
-
# end
|
31901
31988
|
# @example EnforcedStyle: semantic
|
31902
31989
|
# # Prefer `do...end` over `{...}` for procedural blocks.
|
31903
31990
|
#
|
@@ -32018,14 +32105,25 @@ RuboCop::Cop::Style::BlockComments::MSG = T.let(T.unsafe(nil), String)
|
|
32018
32105
|
# something = thing.some_method
|
32019
32106
|
# process(something)
|
32020
32107
|
# }
|
32021
|
-
# @example
|
32108
|
+
# @example EnforcedStyle: line_count_based (default)
|
32109
|
+
# # bad - single line block
|
32110
|
+
# items.each do |item| item / 5 end
|
32022
32111
|
#
|
32023
|
-
# # good
|
32112
|
+
# # good - single line block
|
32113
|
+
# items.each { |item| item / 5 }
|
32114
|
+
#
|
32115
|
+
# # bad - multi-line block
|
32024
32116
|
# things.map { |thing|
|
32025
32117
|
# something = thing.some_method
|
32026
32118
|
# process(something)
|
32027
32119
|
# }
|
32028
32120
|
#
|
32121
|
+
# # good - multi-line block
|
32122
|
+
# things.map do |thing|
|
32123
|
+
# something = thing.some_method
|
32124
|
+
# process(something)
|
32125
|
+
# end
|
32126
|
+
#
|
32029
32127
|
# source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#168
|
32030
32128
|
class RuboCop::Cop::Style::BlockDelimiters < ::RuboCop::Cop::Base
|
32031
32129
|
include ::RuboCop::Cop::ConfigurableEnforcedStyle
|
@@ -32894,9 +32992,7 @@ RuboCop::Cop::Style::ClassVars::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
|
|
32894
32992
|
# @example
|
32895
32993
|
# # bad
|
32896
32994
|
# array.reject(&:nil?)
|
32897
|
-
# array.delete_if(&:nil?)
|
32898
32995
|
# array.reject { |e| e.nil? }
|
32899
|
-
# array.delete_if { |e| e.nil? }
|
32900
32996
|
# array.select { |e| !e.nil? }
|
32901
32997
|
# array.grep_v(nil)
|
32902
32998
|
# array.grep_v(NilClass)
|
@@ -32906,7 +33002,9 @@ RuboCop::Cop::Style::ClassVars::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
|
|
32906
33002
|
#
|
32907
33003
|
# # bad
|
32908
33004
|
# hash.reject!(&:nil?)
|
33005
|
+
# array.delete_if(&:nil?)
|
32909
33006
|
# hash.reject! { |k, v| v.nil? }
|
33007
|
+
# array.delete_if { |e| e.nil? }
|
32910
33008
|
# hash.select! { |k, v| !v.nil? }
|
32911
33009
|
#
|
32912
33010
|
# # good
|
@@ -34064,36 +34162,36 @@ class RuboCop::Cop::Style::Copyright < ::RuboCop::Cop::Base
|
|
34064
34162
|
|
34065
34163
|
private
|
34066
34164
|
|
34067
|
-
# source://rubocop//lib/rubocop/cop/style/copyright.rb#
|
34165
|
+
# source://rubocop//lib/rubocop/cop/style/copyright.rb#45
|
34166
|
+
def autocorrect(corrector); end
|
34167
|
+
|
34168
|
+
# source://rubocop//lib/rubocop/cop/style/copyright.rb#56
|
34068
34169
|
def autocorrect_notice; end
|
34069
34170
|
|
34070
34171
|
# @return [Boolean]
|
34071
34172
|
#
|
34072
|
-
# source://rubocop//lib/rubocop/cop/style/copyright.rb#
|
34173
|
+
# source://rubocop//lib/rubocop/cop/style/copyright.rb#83
|
34073
34174
|
def encoding_token?(processed_source, token_index); end
|
34074
34175
|
|
34075
|
-
# source://rubocop//lib/rubocop/cop/style/copyright.rb#
|
34176
|
+
# source://rubocop//lib/rubocop/cop/style/copyright.rb#69
|
34076
34177
|
def insert_notice_before(processed_source); end
|
34077
34178
|
|
34078
|
-
# source://rubocop//lib/rubocop/cop/style/copyright.rb#
|
34179
|
+
# source://rubocop//lib/rubocop/cop/style/copyright.rb#52
|
34079
34180
|
def notice; end
|
34080
34181
|
|
34081
34182
|
# @return [Boolean]
|
34082
34183
|
#
|
34083
|
-
# source://rubocop//lib/rubocop/cop/style/copyright.rb#
|
34184
|
+
# source://rubocop//lib/rubocop/cop/style/copyright.rb#90
|
34084
34185
|
def notice_found?(processed_source); end
|
34085
34186
|
|
34086
|
-
# source://rubocop//lib/rubocop/cop/style/copyright.rb#51
|
34087
|
-
def offense_range; end
|
34088
|
-
|
34089
34187
|
# @return [Boolean]
|
34090
34188
|
#
|
34091
|
-
# source://rubocop//lib/rubocop/cop/style/copyright.rb#
|
34189
|
+
# source://rubocop//lib/rubocop/cop/style/copyright.rb#76
|
34092
34190
|
def shebang_token?(processed_source, token_index); end
|
34093
34191
|
|
34094
34192
|
# @raise [Warning]
|
34095
34193
|
#
|
34096
|
-
# source://rubocop//lib/rubocop/cop/style/copyright.rb#
|
34194
|
+
# source://rubocop//lib/rubocop/cop/style/copyright.rb#60
|
34097
34195
|
def verify_autocorrect_notice!; end
|
34098
34196
|
end
|
34099
34197
|
|
@@ -35816,19 +35914,19 @@ class RuboCop::Cop::Style::EvalWithLocation < ::RuboCop::Cop::Base
|
|
35816
35914
|
|
35817
35915
|
private
|
35818
35916
|
|
35819
|
-
# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#
|
35917
|
+
# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#186
|
35820
35918
|
def add_offense_for_different_line(node, line_node, line_diff); end
|
35821
35919
|
|
35822
35920
|
# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#131
|
35823
35921
|
def add_offense_for_incorrect_line(method_name, line_node, sign, line_diff); end
|
35824
35922
|
|
35825
|
-
# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#
|
35923
|
+
# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#201
|
35826
35924
|
def add_offense_for_missing_line(node, code); end
|
35827
35925
|
|
35828
|
-
# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#
|
35926
|
+
# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#208
|
35829
35927
|
def add_offense_for_missing_location(node, code); end
|
35830
35928
|
|
35831
|
-
# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#
|
35929
|
+
# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#180
|
35832
35930
|
def add_offense_for_same_line(node, line_node); end
|
35833
35931
|
|
35834
35932
|
# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#143
|
@@ -35840,16 +35938,16 @@ class RuboCop::Cop::Style::EvalWithLocation < ::RuboCop::Cop::Base
|
|
35840
35938
|
# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#95
|
35841
35939
|
def check_location(node, code); end
|
35842
35940
|
|
35843
|
-
# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#
|
35941
|
+
# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#193
|
35844
35942
|
def expected_line(sign, line_diff); end
|
35845
35943
|
|
35846
35944
|
# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#122
|
35847
35945
|
def file_and_line(node); end
|
35848
35946
|
|
35849
|
-
# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#
|
35947
|
+
# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#168
|
35850
35948
|
def line_difference(line_node, code); end
|
35851
35949
|
|
35852
|
-
# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#
|
35950
|
+
# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#220
|
35853
35951
|
def missing_line(node, code); end
|
35854
35952
|
|
35855
35953
|
# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#109
|
@@ -35865,7 +35963,7 @@ class RuboCop::Cop::Style::EvalWithLocation < ::RuboCop::Cop::Base
|
|
35865
35963
|
# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#118
|
35866
35964
|
def special_line_keyword?(node); end
|
35867
35965
|
|
35868
|
-
# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#
|
35966
|
+
# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#172
|
35869
35967
|
def string_first_line(str_node); end
|
35870
35968
|
|
35871
35969
|
# @return [Boolean]
|
@@ -35960,10 +36058,10 @@ class RuboCop::Cop::Style::ExactRegexpMatch < ::RuboCop::Cop::Base
|
|
35960
36058
|
|
35961
36059
|
# @return [Boolean]
|
35962
36060
|
#
|
35963
|
-
# source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#
|
36061
|
+
# source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#57
|
35964
36062
|
def exact_match_pattern?(parsed_regexp); end
|
35965
36063
|
|
35966
|
-
# source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#
|
36064
|
+
# source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#64
|
35967
36065
|
def new_method(node); end
|
35968
36066
|
end
|
35969
36067
|
|
@@ -36725,25 +36823,25 @@ RuboCop::Cop::Style::For::PREFER_FOR = T.let(T.unsafe(nil), String)
|
|
36725
36823
|
#
|
36726
36824
|
# @example EnforcedStyle: format (default)
|
36727
36825
|
# # bad
|
36728
|
-
# puts sprintf('%10s', '
|
36729
|
-
# puts '%10s' % '
|
36826
|
+
# puts sprintf('%10s', 'foo')
|
36827
|
+
# puts '%10s' % 'foo'
|
36730
36828
|
#
|
36731
36829
|
# # good
|
36732
|
-
# puts format('%10s', '
|
36830
|
+
# puts format('%10s', 'foo')
|
36733
36831
|
# @example EnforcedStyle: sprintf
|
36734
36832
|
# # bad
|
36735
|
-
# puts format('%10s', '
|
36736
|
-
# puts '%10s' % '
|
36833
|
+
# puts format('%10s', 'foo')
|
36834
|
+
# puts '%10s' % 'foo'
|
36737
36835
|
#
|
36738
36836
|
# # good
|
36739
|
-
# puts sprintf('%10s', '
|
36837
|
+
# puts sprintf('%10s', 'foo')
|
36740
36838
|
# @example EnforcedStyle: percent
|
36741
36839
|
# # bad
|
36742
|
-
# puts format('%10s', '
|
36743
|
-
# puts sprintf('%10s', '
|
36840
|
+
# puts format('%10s', 'foo')
|
36841
|
+
# puts sprintf('%10s', 'foo')
|
36744
36842
|
#
|
36745
36843
|
# # good
|
36746
|
-
# puts '%10s' % '
|
36844
|
+
# puts '%10s' % 'foo'
|
36747
36845
|
#
|
36748
36846
|
# source://rubocop//lib/rubocop/cop/style/format_string.rb#50
|
36749
36847
|
class RuboCop::Cop::Style::FormatString < ::RuboCop::Cop::Base
|
@@ -36811,14 +36909,10 @@ RuboCop::Cop::Style::FormatString::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array
|
|
36811
36909
|
# if the number of them is less than or equals to
|
36812
36910
|
# `MaxUnannotatedPlaceholdersAllowed`.
|
36813
36911
|
#
|
36814
|
-
# @example
|
36815
|
-
#
|
36816
|
-
# # bad
|
36817
|
-
# format('%{greeting}', greeting: 'Hello')
|
36818
|
-
# format('%s', 'Hello')
|
36912
|
+
# @example AllowedPatterns: ['redirect']
|
36819
36913
|
#
|
36820
36914
|
# # good
|
36821
|
-
#
|
36915
|
+
# redirect('foo/%{bar_id}')
|
36822
36916
|
# @example EnforcedStyle: template
|
36823
36917
|
#
|
36824
36918
|
# # bad
|
@@ -36862,10 +36956,14 @@ RuboCop::Cop::Style::FormatString::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array
|
|
36862
36956
|
#
|
36863
36957
|
# # bad
|
36864
36958
|
# redirect('foo/%{bar_id}')
|
36865
|
-
# @example
|
36959
|
+
# @example EnforcedStyle: annotated (default)
|
36960
|
+
#
|
36961
|
+
# # bad
|
36962
|
+
# format('%{greeting}', greeting: 'Hello')
|
36963
|
+
# format('%s', 'Hello')
|
36866
36964
|
#
|
36867
36965
|
# # good
|
36868
|
-
#
|
36966
|
+
# format('%<greeting>s', greeting: 'Hello')
|
36869
36967
|
#
|
36870
36968
|
# source://rubocop//lib/rubocop/cop/style/format_string_token.rb#85
|
36871
36969
|
class RuboCop::Cop::Style::FormatStringToken < ::RuboCop::Cop::Base
|
@@ -37810,15 +37908,22 @@ RuboCop::Cop::Style::HashLikeCase::MSG = T.let(T.unsafe(nil), String)
|
|
37810
37908
|
# * either - accepts both shorthand and explicit use of hash literal value
|
37811
37909
|
# * consistent - forces use of the 3.1 syntax only if all values can be omitted in the hash
|
37812
37910
|
#
|
37813
|
-
# @example
|
37814
|
-
#
|
37815
|
-
#
|
37816
|
-
# {
|
37911
|
+
# @example EnforcedShorthandSyntax: consistent
|
37912
|
+
#
|
37913
|
+
# # bad - `foo` and `bar` values can be omitted
|
37914
|
+
# {foo: foo, bar: bar}
|
37915
|
+
#
|
37916
|
+
# # bad - `bar` value can be omitted
|
37917
|
+
# {foo:, bar: bar}
|
37918
|
+
#
|
37919
|
+
# # bad - mixed syntaxes
|
37920
|
+
# {foo:, bar: baz}
|
37817
37921
|
#
|
37818
37922
|
# # good
|
37819
|
-
# {
|
37820
|
-
#
|
37821
|
-
#
|
37923
|
+
# {foo:, bar:}
|
37924
|
+
#
|
37925
|
+
# # good - can't omit `baz`
|
37926
|
+
# {foo: foo, bar: baz}
|
37822
37927
|
# @example EnforcedStyle: hash_rockets
|
37823
37928
|
# # bad
|
37824
37929
|
# {a: 1, b: 2}
|
@@ -37866,22 +37971,15 @@ RuboCop::Cop::Style::HashLikeCase::MSG = T.let(T.unsafe(nil), String)
|
|
37866
37971
|
#
|
37867
37972
|
# # good
|
37868
37973
|
# {foo:, bar:}
|
37869
|
-
# @example
|
37870
|
-
#
|
37871
|
-
#
|
37872
|
-
# {
|
37873
|
-
#
|
37874
|
-
# # bad - `bar` value can be omitted
|
37875
|
-
# {foo:, bar: bar}
|
37876
|
-
#
|
37877
|
-
# # bad - mixed syntaxes
|
37878
|
-
# {foo:, bar: baz}
|
37974
|
+
# @example EnforcedStyle: ruby19 (default)
|
37975
|
+
# # bad
|
37976
|
+
# {:a => 2}
|
37977
|
+
# {b: 1, :c => 2}
|
37879
37978
|
#
|
37880
37979
|
# # good
|
37881
|
-
# {
|
37882
|
-
#
|
37883
|
-
#
|
37884
|
-
# {foo: foo, bar: baz}
|
37980
|
+
# {a: 2, b: 1}
|
37981
|
+
# {:c => 2, 'd' => 2} # acceptable since 'd' isn't a symbol
|
37982
|
+
# {d: 1, 'e' => 2} # technically not forbidden
|
37885
37983
|
#
|
37886
37984
|
# source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#113
|
37887
37985
|
class RuboCop::Cop::Style::HashSyntax < ::RuboCop::Cop::Base
|
@@ -38955,7 +39053,7 @@ class RuboCop::Cop::Style::InverseMethods < ::RuboCop::Cop::Base
|
|
38955
39053
|
def remove_end_parenthesis(corrector, node, method, method_call); end
|
38956
39054
|
|
38957
39055
|
class << self
|
38958
|
-
# source://rubocop-rails/2.24.
|
39056
|
+
# source://rubocop-rails/2.24.1/lib/rubocop-rails.rb#22
|
38959
39057
|
def autocorrect_incompatible_with; end
|
38960
39058
|
end
|
38961
39059
|
end
|
@@ -39409,22 +39507,12 @@ RuboCop::Cop::Style::LineEndConcatenation::SIMPLE_STRING_TOKEN_TYPE = T.let(T.un
|
|
39409
39507
|
#
|
39410
39508
|
# NOTE: If one of these configuration is set to nil, any capitalization is allowed.
|
39411
39509
|
#
|
39412
|
-
# @example
|
39413
|
-
# # The `snake_case` style will enforce that the frozen string literal
|
39414
|
-
# # comment is written in snake case. (Words separated by underscores)
|
39510
|
+
# @example ValueCapitalization: uppercase
|
39415
39511
|
# # bad
|
39416
39512
|
# # frozen-string-literal: true
|
39417
39513
|
#
|
39418
|
-
# module Bar
|
39419
|
-
# # ...
|
39420
|
-
# end
|
39421
|
-
#
|
39422
39514
|
# # good
|
39423
|
-
# #
|
39424
|
-
#
|
39425
|
-
# module Bar
|
39426
|
-
# # ...
|
39427
|
-
# end
|
39515
|
+
# # frozen-string-literal: TRUE
|
39428
39516
|
# @example EnforcedStyle: kebab_case
|
39429
39517
|
# # The `kebab_case` style will enforce that the frozen string literal
|
39430
39518
|
# # comment is written in kebab case. (Words separated by hyphens)
|
@@ -39477,12 +39565,22 @@ RuboCop::Cop::Style::LineEndConcatenation::SIMPLE_STRING_TOKEN_TYPE = T.let(T.un
|
|
39477
39565
|
#
|
39478
39566
|
# # good
|
39479
39567
|
# # frozen-string-literal: TRUE
|
39480
|
-
# @example
|
39568
|
+
# @example EnforcedStyle: snake_case (default)
|
39569
|
+
# # The `snake_case` style will enforce that the frozen string literal
|
39570
|
+
# # comment is written in snake case. (Words separated by underscores)
|
39481
39571
|
# # bad
|
39482
39572
|
# # frozen-string-literal: true
|
39483
39573
|
#
|
39574
|
+
# module Bar
|
39575
|
+
# # ...
|
39576
|
+
# end
|
39577
|
+
#
|
39484
39578
|
# # good
|
39485
|
-
# #
|
39579
|
+
# # frozen_string_literal: false
|
39580
|
+
#
|
39581
|
+
# module Bar
|
39582
|
+
# # ...
|
39583
|
+
# end
|
39486
39584
|
#
|
39487
39585
|
# source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#97
|
39488
39586
|
class RuboCop::Cop::Style::MagicCommentFormat < ::RuboCop::Cop::Base
|
@@ -39689,6 +39787,109 @@ end
|
|
39689
39787
|
# source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#43
|
39690
39788
|
RuboCop::Cop::Style::MapCompactWithConditionalBlock::MSG = T.let(T.unsafe(nil), String)
|
39691
39789
|
|
39790
|
+
# Checks for usages of `each` with `<<`, `push`, or `append` which
|
39791
|
+
# can be replaced by `map`.
|
39792
|
+
#
|
39793
|
+
# If `PreferredMethods` is configured for `map` in `Style/CollectionMethods`,
|
39794
|
+
# this cop uses the specified method for replacement.
|
39795
|
+
#
|
39796
|
+
# NOTE: The return value of `Enumerable#each` is `self`, whereas the
|
39797
|
+
# return value of `Enumerable#map` is an `Array`. They are not autocorrected
|
39798
|
+
# when a return value could be used because these types differ.
|
39799
|
+
#
|
39800
|
+
# NOTE: It only detects when the mapping destination is a local variable
|
39801
|
+
# initialized as an empty array and referred to only by the pushing operation.
|
39802
|
+
# This is because, if not, it's challenging to statically guarantee that the
|
39803
|
+
# mapping destination variable remains an empty array:
|
39804
|
+
#
|
39805
|
+
# [source,ruby]
|
39806
|
+
# ----
|
39807
|
+
# ret = []
|
39808
|
+
# src.each { |e| ret << e * 2 } # `<<` method may mutate `ret`
|
39809
|
+
#
|
39810
|
+
# dest = []
|
39811
|
+
# src.each { |e| dest << transform(e, dest) } # `transform` method may mutate `dest`
|
39812
|
+
# ----
|
39813
|
+
#
|
39814
|
+
# @example
|
39815
|
+
# # bad
|
39816
|
+
# dest = []
|
39817
|
+
# src.each { |e| dest << e * 2 }
|
39818
|
+
# dest
|
39819
|
+
#
|
39820
|
+
# # good
|
39821
|
+
# dest = src.map { |e| e * 2 }
|
39822
|
+
#
|
39823
|
+
# # good - contains another operation
|
39824
|
+
# dest = []
|
39825
|
+
# src.each { |e| dest << e * 2; puts e }
|
39826
|
+
# dest
|
39827
|
+
#
|
39828
|
+
# source://rubocop//lib/rubocop/cop/style/map_into_array.rb#50
|
39829
|
+
class RuboCop::Cop::Style::MapIntoArray < ::RuboCop::Cop::Base
|
39830
|
+
include ::RuboCop::Cop::RangeHelp
|
39831
|
+
extend ::RuboCop::Cop::AutoCorrector
|
39832
|
+
|
39833
|
+
# source://rubocop//lib/rubocop/cop/style/map_into_array.rb#75
|
39834
|
+
def after_leaving_scope(scope, _variable_table); end
|
39835
|
+
|
39836
|
+
# source://rubocop//lib/rubocop/cop/style/map_into_array.rb#57
|
39837
|
+
def each_block_with_push?(param0 = T.unsafe(nil)); end
|
39838
|
+
|
39839
|
+
# source://rubocop//lib/rubocop/cop/style/map_into_array.rb#66
|
39840
|
+
def empty_array_asgn?(param0 = T.unsafe(nil)); end
|
39841
|
+
|
39842
|
+
# source://rubocop//lib/rubocop/cop/style/map_into_array.rb#69
|
39843
|
+
def lvar_ref?(param0 = T.unsafe(nil), param1); end
|
39844
|
+
|
39845
|
+
# source://rubocop//lib/rubocop/cop/style/map_into_array.rb#79
|
39846
|
+
def on_block(node); end
|
39847
|
+
|
39848
|
+
# source://rubocop//lib/rubocop/cop/style/map_into_array.rb#79
|
39849
|
+
def on_numblock(node); end
|
39850
|
+
|
39851
|
+
private
|
39852
|
+
|
39853
|
+
# source://rubocop//lib/rubocop/cop/style/map_into_array.rb#155
|
39854
|
+
def correct_push_node(corrector, push_node); end
|
39855
|
+
|
39856
|
+
# source://rubocop//lib/rubocop/cop/style/map_into_array.rb#163
|
39857
|
+
def correct_return_value_handling(corrector, block, dest_var); end
|
39858
|
+
|
39859
|
+
# @return [Boolean]
|
39860
|
+
#
|
39861
|
+
# source://rubocop//lib/rubocop/cop/style/map_into_array.rb#108
|
39862
|
+
def dest_used_only_for_mapping?(block, dest_var, asgn); end
|
39863
|
+
|
39864
|
+
# source://rubocop//lib/rubocop/cop/style/map_into_array.rb#102
|
39865
|
+
def find_closest_assignment(block, dest_var); end
|
39866
|
+
|
39867
|
+
# source://rubocop//lib/rubocop/cop/style/map_into_array.rb#94
|
39868
|
+
def find_dest_var(block); end
|
39869
|
+
|
39870
|
+
# source://rubocop//lib/rubocop/cop/style/map_into_array.rb#127
|
39871
|
+
def new_method_name; end
|
39872
|
+
|
39873
|
+
# source://rubocop//lib/rubocop/cop/style/map_into_array.rb#116
|
39874
|
+
def register_offense(block, dest_var, asgn); end
|
39875
|
+
|
39876
|
+
# source://rubocop//lib/rubocop/cop/style/map_into_array.rb#148
|
39877
|
+
def remove_assignment(corrector, asgn); end
|
39878
|
+
|
39879
|
+
# @return [Boolean]
|
39880
|
+
#
|
39881
|
+
# source://rubocop//lib/rubocop/cop/style/map_into_array.rb#133
|
39882
|
+
def return_value_used?(node); end
|
39883
|
+
|
39884
|
+
class << self
|
39885
|
+
# source://rubocop//lib/rubocop/cop/style/map_into_array.rb#71
|
39886
|
+
def joining_forces; end
|
39887
|
+
end
|
39888
|
+
end
|
39889
|
+
|
39890
|
+
# source://rubocop//lib/rubocop/cop/style/map_into_array.rb#54
|
39891
|
+
RuboCop::Cop::Style::MapIntoArray::MSG = T.let(T.unsafe(nil), String)
|
39892
|
+
|
39692
39893
|
# Looks for uses of `map.to_h` or `collect.to_h` that could be
|
39693
39894
|
# written with just `to_h` in Ruby >= 2.6.
|
39694
39895
|
#
|
@@ -39839,27 +40040,13 @@ RuboCop::Cop::Style::MapToSet::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
|
|
39839
40040
|
# - Parentheses are required in anonymous arguments, keyword arguments
|
39840
40041
|
# and block passing in Ruby 3.2.
|
39841
40042
|
#
|
39842
|
-
# @example
|
39843
|
-
#
|
39844
|
-
# # bad
|
39845
|
-
# array.delete e
|
39846
|
-
#
|
39847
|
-
# # good
|
39848
|
-
# array.delete(e)
|
40043
|
+
# @example AllowParenthesesInStringInterpolation: true
|
39849
40044
|
#
|
39850
40045
|
# # good
|
39851
|
-
# #
|
39852
|
-
# foo == bar
|
40046
|
+
# "#{t('this.is.good')}"
|
39853
40047
|
#
|
39854
40048
|
# # good
|
39855
|
-
# #
|
39856
|
-
# foo.bar = baz
|
39857
|
-
#
|
39858
|
-
# # okay with `puts` listed in `AllowedMethods`
|
39859
|
-
# puts 'test'
|
39860
|
-
#
|
39861
|
-
# # okay with `^assert` listed in `AllowedPatterns`
|
39862
|
-
# assert_equal 'test', x
|
40049
|
+
# "#{t 'this.is.also.good'}"
|
39863
40050
|
# @example EnforcedStyle: omit_parentheses
|
39864
40051
|
#
|
39865
40052
|
# # bad
|
@@ -39958,13 +40145,27 @@ RuboCop::Cop::Style::MapToSet::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
|
|
39958
40145
|
#
|
39959
40146
|
# # good
|
39960
40147
|
# "#{t 'this.is.better'}"
|
39961
|
-
# @example
|
40148
|
+
# @example EnforcedStyle: require_parentheses (default)
|
40149
|
+
#
|
40150
|
+
# # bad
|
40151
|
+
# array.delete e
|
39962
40152
|
#
|
39963
40153
|
# # good
|
39964
|
-
#
|
40154
|
+
# array.delete(e)
|
39965
40155
|
#
|
39966
40156
|
# # good
|
39967
|
-
#
|
40157
|
+
# # Operators don't need parens
|
40158
|
+
# foo == bar
|
40159
|
+
#
|
40160
|
+
# # good
|
40161
|
+
# # Setter methods don't need parens
|
40162
|
+
# foo.bar = baz
|
40163
|
+
#
|
40164
|
+
# # okay with `puts` listed in `AllowedMethods`
|
40165
|
+
# puts 'test'
|
40166
|
+
#
|
40167
|
+
# # okay with `^assert` listed in `AllowedPatterns`
|
40168
|
+
# assert_equal 'test', x
|
39968
40169
|
#
|
39969
40170
|
# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#202
|
39970
40171
|
class RuboCop::Cop::Style::MethodCallWithArgsParentheses < ::RuboCop::Cop::Base
|
@@ -39998,7 +40199,7 @@ class RuboCop::Cop::Style::MethodCallWithArgsParentheses < ::RuboCop::Cop::Base
|
|
39998
40199
|
def args_parenthesized?(node); end
|
39999
40200
|
|
40000
40201
|
class << self
|
40001
|
-
# source://rubocop-rails/2.24.
|
40202
|
+
# source://rubocop-rails/2.24.1/lib/rubocop-rails.rb#30
|
40002
40203
|
def autocorrect_incompatible_with; end
|
40003
40204
|
end
|
40004
40205
|
end
|
@@ -41619,7 +41820,7 @@ class RuboCop::Cop::Style::MutableConstant < ::RuboCop::Cop::Base
|
|
41619
41820
|
include ::RuboCop::Cop::ConfigurableEnforcedStyle
|
41620
41821
|
extend ::RuboCop::Cop::AutoCorrector
|
41621
41822
|
|
41622
|
-
# source://rubocop-sorbet/0.
|
41823
|
+
# source://rubocop-sorbet/0.8.3/lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#18
|
41623
41824
|
def on_assignment(value); end
|
41624
41825
|
|
41625
41826
|
# source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#127
|
@@ -41637,7 +41838,7 @@ class RuboCop::Cop::Style::MutableConstant < ::RuboCop::Cop::Base
|
|
41637
41838
|
# source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#217
|
41638
41839
|
def splat_value(param0 = T.unsafe(nil)); end
|
41639
41840
|
|
41640
|
-
# source://rubocop-sorbet/0.
|
41841
|
+
# source://rubocop-sorbet/0.8.3/lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#12
|
41641
41842
|
def t_let(param0 = T.unsafe(nil)); end
|
41642
41843
|
|
41643
41844
|
private
|
@@ -42945,16 +43146,16 @@ class RuboCop::Cop::Style::NumericPredicate < ::RuboCop::Cop::Base
|
|
42945
43146
|
include ::RuboCop::Cop::AllowedPattern
|
42946
43147
|
extend ::RuboCop::Cop::AutoCorrector
|
42947
43148
|
|
42948
|
-
# source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#
|
43149
|
+
# source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#174
|
42949
43150
|
def comparison(param0 = T.unsafe(nil)); end
|
42950
43151
|
|
42951
|
-
# source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#
|
43152
|
+
# source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#179
|
42952
43153
|
def inverted_comparison(param0 = T.unsafe(nil)); end
|
42953
43154
|
|
42954
43155
|
# source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#90
|
42955
43156
|
def on_send(node); end
|
42956
43157
|
|
42957
|
-
# source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#
|
43158
|
+
# source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#169
|
42958
43159
|
def predicate(param0 = T.unsafe(nil)); end
|
42959
43160
|
|
42960
43161
|
private
|
@@ -42967,23 +43168,28 @@ class RuboCop::Cop::Style::NumericPredicate < ::RuboCop::Cop::Base
|
|
42967
43168
|
# source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#111
|
42968
43169
|
def check(node); end
|
42969
43170
|
|
42970
|
-
# source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#
|
43171
|
+
# source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#154
|
42971
43172
|
def invert; end
|
42972
43173
|
|
42973
|
-
#
|
43174
|
+
# @return [Boolean]
|
43175
|
+
#
|
43176
|
+
# source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#162
|
43177
|
+
def negated?(node); end
|
43178
|
+
|
43179
|
+
# source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#134
|
42974
43180
|
def parenthesized_source(node); end
|
42975
43181
|
|
42976
43182
|
# source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#124
|
42977
|
-
def replacement(numeric, operation); end
|
43183
|
+
def replacement(node, numeric, operation); end
|
42978
43184
|
|
42979
43185
|
# @return [Boolean]
|
42980
43186
|
#
|
42981
|
-
# source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#
|
43187
|
+
# source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#146
|
42982
43188
|
def replacement_supported?(operator); end
|
42983
43189
|
|
42984
43190
|
# @return [Boolean]
|
42985
43191
|
#
|
42986
|
-
# source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#
|
43192
|
+
# source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#142
|
42987
43193
|
def require_parentheses?(node); end
|
42988
43194
|
end
|
42989
43195
|
|
@@ -44302,10 +44508,20 @@ class RuboCop::Cop::Style::RedundantArgument < ::RuboCop::Cop::Base
|
|
44302
44508
|
|
44303
44509
|
private
|
44304
44510
|
|
44305
|
-
#
|
44511
|
+
# @return [Boolean]
|
44512
|
+
#
|
44513
|
+
# source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#108
|
44514
|
+
def argument_matched?(target_argument, redundant_argument); end
|
44515
|
+
|
44516
|
+
# source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#100
|
44306
44517
|
def argument_range(node); end
|
44307
44518
|
|
44308
|
-
#
|
44519
|
+
# @return [Boolean]
|
44520
|
+
#
|
44521
|
+
# source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#120
|
44522
|
+
def exclude_cntrl_character?(target_argument, redundant_argument); end
|
44523
|
+
|
44524
|
+
# source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#93
|
44309
44525
|
def redundant_arg_for_method(method_name); end
|
44310
44526
|
|
44311
44527
|
# @return [Boolean]
|
@@ -44914,16 +45130,19 @@ class RuboCop::Cop::Style::RedundantCurrentDirectoryInPath < ::RuboCop::Cop::Bas
|
|
44914
45130
|
include ::RuboCop::Cop::RangeHelp
|
44915
45131
|
extend ::RuboCop::Cop::AutoCorrector
|
44916
45132
|
|
44917
|
-
# source://rubocop//lib/rubocop/cop/style/redundant_current_directory_in_path.rb#
|
45133
|
+
# source://rubocop//lib/rubocop/cop/style/redundant_current_directory_in_path.rb#24
|
44918
45134
|
def on_send(node); end
|
44919
45135
|
end
|
44920
45136
|
|
44921
|
-
# source://rubocop//lib/rubocop/cop/style/redundant_current_directory_in_path.rb#
|
45137
|
+
# source://rubocop//lib/rubocop/cop/style/redundant_current_directory_in_path.rb#22
|
44922
45138
|
RuboCop::Cop::Style::RedundantCurrentDirectoryInPath::CURRENT_DIRECTORY_PATH = T.let(T.unsafe(nil), String)
|
44923
45139
|
|
44924
45140
|
# source://rubocop//lib/rubocop/cop/style/redundant_current_directory_in_path.rb#20
|
44925
45141
|
RuboCop::Cop::Style::RedundantCurrentDirectoryInPath::MSG = T.let(T.unsafe(nil), String)
|
44926
45142
|
|
45143
|
+
# source://rubocop//lib/rubocop/cop/style/redundant_current_directory_in_path.rb#21
|
45144
|
+
RuboCop::Cop::Style::RedundantCurrentDirectoryInPath::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
|
45145
|
+
|
44927
45146
|
# Checks for redundant uses of double splat hash braces.
|
44928
45147
|
#
|
44929
45148
|
# @example
|
@@ -45686,12 +45905,7 @@ class RuboCop::Cop::Style::RedundantLineContinuation < ::RuboCop::Cop::Base
|
|
45686
45905
|
|
45687
45906
|
# @return [Boolean]
|
45688
45907
|
#
|
45689
|
-
# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#
|
45690
|
-
def allowed_type?(node); end
|
45691
|
-
|
45692
|
-
# @return [Boolean]
|
45693
|
-
#
|
45694
|
-
# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#186
|
45908
|
+
# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#182
|
45695
45909
|
def argument_is_method?(node); end
|
45696
45910
|
|
45697
45911
|
# @return [Boolean]
|
@@ -45709,7 +45923,7 @@ class RuboCop::Cop::Style::RedundantLineContinuation < ::RuboCop::Cop::Base
|
|
45709
45923
|
|
45710
45924
|
# @return [Boolean]
|
45711
45925
|
#
|
45712
|
-
# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#
|
45926
|
+
# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#131
|
45713
45927
|
def inside_string_literal?(range, token); end
|
45714
45928
|
|
45715
45929
|
# @return [Boolean]
|
@@ -45724,7 +45938,7 @@ class RuboCop::Cop::Style::RedundantLineContinuation < ::RuboCop::Cop::Base
|
|
45724
45938
|
|
45725
45939
|
# @return [Boolean]
|
45726
45940
|
#
|
45727
|
-
# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#
|
45941
|
+
# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#189
|
45728
45942
|
def method_call_with_arguments?(node); end
|
45729
45943
|
|
45730
45944
|
# A method call without parentheses such as the following cannot remove `\`:
|
@@ -45734,7 +45948,7 @@ class RuboCop::Cop::Style::RedundantLineContinuation < ::RuboCop::Cop::Base
|
|
45734
45948
|
#
|
45735
45949
|
# @return [Boolean]
|
45736
45950
|
#
|
45737
|
-
# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#
|
45951
|
+
# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#139
|
45738
45952
|
def method_with_argument?(current_token, next_token); end
|
45739
45953
|
|
45740
45954
|
# @return [Boolean]
|
@@ -45749,12 +45963,12 @@ class RuboCop::Cop::Style::RedundantLineContinuation < ::RuboCop::Cop::Base
|
|
45749
45963
|
|
45750
45964
|
# @return [Boolean]
|
45751
45965
|
#
|
45752
|
-
# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#
|
45966
|
+
# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#168
|
45753
45967
|
def same_line?(node, line); end
|
45754
45968
|
|
45755
45969
|
# @return [Boolean]
|
45756
45970
|
#
|
45757
|
-
# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#
|
45971
|
+
# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#193
|
45758
45972
|
def start_with_arithmetic_operator?(source_line); end
|
45759
45973
|
|
45760
45974
|
# @return [Boolean]
|
@@ -46567,7 +46781,7 @@ class RuboCop::Cop::Style::RedundantSelf < ::RuboCop::Cop::Base
|
|
46567
46781
|
def regular_method_call?(node); end
|
46568
46782
|
|
46569
46783
|
class << self
|
46570
|
-
# source://rubocop-rails/2.24.
|
46784
|
+
# source://rubocop-rails/2.24.1/lib/rubocop-rails.rb#38
|
46571
46785
|
def autocorrect_incompatible_with; end
|
46572
46786
|
end
|
46573
46787
|
end
|
@@ -48085,12 +48299,12 @@ RuboCop::Cop::Style::Semicolon::MSG = T.let(T.unsafe(nil), String)
|
|
48085
48299
|
#
|
48086
48300
|
# @example
|
48087
48301
|
# # bad
|
48088
|
-
# Foo.send(
|
48089
|
-
# quuz.send(
|
48302
|
+
# Foo.send(bar)
|
48303
|
+
# quuz.send(fred)
|
48090
48304
|
#
|
48091
48305
|
# # good
|
48092
|
-
# Foo.__send__(
|
48093
|
-
# quuz.public_send(
|
48306
|
+
# Foo.__send__(bar)
|
48307
|
+
# quuz.public_send(fred)
|
48094
48308
|
#
|
48095
48309
|
# source://rubocop//lib/rubocop/cop/style/send.rb#16
|
48096
48310
|
class RuboCop::Cop::Style::Send < ::RuboCop::Cop::Base
|
@@ -48716,13 +48930,30 @@ RuboCop::Cop::Style::SoleNestedConditional::MSG = T.let(T.unsafe(nil), String)
|
|
48716
48930
|
# will add a require statement to the top of the file if
|
48717
48931
|
# enabled by RequireEnglish config.
|
48718
48932
|
#
|
48719
|
-
#
|
48720
|
-
#
|
48933
|
+
# @example EnforcedStyle: use_english_names (default)
|
48721
48934
|
# # good
|
48935
|
+
# require 'English' # or this could be in another file.
|
48936
|
+
#
|
48722
48937
|
# puts $LOAD_PATH
|
48723
48938
|
# puts $LOADED_FEATURES
|
48724
48939
|
# puts $PROGRAM_NAME
|
48725
|
-
# puts
|
48940
|
+
# puts $ERROR_INFO
|
48941
|
+
# puts $ERROR_POSITION
|
48942
|
+
# puts $FIELD_SEPARATOR # or $FS
|
48943
|
+
# puts $OUTPUT_FIELD_SEPARATOR # or $OFS
|
48944
|
+
# puts $INPUT_RECORD_SEPARATOR # or $RS
|
48945
|
+
# puts $OUTPUT_RECORD_SEPARATOR # or $ORS
|
48946
|
+
# puts $INPUT_LINE_NUMBER # or $NR
|
48947
|
+
# puts $LAST_READ_LINE
|
48948
|
+
# puts $DEFAULT_OUTPUT
|
48949
|
+
# puts $DEFAULT_INPUT
|
48950
|
+
# puts $PROCESS_ID # or $PID
|
48951
|
+
# puts $CHILD_STATUS
|
48952
|
+
# puts $LAST_MATCH_INFO
|
48953
|
+
# puts $IGNORECASE
|
48954
|
+
# puts $ARGV # or ARGV
|
48955
|
+
# @example EnforcedStyle: use_perl_names
|
48956
|
+
# # good
|
48726
48957
|
# puts $:
|
48727
48958
|
# puts $"
|
48728
48959
|
# puts $0
|
@@ -48741,31 +48972,14 @@ RuboCop::Cop::Style::SoleNestedConditional::MSG = T.let(T.unsafe(nil), String)
|
|
48741
48972
|
# puts $~
|
48742
48973
|
# puts $=
|
48743
48974
|
# puts $*
|
48975
|
+
# @example EnforcedStyle: use_builtin_english_names
|
48744
48976
|
#
|
48745
|
-
# @example EnforcedStyle: use_english_names (default)
|
48746
48977
|
# # good
|
48747
|
-
#
|
48748
|
-
#
|
48978
|
+
# # Like `use_perl_names` but allows builtin global vars.
|
48749
48979
|
# puts $LOAD_PATH
|
48750
48980
|
# puts $LOADED_FEATURES
|
48751
48981
|
# puts $PROGRAM_NAME
|
48752
|
-
# puts
|
48753
|
-
# puts $ERROR_POSITION
|
48754
|
-
# puts $FIELD_SEPARATOR # or $FS
|
48755
|
-
# puts $OUTPUT_FIELD_SEPARATOR # or $OFS
|
48756
|
-
# puts $INPUT_RECORD_SEPARATOR # or $RS
|
48757
|
-
# puts $OUTPUT_RECORD_SEPARATOR # or $ORS
|
48758
|
-
# puts $INPUT_LINE_NUMBER # or $NR
|
48759
|
-
# puts $LAST_READ_LINE
|
48760
|
-
# puts $DEFAULT_OUTPUT
|
48761
|
-
# puts $DEFAULT_INPUT
|
48762
|
-
# puts $PROCESS_ID # or $PID
|
48763
|
-
# puts $CHILD_STATUS
|
48764
|
-
# puts $LAST_MATCH_INFO
|
48765
|
-
# puts $IGNORECASE
|
48766
|
-
# puts $ARGV # or ARGV
|
48767
|
-
# @example EnforcedStyle: use_perl_names
|
48768
|
-
# # good
|
48982
|
+
# puts ARGV
|
48769
48983
|
# puts $:
|
48770
48984
|
# puts $"
|
48771
48985
|
# puts $0
|
@@ -48784,90 +48998,89 @@ RuboCop::Cop::Style::SoleNestedConditional::MSG = T.let(T.unsafe(nil), String)
|
|
48784
48998
|
# puts $~
|
48785
48999
|
# puts $=
|
48786
49000
|
# puts $*
|
48787
|
-
# @example EnforcedStyle: use_builtin_english_names
|
48788
49001
|
#
|
48789
|
-
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#
|
49002
|
+
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#86
|
48790
49003
|
class RuboCop::Cop::Style::SpecialGlobalVars < ::RuboCop::Cop::Base
|
48791
49004
|
include ::RuboCop::Cop::ConfigurableEnforcedStyle
|
48792
49005
|
include ::RuboCop::Cop::RangeHelp
|
48793
49006
|
include ::RuboCop::Cop::RequireLibrary
|
48794
49007
|
extend ::RuboCop::Cop::AutoCorrector
|
48795
49008
|
|
48796
|
-
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#
|
49009
|
+
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#175
|
48797
49010
|
def autocorrect(corrector, node, global_var); end
|
48798
49011
|
|
48799
|
-
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#
|
49012
|
+
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#167
|
48800
49013
|
def message(global_var); end
|
48801
49014
|
|
48802
|
-
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#
|
49015
|
+
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#151
|
48803
49016
|
def on_gvar(node); end
|
48804
49017
|
|
48805
|
-
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#
|
49018
|
+
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#146
|
48806
49019
|
def on_new_investigation; end
|
48807
49020
|
|
48808
49021
|
private
|
48809
49022
|
|
48810
49023
|
# @return [Boolean]
|
48811
49024
|
#
|
48812
|
-
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#
|
49025
|
+
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#246
|
48813
49026
|
def add_require_english?; end
|
48814
49027
|
|
48815
|
-
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#
|
49028
|
+
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#240
|
48816
49029
|
def english_name_replacement(preferred_name, node); end
|
48817
49030
|
|
48818
|
-
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#
|
49031
|
+
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#189
|
48819
49032
|
def format_english_message(global_var); end
|
48820
49033
|
|
48821
49034
|
# For now, we assume that lists are 2 items or less. Easy grammar!
|
48822
49035
|
#
|
48823
|
-
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#
|
49036
|
+
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#211
|
48824
49037
|
def format_list(items); end
|
48825
49038
|
|
48826
|
-
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#
|
49039
|
+
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#197
|
48827
49040
|
def format_message(english, regular, global); end
|
48828
49041
|
|
48829
|
-
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#
|
49042
|
+
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#234
|
48830
49043
|
def matching_styles(global); end
|
48831
49044
|
|
48832
|
-
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#
|
49045
|
+
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#226
|
48833
49046
|
def preferred_names(global); end
|
48834
49047
|
|
48835
|
-
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#
|
49048
|
+
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#215
|
48836
49049
|
def replacement(node, global_var); end
|
48837
49050
|
|
48838
49051
|
# @return [Boolean]
|
48839
49052
|
#
|
48840
|
-
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#
|
49053
|
+
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#250
|
48841
49054
|
def should_require_english?(global_var); end
|
48842
49055
|
end
|
48843
49056
|
|
48844
|
-
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#
|
49057
|
+
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#127
|
48845
49058
|
RuboCop::Cop::Style::SpecialGlobalVars::BUILTIN_VARS = T.let(T.unsafe(nil), Hash)
|
48846
49059
|
|
48847
|
-
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#
|
49060
|
+
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#99
|
48848
49061
|
RuboCop::Cop::Style::SpecialGlobalVars::ENGLISH_VARS = T.let(T.unsafe(nil), Hash)
|
48849
49062
|
|
48850
|
-
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#
|
49063
|
+
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#144
|
48851
49064
|
RuboCop::Cop::Style::SpecialGlobalVars::LIBRARY_NAME = T.let(T.unsafe(nil), String)
|
48852
49065
|
|
48853
|
-
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#
|
49066
|
+
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#92
|
48854
49067
|
RuboCop::Cop::Style::SpecialGlobalVars::MSG_BOTH = T.let(T.unsafe(nil), String)
|
48855
49068
|
|
48856
|
-
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#
|
49069
|
+
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#95
|
48857
49070
|
RuboCop::Cop::Style::SpecialGlobalVars::MSG_ENGLISH = T.let(T.unsafe(nil), String)
|
48858
49071
|
|
48859
|
-
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#
|
49072
|
+
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#97
|
48860
49073
|
RuboCop::Cop::Style::SpecialGlobalVars::MSG_REGULAR = T.let(T.unsafe(nil), String)
|
48861
49074
|
|
48862
49075
|
# Anything *not* in this set is provided by the English library.
|
48863
49076
|
#
|
48864
|
-
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#
|
49077
|
+
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#121
|
48865
49078
|
RuboCop::Cop::Style::SpecialGlobalVars::NON_ENGLISH_VARS = T.let(T.unsafe(nil), Set)
|
48866
49079
|
|
48867
|
-
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#
|
49080
|
+
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#123
|
48868
49081
|
RuboCop::Cop::Style::SpecialGlobalVars::PERL_VARS = T.let(T.unsafe(nil), Hash)
|
48869
49082
|
|
48870
|
-
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#
|
49083
|
+
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#138
|
48871
49084
|
RuboCop::Cop::Style::SpecialGlobalVars::STYLE_VARS_MAP = T.let(T.unsafe(nil), Hash)
|
48872
49085
|
|
48873
49086
|
# Check for parentheses around stabby lambda arguments.
|
@@ -49692,13 +49905,9 @@ RuboCop::Cop::Style::SymbolLiteral::MSG = T.let(T.unsafe(nil), String)
|
|
49692
49905
|
# `define_method?` methods are allowed by default.
|
49693
49906
|
# These are customizable with `AllowedMethods` option.
|
49694
49907
|
#
|
49695
|
-
# @example
|
49696
|
-
# # bad
|
49697
|
-
# something.map { |s| s.upcase }
|
49698
|
-
# something.map { _1.upcase }
|
49699
|
-
#
|
49908
|
+
# @example AllowedPatterns: ['map'] (default)
|
49700
49909
|
# # good
|
49701
|
-
# something.map
|
49910
|
+
# something.map { |s| s.upcase }
|
49702
49911
|
# @example AllowMethodsWithArguments: false (default)
|
49703
49912
|
# # bad
|
49704
49913
|
# something.do_something(foo) { |o| o.bar }
|
@@ -49728,9 +49937,13 @@ RuboCop::Cop::Style::SymbolLiteral::MSG = T.let(T.unsafe(nil), String)
|
|
49728
49937
|
# @example AllowedPatterns: [] (default)
|
49729
49938
|
# # bad
|
49730
49939
|
# something.map { |s| s.upcase }
|
49731
|
-
# @example
|
49732
|
-
# #
|
49940
|
+
# @example
|
49941
|
+
# # bad
|
49733
49942
|
# something.map { |s| s.upcase }
|
49943
|
+
# something.map { _1.upcase }
|
49944
|
+
#
|
49945
|
+
# # good
|
49946
|
+
# something.map(&:upcase)
|
49734
49947
|
#
|
49735
49948
|
# source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#123
|
49736
49949
|
class RuboCop::Cop::Style::SymbolProc < ::RuboCop::Cop::Base
|
@@ -50674,26 +50887,10 @@ RuboCop::Cop::Style::TrailingUnderscoreVariable::UNDERSCORE = T.let(T.unsafe(nil
|
|
50674
50887
|
# `to_open`, `to_path`, `to_proc`, `to_r`, `to_regexp`, `to_str`, `to_s`, and `to_sym` methods
|
50675
50888
|
# are allowed by default. These are customizable with `AllowedMethods` option.
|
50676
50889
|
#
|
50677
|
-
# @example
|
50678
|
-
# # bad
|
50679
|
-
# def foo
|
50680
|
-
# @foo
|
50681
|
-
# end
|
50682
|
-
#
|
50683
|
-
# def bar=(val)
|
50684
|
-
# @bar = val
|
50685
|
-
# end
|
50686
|
-
#
|
50687
|
-
# def self.baz
|
50688
|
-
# @baz
|
50689
|
-
# end
|
50690
|
-
#
|
50890
|
+
# @example AllowedMethods: ['allowed_method']
|
50691
50891
|
# # good
|
50692
|
-
#
|
50693
|
-
#
|
50694
|
-
#
|
50695
|
-
# class << self
|
50696
|
-
# attr_reader :baz
|
50892
|
+
# def allowed_method
|
50893
|
+
# @foo
|
50697
50894
|
# end
|
50698
50895
|
# @example ExactNameMatch: true (default)
|
50699
50896
|
# # good
|
@@ -50746,12 +50943,28 @@ RuboCop::Cop::Style::TrailingUnderscoreVariable::UNDERSCORE = T.let(T.unsafe(nil
|
|
50746
50943
|
# def self.foo
|
50747
50944
|
# @foo
|
50748
50945
|
# end
|
50749
|
-
# @example
|
50750
|
-
# #
|
50751
|
-
# def
|
50946
|
+
# @example
|
50947
|
+
# # bad
|
50948
|
+
# def foo
|
50752
50949
|
# @foo
|
50753
50950
|
# end
|
50754
50951
|
#
|
50952
|
+
# def bar=(val)
|
50953
|
+
# @bar = val
|
50954
|
+
# end
|
50955
|
+
#
|
50956
|
+
# def self.baz
|
50957
|
+
# @baz
|
50958
|
+
# end
|
50959
|
+
#
|
50960
|
+
# # good
|
50961
|
+
# attr_reader :foo
|
50962
|
+
# attr_writer :bar
|
50963
|
+
#
|
50964
|
+
# class << self
|
50965
|
+
# attr_reader :baz
|
50966
|
+
# end
|
50967
|
+
#
|
50755
50968
|
# source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#98
|
50756
50969
|
class RuboCop::Cop::Style::TrivialAccessors < ::RuboCop::Cop::Base
|
50757
50970
|
include ::RuboCop::Cop::AllowedMethods
|
@@ -51799,22 +52012,22 @@ class RuboCop::Cop::Team
|
|
51799
52012
|
# source://rubocop//lib/rubocop/cop/team.rb#121
|
51800
52013
|
def autocorrect(processed_source, report, original:, offset:); end
|
51801
52014
|
|
51802
|
-
# source://rubocop//lib/rubocop/cop/team.rb#
|
52015
|
+
# source://rubocop//lib/rubocop/cop/team.rb#185
|
51803
52016
|
def autocorrect_report(report, offset:, original:); end
|
51804
52017
|
|
51805
52018
|
# source://rubocop//lib/rubocop/cop/team.rb#140
|
51806
52019
|
def be_ready; end
|
51807
52020
|
|
51808
|
-
# source://rubocop//lib/rubocop/cop/team.rb#
|
52021
|
+
# source://rubocop//lib/rubocop/cop/team.rb#191
|
51809
52022
|
def collate_corrections(report, offset:, original:); end
|
51810
52023
|
|
51811
|
-
# source://rubocop//lib/rubocop/cop/team.rb#
|
52024
|
+
# source://rubocop//lib/rubocop/cop/team.rb#207
|
51812
52025
|
def each_corrector(report); end
|
51813
52026
|
|
51814
|
-
# source://rubocop//lib/rubocop/cop/team.rb#
|
52027
|
+
# source://rubocop//lib/rubocop/cop/team.rb#257
|
51815
52028
|
def handle_error(error, location, cop); end
|
51816
52029
|
|
51817
|
-
# source://rubocop//lib/rubocop/cop/team.rb#
|
52030
|
+
# source://rubocop//lib/rubocop/cop/team.rb#249
|
51818
52031
|
def handle_warning(error, location); end
|
51819
52032
|
|
51820
52033
|
# @return [Commissioner::InvestigationReport]
|
@@ -51822,7 +52035,7 @@ class RuboCop::Cop::Team
|
|
51822
52035
|
# source://rubocop//lib/rubocop/cop/team.rb#154
|
51823
52036
|
def investigate_partial(cops, processed_source, offset:, original:); end
|
51824
52037
|
|
51825
|
-
# source://rubocop//lib/rubocop/cop/team.rb#
|
52038
|
+
# source://rubocop//lib/rubocop/cop/team.rb#234
|
51826
52039
|
def process_errors(file, errors); end
|
51827
52040
|
|
51828
52041
|
# source://rubocop//lib/rubocop/cop/team.rb#148
|
@@ -51843,10 +52056,10 @@ class RuboCop::Cop::Team
|
|
51843
52056
|
# source://rubocop//lib/rubocop/cop/team.rb#170
|
51844
52057
|
def support_target_ruby_version?(cop); end
|
51845
52058
|
|
51846
|
-
# source://rubocop//lib/rubocop/cop/team.rb#
|
52059
|
+
# source://rubocop//lib/rubocop/cop/team.rb#222
|
51847
52060
|
def suppress_clobbering; end
|
51848
52061
|
|
51849
|
-
# source://rubocop//lib/rubocop/cop/team.rb#
|
52062
|
+
# source://rubocop//lib/rubocop/cop/team.rb#228
|
51850
52063
|
def validate_config; end
|
51851
52064
|
|
51852
52065
|
class << self
|
@@ -54368,10 +54581,10 @@ class RuboCop::Formatter::ClangStyleFormatter < ::RuboCop::Formatter::SimpleText
|
|
54368
54581
|
|
54369
54582
|
private
|
54370
54583
|
|
54371
|
-
# source://rubocop//lib/rubocop/formatter/clang_style_formatter.rb#
|
54584
|
+
# source://rubocop//lib/rubocop/formatter/clang_style_formatter.rb#47
|
54372
54585
|
def report_highlighted_area(highlighted_area); end
|
54373
54586
|
|
54374
|
-
# source://rubocop//lib/rubocop/formatter/clang_style_formatter.rb#
|
54587
|
+
# source://rubocop//lib/rubocop/formatter/clang_style_formatter.rb#37
|
54375
54588
|
def report_line(location); end
|
54376
54589
|
|
54377
54590
|
# source://rubocop//lib/rubocop/formatter/clang_style_formatter.rb#17
|
@@ -54379,7 +54592,7 @@ class RuboCop::Formatter::ClangStyleFormatter < ::RuboCop::Formatter::SimpleText
|
|
54379
54592
|
|
54380
54593
|
# @return [Boolean]
|
54381
54594
|
#
|
54382
|
-
# source://rubocop//lib/rubocop/formatter/clang_style_formatter.rb#
|
54595
|
+
# source://rubocop//lib/rubocop/formatter/clang_style_formatter.rb#33
|
54383
54596
|
def valid_line?(offense); end
|
54384
54597
|
end
|
54385
54598
|
|
@@ -55189,10 +55402,10 @@ RuboCop::Formatter::PacmanFormatter::FALLBACK_TERMINAL_WIDTH = T.let(T.unsafe(ni
|
|
55189
55402
|
RuboCop::Formatter::PacmanFormatter::GHOST = T.let(T.unsafe(nil), String)
|
55190
55403
|
|
55191
55404
|
# source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#17
|
55192
|
-
RuboCop::Formatter::PacmanFormatter::PACDOT = T.let(T.unsafe(nil), Rainbow::
|
55405
|
+
RuboCop::Formatter::PacmanFormatter::PACDOT = T.let(T.unsafe(nil), Rainbow::Presenter)
|
55193
55406
|
|
55194
55407
|
# source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#16
|
55195
|
-
RuboCop::Formatter::PacmanFormatter::PACMAN = T.let(T.unsafe(nil), Rainbow::
|
55408
|
+
RuboCop::Formatter::PacmanFormatter::PACMAN = T.let(T.unsafe(nil), Rainbow::Presenter)
|
55196
55409
|
|
55197
55410
|
# This formatter display dots for files with no offenses and
|
55198
55411
|
# letters for files with problems in the them. In the end it
|
@@ -55322,10 +55535,10 @@ class RuboCop::Formatter::TapFormatter < ::RuboCop::Formatter::ClangStyleFormatt
|
|
55322
55535
|
|
55323
55536
|
private
|
55324
55537
|
|
55325
|
-
# source://rubocop//lib/rubocop/formatter/tap_formatter.rb#
|
55538
|
+
# source://rubocop//lib/rubocop/formatter/tap_formatter.rb#62
|
55326
55539
|
def annotate_message(msg); end
|
55327
55540
|
|
55328
|
-
# source://rubocop//lib/rubocop/formatter/tap_formatter.rb#
|
55541
|
+
# source://rubocop//lib/rubocop/formatter/tap_formatter.rb#66
|
55329
55542
|
def message(offense); end
|
55330
55543
|
|
55331
55544
|
# source://rubocop//lib/rubocop/formatter/tap_formatter.rb#39
|
@@ -55482,47 +55695,47 @@ class RuboCop::LSP::Routes
|
|
55482
55695
|
|
55483
55696
|
# @api private
|
55484
55697
|
#
|
55485
|
-
# source://rubocop//lib/rubocop/lsp/routes.rb#
|
55698
|
+
# source://rubocop//lib/rubocop/lsp/routes.rb#169
|
55486
55699
|
def handle_method_missing(request); end
|
55487
55700
|
|
55488
|
-
# source://rubocop//lib/rubocop/lsp/routes.rb#
|
55701
|
+
# source://rubocop//lib/rubocop/lsp/routes.rb#68
|
55489
55702
|
def handle_shutdown(request); end
|
55490
55703
|
|
55491
55704
|
# @api private
|
55492
55705
|
#
|
55493
|
-
# source://rubocop//lib/rubocop/lsp/routes.rb#
|
55706
|
+
# source://rubocop//lib/rubocop/lsp/routes.rb#158
|
55494
55707
|
def handle_unsupported_method(request, method = T.unsafe(nil)); end
|
55495
55708
|
|
55496
55709
|
private
|
55497
55710
|
|
55498
55711
|
# @api private
|
55499
55712
|
#
|
55500
|
-
# source://rubocop//lib/rubocop/lsp/routes.rb#
|
55713
|
+
# source://rubocop//lib/rubocop/lsp/routes.rb#207
|
55501
55714
|
def diagnostic(file_uri, text); end
|
55502
55715
|
|
55503
55716
|
# @api private
|
55504
55717
|
#
|
55505
|
-
# source://rubocop//lib/rubocop/lsp/routes.rb#
|
55718
|
+
# source://rubocop//lib/rubocop/lsp/routes.rb#177
|
55506
55719
|
def extract_initialization_options_from(request); end
|
55507
55720
|
|
55508
55721
|
# @api private
|
55509
55722
|
#
|
55510
|
-
# source://rubocop//lib/rubocop/lsp/routes.rb#
|
55723
|
+
# source://rubocop//lib/rubocop/lsp/routes.rb#187
|
55511
55724
|
def format_file(file_uri, command: T.unsafe(nil)); end
|
55512
55725
|
|
55513
55726
|
# @api private
|
55514
55727
|
#
|
55515
|
-
# source://rubocop//lib/rubocop/lsp/routes.rb#
|
55728
|
+
# source://rubocop//lib/rubocop/lsp/routes.rb#221
|
55516
55729
|
def remove_file_protocol_from(uri); end
|
55517
55730
|
|
55518
55731
|
# @api private
|
55519
55732
|
#
|
55520
|
-
# source://rubocop//lib/rubocop/lsp/routes.rb#
|
55733
|
+
# source://rubocop//lib/rubocop/lsp/routes.rb#225
|
55521
55734
|
def to_diagnostic(offense); end
|
55522
55735
|
|
55523
55736
|
# @api private
|
55524
55737
|
#
|
55525
|
-
# source://rubocop//lib/rubocop/lsp/routes.rb#
|
55738
|
+
# source://rubocop//lib/rubocop/lsp/routes.rb#237
|
55526
55739
|
def to_range(location); end
|
55527
55740
|
|
55528
55741
|
class << self
|
@@ -55616,32 +55829,32 @@ class RuboCop::LSP::Server
|
|
55616
55829
|
|
55617
55830
|
# @api private
|
55618
55831
|
#
|
55619
|
-
# source://rubocop//lib/rubocop/lsp/server.rb#
|
55832
|
+
# source://rubocop//lib/rubocop/lsp/server.rb#61
|
55620
55833
|
def configure(options); end
|
55621
55834
|
|
55622
55835
|
# @api private
|
55623
55836
|
#
|
55624
|
-
# source://rubocop//lib/rubocop/lsp/server.rb#
|
55837
|
+
# source://rubocop//lib/rubocop/lsp/server.rb#53
|
55625
55838
|
def format(path, text, command:); end
|
55626
55839
|
|
55627
55840
|
# @api private
|
55628
55841
|
#
|
55629
|
-
# source://rubocop//lib/rubocop/lsp/server.rb#
|
55842
|
+
# source://rubocop//lib/rubocop/lsp/server.rb#57
|
55630
55843
|
def offenses(path, text); end
|
55631
55844
|
|
55632
55845
|
# @api private
|
55633
55846
|
#
|
55634
|
-
# source://rubocop//lib/rubocop/lsp/server.rb#
|
55847
|
+
# source://rubocop//lib/rubocop/lsp/server.rb#34
|
55635
55848
|
def start; end
|
55636
55849
|
|
55637
55850
|
# @api private
|
55638
55851
|
#
|
55639
|
-
# source://rubocop//lib/rubocop/lsp/server.rb#
|
55852
|
+
# source://rubocop//lib/rubocop/lsp/server.rb#67
|
55640
55853
|
def stop(&block); end
|
55641
55854
|
|
55642
55855
|
# @api private
|
55643
55856
|
#
|
55644
|
-
# source://rubocop//lib/rubocop/lsp/server.rb#
|
55857
|
+
# source://rubocop//lib/rubocop/lsp/server.rb#49
|
55645
55858
|
def write(response); end
|
55646
55859
|
end
|
55647
55860
|
|
@@ -55669,33 +55882,61 @@ RuboCop::LSP::Severity::SEVERITIES = T.let(T.unsafe(nil), Hash)
|
|
55669
55882
|
#
|
55670
55883
|
# @api private
|
55671
55884
|
#
|
55672
|
-
# source://rubocop//lib/rubocop/lockfile.rb#
|
55885
|
+
# source://rubocop//lib/rubocop/lockfile.rb#15
|
55673
55886
|
class RuboCop::Lockfile
|
55674
|
-
#
|
55887
|
+
# @api private
|
55888
|
+
# @param lockfile_path [String, Pathname, nil]
|
55889
|
+
# @return [Lockfile] a new instance of Lockfile
|
55890
|
+
#
|
55891
|
+
# source://rubocop//lib/rubocop/lockfile.rb#17
|
55892
|
+
def initialize(lockfile_path = T.unsafe(nil)); end
|
55893
|
+
|
55894
|
+
# Gems that the bundle directly depends on.
|
55675
55895
|
#
|
55676
55896
|
# @api private
|
55897
|
+
# @return [Array<Bundler::Dependency>, nil]
|
55677
55898
|
#
|
55678
|
-
# source://rubocop//lib/rubocop/lockfile.rb#
|
55899
|
+
# source://rubocop//lib/rubocop/lockfile.rb#29
|
55679
55900
|
def dependencies; end
|
55680
55901
|
|
55681
|
-
#
|
55902
|
+
# Returns the locked versions of gems from this lockfile.
|
55903
|
+
#
|
55904
|
+
# @api private
|
55905
|
+
# @param include_transitive_dependencies: [Boolean] When false, only direct dependencies
|
55906
|
+
# are returned, i.e. those listed explicitly in the `Gemfile`.
|
55907
|
+
#
|
55908
|
+
# source://rubocop//lib/rubocop/lockfile.rb#49
|
55909
|
+
def gem_versions(include_transitive_dependencies: T.unsafe(nil)); end
|
55910
|
+
|
55911
|
+
# All activated gems, including transitive dependencies.
|
55682
55912
|
#
|
55683
55913
|
# @api private
|
55914
|
+
# @return [Array<Bundler::Dependency>, nil]
|
55684
55915
|
#
|
55685
|
-
# source://rubocop//lib/rubocop/lockfile.rb#
|
55916
|
+
# source://rubocop//lib/rubocop/lockfile.rb#37
|
55686
55917
|
def gems; end
|
55687
55918
|
|
55919
|
+
# Whether this lockfile includes the named gem, directly or indirectly.
|
55920
|
+
#
|
55688
55921
|
# @api private
|
55922
|
+
# @param name [String]
|
55689
55923
|
# @return [Boolean]
|
55690
55924
|
#
|
55691
|
-
# source://rubocop//lib/rubocop/lockfile.rb#
|
55925
|
+
# source://rubocop//lib/rubocop/lockfile.rb#65
|
55692
55926
|
def includes_gem?(name); end
|
55693
55927
|
|
55694
55928
|
private
|
55695
55929
|
|
55696
55930
|
# @api private
|
55931
|
+
# @return [Boolean]
|
55932
|
+
#
|
55933
|
+
# source://rubocop//lib/rubocop/lockfile.rb#85
|
55934
|
+
def bundler_lock_parser_defined?; end
|
55935
|
+
|
55936
|
+
# @api private
|
55937
|
+
# @return [Bundler::LockfileParser, nil]
|
55697
55938
|
#
|
55698
|
-
# source://rubocop//lib/rubocop/lockfile.rb#
|
55939
|
+
# source://rubocop//lib/rubocop/lockfile.rb#72
|
55699
55940
|
def parser; end
|
55700
55941
|
end
|
55701
55942
|
|
@@ -56719,145 +56960,145 @@ RuboCop::ResultCache::NON_CHANGING = T.let(T.unsafe(nil), Array)
|
|
56719
56960
|
class RuboCop::Runner
|
56720
56961
|
# @return [Runner] a new instance of Runner
|
56721
56962
|
#
|
56722
|
-
# source://rubocop//lib/rubocop/runner.rb#
|
56963
|
+
# source://rubocop//lib/rubocop/runner.rb#63
|
56723
56964
|
def initialize(options, config_store); end
|
56724
56965
|
|
56725
56966
|
# Sets the attribute aborting
|
56726
56967
|
#
|
56727
56968
|
# @param value the value to set the attribute aborting to.
|
56728
56969
|
#
|
56729
|
-
# source://rubocop//lib/rubocop/runner.rb#
|
56970
|
+
# source://rubocop//lib/rubocop/runner.rb#61
|
56730
56971
|
def aborting=(_arg0); end
|
56731
56972
|
|
56732
56973
|
# @return [Boolean]
|
56733
56974
|
#
|
56734
|
-
# source://rubocop//lib/rubocop/runner.rb#
|
56975
|
+
# source://rubocop//lib/rubocop/runner.rb#87
|
56735
56976
|
def aborting?; end
|
56736
56977
|
|
56737
56978
|
# Returns the value of attribute errors.
|
56738
56979
|
#
|
56739
|
-
# source://rubocop//lib/rubocop/runner.rb#
|
56980
|
+
# source://rubocop//lib/rubocop/runner.rb#60
|
56740
56981
|
def errors; end
|
56741
56982
|
|
56742
|
-
# source://rubocop//lib/rubocop/runner.rb#
|
56983
|
+
# source://rubocop//lib/rubocop/runner.rb#71
|
56743
56984
|
def run(paths); end
|
56744
56985
|
|
56745
56986
|
# Returns the value of attribute warnings.
|
56746
56987
|
#
|
56747
|
-
# source://rubocop//lib/rubocop/runner.rb#
|
56988
|
+
# source://rubocop//lib/rubocop/runner.rb#60
|
56748
56989
|
def warnings; end
|
56749
56990
|
|
56750
56991
|
private
|
56751
56992
|
|
56752
|
-
# source://rubocop//lib/rubocop/runner.rb#
|
56993
|
+
# source://rubocop//lib/rubocop/runner.rb#200
|
56753
56994
|
def add_redundant_disables(file, offenses, source); end
|
56754
56995
|
|
56755
|
-
# source://rubocop//lib/rubocop/runner.rb#
|
56996
|
+
# source://rubocop//lib/rubocop/runner.rb#174
|
56756
56997
|
def cached_result(file, team); end
|
56757
56998
|
|
56758
56999
|
# @return [Boolean]
|
56759
57000
|
#
|
56760
|
-
# source://rubocop//lib/rubocop/runner.rb#
|
57001
|
+
# source://rubocop//lib/rubocop/runner.rb#254
|
56761
57002
|
def cached_run?; end
|
56762
57003
|
|
56763
57004
|
# Check whether a run created source identical to a previous run, which
|
56764
57005
|
# means that we definitely have an infinite loop.
|
56765
57006
|
#
|
56766
|
-
# source://rubocop//lib/rubocop/runner.rb#
|
57007
|
+
# source://rubocop//lib/rubocop/runner.rb#332
|
56767
57008
|
def check_for_infinite_loop(processed_source, offenses_by_iteration); end
|
56768
57009
|
|
56769
57010
|
# @return [Boolean]
|
56770
57011
|
#
|
56771
|
-
# source://rubocop//lib/rubocop/runner.rb#
|
57012
|
+
# source://rubocop//lib/rubocop/runner.rb#226
|
56772
57013
|
def check_for_redundant_disables?(source); end
|
56773
57014
|
|
56774
57015
|
# @return [Boolean]
|
56775
57016
|
#
|
56776
|
-
# source://rubocop//lib/rubocop/runner.rb#
|
57017
|
+
# source://rubocop//lib/rubocop/runner.rb#427
|
56777
57018
|
def considered_failure?(offense); end
|
56778
57019
|
|
56779
|
-
# source://rubocop//lib/rubocop/runner.rb#
|
57020
|
+
# source://rubocop//lib/rubocop/runner.rb#460
|
56780
57021
|
def default_config(cop_name); end
|
56781
57022
|
|
56782
|
-
# source://rubocop//lib/rubocop/runner.rb#
|
57023
|
+
# source://rubocop//lib/rubocop/runner.rb#276
|
56783
57024
|
def do_inspection_loop(file); end
|
56784
57025
|
|
56785
|
-
# source://rubocop//lib/rubocop/runner.rb#
|
57026
|
+
# source://rubocop//lib/rubocop/runner.rb#137
|
56786
57027
|
def each_inspected_file(files); end
|
56787
57028
|
|
56788
57029
|
# @return [Boolean]
|
56789
57030
|
#
|
56790
|
-
# source://rubocop//lib/rubocop/runner.rb#
|
57031
|
+
# source://rubocop//lib/rubocop/runner.rb#240
|
56791
57032
|
def except_redundant_cop_disable_directive?; end
|
56792
57033
|
|
56793
|
-
# source://rubocop//lib/rubocop/runner.rb#
|
57034
|
+
# source://rubocop//lib/rubocop/runner.rb#361
|
56794
57035
|
def extract_ruby_sources(processed_source); end
|
56795
57036
|
|
56796
|
-
# source://rubocop//lib/rubocop/runner.rb#
|
57037
|
+
# source://rubocop//lib/rubocop/runner.rb#249
|
56797
57038
|
def file_finished(file, offenses); end
|
56798
57039
|
|
56799
|
-
# source://rubocop//lib/rubocop/runner.rb#
|
57040
|
+
# source://rubocop//lib/rubocop/runner.rb#178
|
56800
57041
|
def file_offense_cache(file); end
|
56801
57042
|
|
56802
|
-
# source://rubocop//lib/rubocop/runner.rb#
|
57043
|
+
# source://rubocop//lib/rubocop/runner.rb#166
|
56803
57044
|
def file_offenses(file); end
|
56804
57045
|
|
56805
|
-
# source://rubocop//lib/rubocop/runner.rb#
|
57046
|
+
# source://rubocop//lib/rubocop/runner.rb#244
|
56806
57047
|
def file_started(file); end
|
56807
57048
|
|
56808
|
-
# source://rubocop//lib/rubocop/runner.rb#
|
57049
|
+
# source://rubocop//lib/rubocop/runner.rb#407
|
56809
57050
|
def filter_cop_classes(cop_classes, config); end
|
56810
57051
|
|
56811
|
-
# source://rubocop//lib/rubocop/runner.rb#
|
57052
|
+
# source://rubocop//lib/rubocop/runner.rb#108
|
56812
57053
|
def find_target_files(paths); end
|
56813
57054
|
|
56814
|
-
# source://rubocop//lib/rubocop/runner.rb#
|
57055
|
+
# source://rubocop//lib/rubocop/runner.rb#418
|
56815
57056
|
def formatter_set; end
|
56816
57057
|
|
56817
|
-
# source://rubocop//lib/rubocop/runner.rb#
|
57058
|
+
# source://rubocop//lib/rubocop/runner.rb#475
|
56818
57059
|
def get_processed_source(file); end
|
56819
57060
|
|
56820
|
-
# source://rubocop//lib/rubocop/runner.rb#
|
57061
|
+
# source://rubocop//lib/rubocop/runner.rb#346
|
56821
57062
|
def inspect_file(processed_source, team = T.unsafe(nil)); end
|
56822
57063
|
|
56823
|
-
# source://rubocop//lib/rubocop/runner.rb#
|
57064
|
+
# source://rubocop//lib/rubocop/runner.rb#119
|
56824
57065
|
def inspect_files(files); end
|
56825
57066
|
|
56826
|
-
# source://rubocop//lib/rubocop/runner.rb#
|
57067
|
+
# source://rubocop//lib/rubocop/runner.rb#307
|
56827
57068
|
def iterate_until_no_changes(source, offenses_by_iteration); end
|
56828
57069
|
|
56829
|
-
# source://rubocop//lib/rubocop/runner.rb#
|
57070
|
+
# source://rubocop//lib/rubocop/runner.rb#152
|
56830
57071
|
def list_files(paths); end
|
56831
57072
|
|
56832
57073
|
# @return [Boolean]
|
56833
57074
|
#
|
56834
|
-
# source://rubocop//lib/rubocop/runner.rb#
|
57075
|
+
# source://rubocop//lib/rubocop/runner.rb#456
|
56835
57076
|
def mark_as_safe_by_config?(config); end
|
56836
57077
|
|
56837
|
-
# source://rubocop//lib/rubocop/runner.rb#
|
57078
|
+
# source://rubocop//lib/rubocop/runner.rb#464
|
56838
57079
|
def minimum_severity_to_fail; end
|
56839
57080
|
|
56840
|
-
# source://rubocop//lib/rubocop/runner.rb#
|
57081
|
+
# source://rubocop//lib/rubocop/runner.rb#368
|
56841
57082
|
def mobilize_team(processed_source); end
|
56842
57083
|
|
56843
|
-
# source://rubocop//lib/rubocop/runner.rb#
|
57084
|
+
# source://rubocop//lib/rubocop/runner.rb#373
|
56844
57085
|
def mobilized_cop_classes(config); end
|
56845
57086
|
|
56846
|
-
# source://rubocop//lib/rubocop/runner.rb#
|
57087
|
+
# source://rubocop//lib/rubocop/runner.rb#436
|
56847
57088
|
def offenses_to_report(offenses); end
|
56848
57089
|
|
56849
|
-
# source://rubocop//lib/rubocop/runner.rb#
|
57090
|
+
# source://rubocop//lib/rubocop/runner.rb#156
|
56850
57091
|
def process_file(file); end
|
56851
57092
|
|
56852
|
-
# source://rubocop//lib/rubocop/runner.rb#
|
57093
|
+
# source://rubocop//lib/rubocop/runner.rb#397
|
56853
57094
|
def qualify_option_cop_names; end
|
56854
57095
|
|
56855
57096
|
# @yield [cop]
|
56856
57097
|
#
|
56857
|
-
# source://rubocop//lib/rubocop/runner.rb#
|
57098
|
+
# source://rubocop//lib/rubocop/runner.rb#232
|
56858
57099
|
def redundant_cop_disable_directive(file); end
|
56859
57100
|
|
56860
|
-
# source://rubocop//lib/rubocop/runner.rb#
|
57101
|
+
# source://rubocop//lib/rubocop/runner.rb#266
|
56861
57102
|
def save_in_cache(cache, offenses); end
|
56862
57103
|
|
56863
57104
|
# A Cop::Team instance is stateful and may change when inspecting.
|
@@ -56865,41 +57106,41 @@ class RuboCop::Runner
|
|
56865
57106
|
# otherwise dormant team that can be used for config- and option-
|
56866
57107
|
# level caching in ResultCache.
|
56867
57108
|
#
|
56868
|
-
# source://rubocop//lib/rubocop/runner.rb#
|
57109
|
+
# source://rubocop//lib/rubocop/runner.rb#503
|
56869
57110
|
def standby_team(config); end
|
56870
57111
|
|
56871
57112
|
# @return [Boolean]
|
56872
57113
|
#
|
56873
|
-
# source://rubocop//lib/rubocop/runner.rb#
|
57114
|
+
# source://rubocop//lib/rubocop/runner.rb#414
|
56874
57115
|
def style_guide_cops_only?(config); end
|
56875
57116
|
|
56876
57117
|
# @return [Boolean]
|
56877
57118
|
#
|
56878
|
-
# source://rubocop//lib/rubocop/runner.rb#
|
57119
|
+
# source://rubocop//lib/rubocop/runner.rb#448
|
56879
57120
|
def supports_safe_autocorrect?(offense); end
|
56880
57121
|
|
56881
57122
|
# @yield [team]
|
56882
57123
|
#
|
56883
|
-
# source://rubocop//lib/rubocop/runner.rb#
|
57124
|
+
# source://rubocop//lib/rubocop/runner.rb#215
|
56884
57125
|
def team_for_redundant_disables(file, offenses, source); end
|
56885
57126
|
|
56886
57127
|
# Warms up the RuboCop cache by forking a suitable number of RuboCop
|
56887
57128
|
# instances that each inspects its allotted group of files.
|
56888
57129
|
#
|
56889
|
-
# source://rubocop//lib/rubocop/runner.rb#
|
57130
|
+
# source://rubocop//lib/rubocop/runner.rb#95
|
56890
57131
|
def warm_cache(target_files); end
|
56891
57132
|
|
56892
57133
|
class << self
|
56893
57134
|
# @return [Array<#call>]
|
56894
57135
|
#
|
56895
|
-
# source://rubocop//lib/rubocop/runner.rb#
|
57136
|
+
# source://rubocop//lib/rubocop/runner.rb#33
|
56896
57137
|
def ruby_extractors; end
|
56897
57138
|
|
56898
57139
|
private
|
56899
57140
|
|
56900
57141
|
# @return [#call]
|
56901
57142
|
#
|
56902
|
-
# source://rubocop//lib/rubocop/runner.rb#
|
57143
|
+
# source://rubocop//lib/rubocop/runner.rb#40
|
56903
57144
|
def default_ruby_extractor; end
|
56904
57145
|
end
|
56905
57146
|
end
|
@@ -56922,12 +57163,12 @@ end
|
|
56922
57163
|
|
56923
57164
|
# @api private
|
56924
57165
|
#
|
56925
|
-
# source://rubocop//lib/rubocop/runner.rb#
|
57166
|
+
# source://rubocop//lib/rubocop/runner.rb#53
|
56926
57167
|
RuboCop::Runner::MAX_ITERATIONS = T.let(T.unsafe(nil), Integer)
|
56927
57168
|
|
56928
57169
|
# @api private
|
56929
57170
|
#
|
56930
|
-
# source://rubocop//lib/rubocop/runner.rb#
|
57171
|
+
# source://rubocop//lib/rubocop/runner.rb#56
|
56931
57172
|
RuboCop::Runner::REDUNDANT_COP_DISABLE_DIRECTIVE_RULES = T.let(T.unsafe(nil), Array)
|
56932
57173
|
|
56933
57174
|
# Take a string with embedded escapes, and convert the escapes as the Ruby
|