diff --git a/lib/rubocop/cop/bundler/gem_filename.rb b/lib/rubocop/cop/bundler/gem_filename.rb index 2c0536ded0e..75be551ae8d 100644 --- a/lib/rubocop/cop/bundler/gem_filename.rb +++ b/lib/rubocop/cop/bundler/gem_filename.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Bundler - # This cop verifies that a project contains Gemfile or gems.rb file and correct + # Verifies that a project contains Gemfile or gems.rb file and correct # associated lock file based on the configuration. # # @example EnforcedStyle: Gemfile (default) diff --git a/lib/rubocop/cop/gemspec/date_assignment.rb b/lib/rubocop/cop/gemspec/date_assignment.rb index e56e5f6de9c..f13d89855dd 100644 --- a/lib/rubocop/cop/gemspec/date_assignment.rb +++ b/lib/rubocop/cop/gemspec/date_assignment.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Gemspec - # This cop checks that `date =` is not used in gemspec file. + # Checks that `date =` is not used in gemspec file. # It is set automatically when the gem is packaged. # # @example diff --git a/lib/rubocop/cop/internal_affairs/empty_line_between_expect_offense_and_correction.rb b/lib/rubocop/cop/internal_affairs/empty_line_between_expect_offense_and_correction.rb index 52b659c41b2..9209ee8cdb9 100644 --- a/lib/rubocop/cop/internal_affairs/empty_line_between_expect_offense_and_correction.rb +++ b/lib/rubocop/cop/internal_affairs/empty_line_between_expect_offense_and_correction.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module InternalAffairs - # This cop checks whether `expect_offense` and correction expectation methods + # Checks whether `expect_offense` and correction expectation methods # (i.e. `expect_correction` and `expect_no_corrections`) are separated by empty line. # # @example diff --git a/lib/rubocop/cop/internal_affairs/location_line_equality_comparison.rb b/lib/rubocop/cop/internal_affairs/location_line_equality_comparison.rb index 15b80331a91..d2345f78df5 100644 --- a/lib/rubocop/cop/internal_affairs/location_line_equality_comparison.rb +++ b/lib/rubocop/cop/internal_affairs/location_line_equality_comparison.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module InternalAffairs - # This cop enforces the use of `same_line?` instead of location line comparison for equality. + # Enforces the use of `same_line?` instead of location line comparison for equality. # # @example # # bad diff --git a/lib/rubocop/cop/internal_affairs/method_name_end_with.rb b/lib/rubocop/cop/internal_affairs/method_name_end_with.rb index f02c0b9b8e5..18b4fa04423 100644 --- a/lib/rubocop/cop/internal_affairs/method_name_end_with.rb +++ b/lib/rubocop/cop/internal_affairs/method_name_end_with.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module InternalAffairs - # This cop checks potentially usage of method identifier predicates + # Checks potentially usage of method identifier predicates # defined in rubocop-ast instead of `method_name.end_with?`. # # @example diff --git a/lib/rubocop/cop/internal_affairs/redundant_described_class_as_subject.rb b/lib/rubocop/cop/internal_affairs/redundant_described_class_as_subject.rb index 1180f4d48ac..b9b6946f4fd 100644 --- a/lib/rubocop/cop/internal_affairs/redundant_described_class_as_subject.rb +++ b/lib/rubocop/cop/internal_affairs/redundant_described_class_as_subject.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module InternalAffairs - # This cop checks for redundant `subject(:cop) { described_class.new }`. + # Checks for redundant `subject(:cop) { described_class.new }`. # # @example # # bad diff --git a/lib/rubocop/cop/internal_affairs/redundant_let_rubocop_config_new.rb b/lib/rubocop/cop/internal_affairs/redundant_let_rubocop_config_new.rb index 777cff1077a..7a7deb112e7 100644 --- a/lib/rubocop/cop/internal_affairs/redundant_let_rubocop_config_new.rb +++ b/lib/rubocop/cop/internal_affairs/redundant_let_rubocop_config_new.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module InternalAffairs - # This cop checks that `let` is `RuboCop::Config.new` with no arguments. + # Checks that `let` is `RuboCop::Config.new` with no arguments. # # @example # # bad diff --git a/lib/rubocop/cop/layout/assignment_indentation.rb b/lib/rubocop/cop/layout/assignment_indentation.rb index b69d9d23efc..83e5e548afb 100644 --- a/lib/rubocop/cop/layout/assignment_indentation.rb +++ b/lib/rubocop/cop/layout/assignment_indentation.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop checks the indentation of the first line of the + # Checks the indentation of the first line of the # right-hand-side of a multi-line assignment. # # @example diff --git a/lib/rubocop/cop/layout/begin_end_alignment.rb b/lib/rubocop/cop/layout/begin_end_alignment.rb index 5ba986b0691..4d8f48ae3ea 100644 --- a/lib/rubocop/cop/layout/begin_end_alignment.rb +++ b/lib/rubocop/cop/layout/begin_end_alignment.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop checks whether the end keyword of `begin` is aligned properly. + # Checks whether the end keyword of `begin` is aligned properly. # # Two modes are supported through the `EnforcedStyleAlignWith` configuration # parameter. If it's set to `start_of_line` (which is the default), the diff --git a/lib/rubocop/cop/layout/block_alignment.rb b/lib/rubocop/cop/layout/block_alignment.rb index 27ddc32eb33..ebd13b39429 100644 --- a/lib/rubocop/cop/layout/block_alignment.rb +++ b/lib/rubocop/cop/layout/block_alignment.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop checks whether the end keywords are aligned properly for do + # Checks whether the end keywords are aligned properly for do # end blocks. # # Three modes are supported through the `EnforcedStyleAlignWith` diff --git a/lib/rubocop/cop/layout/block_end_newline.rb b/lib/rubocop/cop/layout/block_end_newline.rb index d159ac42a14..2e308991eed 100644 --- a/lib/rubocop/cop/layout/block_end_newline.rb +++ b/lib/rubocop/cop/layout/block_end_newline.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop checks whether the end statement of a do..end block + # Checks whether the end statement of a do..end block # is on its own line. # # @example diff --git a/lib/rubocop/cop/layout/case_indentation.rb b/lib/rubocop/cop/layout/case_indentation.rb index 6d7a40dd570..acdc5f898b3 100644 --- a/lib/rubocop/cop/layout/case_indentation.rb +++ b/lib/rubocop/cop/layout/case_indentation.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop checks how the `when` and ``in``s of a `case` expression + # Checks how the `when` and ``in``s of a `case` expression # are indented in relation to its `case` or `end` keyword. # # It will register a separate offense for each misaligned `when` and `in`. diff --git a/lib/rubocop/cop/layout/closing_parenthesis_indentation.rb b/lib/rubocop/cop/layout/closing_parenthesis_indentation.rb index 336603c4046..95b89d4b7e1 100644 --- a/lib/rubocop/cop/layout/closing_parenthesis_indentation.rb +++ b/lib/rubocop/cop/layout/closing_parenthesis_indentation.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop checks the indentation of hanging closing parentheses in + # Checks the indentation of hanging closing parentheses in # method calls, method definitions, and grouped expressions. A hanging # closing parenthesis means `)` preceded by a line break. # diff --git a/lib/rubocop/cop/layout/comment_indentation.rb b/lib/rubocop/cop/layout/comment_indentation.rb index 83e203b34b1..b6525637020 100644 --- a/lib/rubocop/cop/layout/comment_indentation.rb +++ b/lib/rubocop/cop/layout/comment_indentation.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop checks the indentation of comments. + # Checks the indentation of comments. # # @example # # bad diff --git a/lib/rubocop/cop/layout/condition_position.rb b/lib/rubocop/cop/layout/condition_position.rb index 55b25a560ba..f44c61f5569 100644 --- a/lib/rubocop/cop/layout/condition_position.rb +++ b/lib/rubocop/cop/layout/condition_position.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop checks for conditions that are not on the same line as + # Checks for conditions that are not on the same line as # if/while/until. # # @example diff --git a/lib/rubocop/cop/layout/def_end_alignment.rb b/lib/rubocop/cop/layout/def_end_alignment.rb index 2e583c8cbd4..ecb2770dc5d 100644 --- a/lib/rubocop/cop/layout/def_end_alignment.rb +++ b/lib/rubocop/cop/layout/def_end_alignment.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop checks whether the end keywords of method definitions are + # Checks whether the end keywords of method definitions are # aligned properly. # # Two modes are supported through the EnforcedStyleAlignWith configuration diff --git a/lib/rubocop/cop/layout/dot_position.rb b/lib/rubocop/cop/layout/dot_position.rb index 7ea842879a8..e731c51002a 100644 --- a/lib/rubocop/cop/layout/dot_position.rb +++ b/lib/rubocop/cop/layout/dot_position.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop checks the . position in multi-line method calls. + # Checks the . position in multi-line method calls. # # @example EnforcedStyle: leading (default) # # bad diff --git a/lib/rubocop/cop/layout/else_alignment.rb b/lib/rubocop/cop/layout/else_alignment.rb index 2876ee82a11..a6d24bd7146 100644 --- a/lib/rubocop/cop/layout/else_alignment.rb +++ b/lib/rubocop/cop/layout/else_alignment.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop checks the alignment of else keywords. Normally they should + # Checks the alignment of else keywords. Normally they should # be aligned with an if/unless/while/until/begin/def/rescue keyword, but there # are special cases when they should follow the same rules as the # alignment of end. diff --git a/lib/rubocop/cop/layout/empty_comment.rb b/lib/rubocop/cop/layout/empty_comment.rb index f6ac920f29c..27fccbf1f21 100644 --- a/lib/rubocop/cop/layout/empty_comment.rb +++ b/lib/rubocop/cop/layout/empty_comment.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop checks empty comment. + # Checks empty comment. # # @example # # bad diff --git a/lib/rubocop/cop/layout/empty_line_after_guard_clause.rb b/lib/rubocop/cop/layout/empty_line_after_guard_clause.rb index df489733a10..048547e5c29 100644 --- a/lib/rubocop/cop/layout/empty_line_after_guard_clause.rb +++ b/lib/rubocop/cop/layout/empty_line_after_guard_clause.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop enforces empty line after guard clause + # Enforces empty line after guard clause # # @example # diff --git a/lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb b/lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb index 6bace2c1c61..c551237f141 100644 --- a/lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb +++ b/lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop enforces empty line after multiline condition. + # Enforces empty line after multiline condition. # # @example # # bad diff --git a/lib/rubocop/cop/layout/empty_line_between_defs.rb b/lib/rubocop/cop/layout/empty_line_between_defs.rb index 6bd24124d25..51897cd7d8c 100644 --- a/lib/rubocop/cop/layout/empty_line_between_defs.rb +++ b/lib/rubocop/cop/layout/empty_line_between_defs.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop checks whether class/module/method definitions are + # Checks whether class/module/method definitions are # separated by one or more empty lines. # # `NumberOfEmptyLines` can be an integer (default is 1) or diff --git a/lib/rubocop/cop/layout/empty_lines.rb b/lib/rubocop/cop/layout/empty_lines.rb index bc483fcddce..bd18597eea6 100644 --- a/lib/rubocop/cop/layout/empty_lines.rb +++ b/lib/rubocop/cop/layout/empty_lines.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop checks for two or more consecutive blank lines. + # Checks for two or more consecutive blank lines. # # @example # diff --git a/lib/rubocop/cop/layout/empty_lines_around_arguments.rb b/lib/rubocop/cop/layout/empty_lines_around_arguments.rb index 48d63773e58..3536fac95f1 100644 --- a/lib/rubocop/cop/layout/empty_lines_around_arguments.rb +++ b/lib/rubocop/cop/layout/empty_lines_around_arguments.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop checks if empty lines exist around the arguments + # Checks if empty lines exist around the arguments # of a method invocation. # # @example diff --git a/lib/rubocop/cop/layout/empty_lines_around_begin_body.rb b/lib/rubocop/cop/layout/empty_lines_around_begin_body.rb index fccb33d7dc6..8cda382cb3a 100644 --- a/lib/rubocop/cop/layout/empty_lines_around_begin_body.rb +++ b/lib/rubocop/cop/layout/empty_lines_around_begin_body.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop checks if empty lines exist around the bodies of begin-end + # Checks if empty lines exist around the bodies of begin-end # blocks. # # @example diff --git a/lib/rubocop/cop/layout/empty_lines_around_block_body.rb b/lib/rubocop/cop/layout/empty_lines_around_block_body.rb index 202058257c7..a9d4a127dee 100644 --- a/lib/rubocop/cop/layout/empty_lines_around_block_body.rb +++ b/lib/rubocop/cop/layout/empty_lines_around_block_body.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop checks if empty lines around the bodies of blocks match + # Checks if empty lines around the bodies of blocks match # the configuration. # # @example EnforcedStyle: empty_lines diff --git a/lib/rubocop/cop/layout/empty_lines_around_class_body.rb b/lib/rubocop/cop/layout/empty_lines_around_class_body.rb index 2b5945238f9..33588a3e273 100644 --- a/lib/rubocop/cop/layout/empty_lines_around_class_body.rb +++ b/lib/rubocop/cop/layout/empty_lines_around_class_body.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop checks if empty lines around the bodies of classes match + # Checks if empty lines around the bodies of classes match # the configuration. # # @example EnforcedStyle: empty_lines diff --git a/lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb b/lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb index 5bf005b6eca..89efc887379 100644 --- a/lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb +++ b/lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop checks if empty lines exist around the bodies of `begin` + # Checks if empty lines exist around the bodies of `begin` # sections. This cop doesn't check empty lines at `begin` body # beginning/end and around method definition body. # `Style/EmptyLinesAroundBeginBody` or `Style/EmptyLinesAroundMethodBody` diff --git a/lib/rubocop/cop/layout/empty_lines_around_method_body.rb b/lib/rubocop/cop/layout/empty_lines_around_method_body.rb index 39642946803..b001563738b 100644 --- a/lib/rubocop/cop/layout/empty_lines_around_method_body.rb +++ b/lib/rubocop/cop/layout/empty_lines_around_method_body.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop checks if empty lines exist around the bodies of methods. + # Checks if empty lines exist around the bodies of methods. # # @example # diff --git a/lib/rubocop/cop/layout/empty_lines_around_module_body.rb b/lib/rubocop/cop/layout/empty_lines_around_module_body.rb index ce67e6d3836..086767432bb 100644 --- a/lib/rubocop/cop/layout/empty_lines_around_module_body.rb +++ b/lib/rubocop/cop/layout/empty_lines_around_module_body.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop checks if empty lines around the bodies of modules match + # Checks if empty lines around the bodies of modules match # the configuration. # # @example EnforcedStyle: empty_lines diff --git a/lib/rubocop/cop/layout/end_alignment.rb b/lib/rubocop/cop/layout/end_alignment.rb index 89edcd00bab..312d0f6a4b5 100644 --- a/lib/rubocop/cop/layout/end_alignment.rb +++ b/lib/rubocop/cop/layout/end_alignment.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop checks whether the end keywords are aligned properly. + # Checks whether the end keywords are aligned properly. # # Three modes are supported through the `EnforcedStyleAlignWith` # configuration parameter: diff --git a/lib/rubocop/cop/layout/end_of_line.rb b/lib/rubocop/cop/layout/end_of_line.rb index 879fc54e550..2a1c6f8fec2 100644 --- a/lib/rubocop/cop/layout/end_of_line.rb +++ b/lib/rubocop/cop/layout/end_of_line.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop checks for Windows-style line endings in the source code. + # Checks for Windows-style line endings in the source code. # # @example EnforcedStyle: native (default) # # The `native` style means that CR+LF (Carriage Return + Line Feed) is diff --git a/lib/rubocop/cop/layout/extra_spacing.rb b/lib/rubocop/cop/layout/extra_spacing.rb index 92f4062255e..a1888a9679d 100644 --- a/lib/rubocop/cop/layout/extra_spacing.rb +++ b/lib/rubocop/cop/layout/extra_spacing.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop checks for extra/unnecessary whitespace. + # Checks for extra/unnecessary whitespace. # # @example # diff --git a/lib/rubocop/cop/layout/first_argument_indentation.rb b/lib/rubocop/cop/layout/first_argument_indentation.rb index d24f289c562..6459f20e653 100644 --- a/lib/rubocop/cop/layout/first_argument_indentation.rb +++ b/lib/rubocop/cop/layout/first_argument_indentation.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop checks the indentation of the first argument in a method call. + # Checks the indentation of the first argument in a method call. # Arguments after the first one are checked by `Layout/ArgumentAlignment`, # not by this cop. # diff --git a/lib/rubocop/cop/layout/first_array_element_indentation.rb b/lib/rubocop/cop/layout/first_array_element_indentation.rb index 76b64cd3509..5abb0f3c49a 100644 --- a/lib/rubocop/cop/layout/first_array_element_indentation.rb +++ b/lib/rubocop/cop/layout/first_array_element_indentation.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop checks the indentation of the first element in an array literal + # Checks the indentation of the first element in an array literal # where the opening bracket and the first element are on separate lines. # The other elements' indentations are handled by the ArrayAlignment cop. # diff --git a/lib/rubocop/cop/layout/first_array_element_line_break.rb b/lib/rubocop/cop/layout/first_array_element_line_break.rb index 7e17b9298d6..07993632fee 100644 --- a/lib/rubocop/cop/layout/first_array_element_line_break.rb +++ b/lib/rubocop/cop/layout/first_array_element_line_break.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop checks for a line break before the first element in a + # Checks for a line break before the first element in a # multi-line array. # # @example diff --git a/lib/rubocop/cop/layout/first_hash_element_indentation.rb b/lib/rubocop/cop/layout/first_hash_element_indentation.rb index ea5c739b1f1..66f7167a3fc 100644 --- a/lib/rubocop/cop/layout/first_hash_element_indentation.rb +++ b/lib/rubocop/cop/layout/first_hash_element_indentation.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop checks the indentation of the first key in a hash literal + # Checks the indentation of the first key in a hash literal # where the opening brace and the first key are on separate lines. The # other keys' indentations are handled by the HashAlignment cop. # diff --git a/lib/rubocop/cop/layout/first_hash_element_line_break.rb b/lib/rubocop/cop/layout/first_hash_element_line_break.rb index 59d9017a614..447db563fb3 100644 --- a/lib/rubocop/cop/layout/first_hash_element_line_break.rb +++ b/lib/rubocop/cop/layout/first_hash_element_line_break.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop checks for a line break before the first element in a + # Checks for a line break before the first element in a # multi-line hash. # # @example diff --git a/lib/rubocop/cop/layout/first_method_argument_line_break.rb b/lib/rubocop/cop/layout/first_method_argument_line_break.rb index 4897eea7d8b..bdc41f5ce15 100644 --- a/lib/rubocop/cop/layout/first_method_argument_line_break.rb +++ b/lib/rubocop/cop/layout/first_method_argument_line_break.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop checks for a line break before the first argument in a + # Checks for a line break before the first argument in a # multi-line method call. # # @example diff --git a/lib/rubocop/cop/layout/first_method_parameter_line_break.rb b/lib/rubocop/cop/layout/first_method_parameter_line_break.rb index 2e9e383b0a4..8bfc3ad8eb5 100644 --- a/lib/rubocop/cop/layout/first_method_parameter_line_break.rb +++ b/lib/rubocop/cop/layout/first_method_parameter_line_break.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop checks for a line break before the first parameter in a + # Checks for a line break before the first parameter in a # multi-line method parameter definition. # # @example diff --git a/lib/rubocop/cop/layout/first_parameter_indentation.rb b/lib/rubocop/cop/layout/first_parameter_indentation.rb index e38efa81ca4..dfec906f0b4 100644 --- a/lib/rubocop/cop/layout/first_parameter_indentation.rb +++ b/lib/rubocop/cop/layout/first_parameter_indentation.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop checks the indentation of the first parameter in a method + # Checks the indentation of the first parameter in a method # definition. Parameters after the first one are checked by # Layout/ParameterAlignment, not by this cop. # diff --git a/lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb b/lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb index 035e5217a8b..c12a6ea6576 100644 --- a/lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb +++ b/lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop checks for the placement of the closing parenthesis + # Checks for the placement of the closing parenthesis # in a method call that passes a HEREDOC string as an argument. # It should be placed at the end of the line containing the # opening HEREDOC tag. diff --git a/lib/rubocop/cop/layout/heredoc_indentation.rb b/lib/rubocop/cop/layout/heredoc_indentation.rb index 6054580c6f7..5a7e94b3527 100644 --- a/lib/rubocop/cop/layout/heredoc_indentation.rb +++ b/lib/rubocop/cop/layout/heredoc_indentation.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop checks the indentation of the here document bodies. The bodies + # Checks the indentation of the here document bodies. The bodies # are indented one step. # # Note: When ``Layout/LineLength``'s `AllowHeredoc` is false (not default), diff --git a/lib/rubocop/cop/layout/indentation_consistency.rb b/lib/rubocop/cop/layout/indentation_consistency.rb index 222575780b0..b766720e6bd 100644 --- a/lib/rubocop/cop/layout/indentation_consistency.rb +++ b/lib/rubocop/cop/layout/indentation_consistency.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop checks for inconsistent indentation. + # Checks for inconsistent indentation. # # The difference between `indented_internal_methods` and `normal` is # that the `indented_internal_methods` style prescribes that in diff --git a/lib/rubocop/cop/layout/indentation_style.rb b/lib/rubocop/cop/layout/indentation_style.rb index acf21a925fb..8cf882d8eb3 100644 --- a/lib/rubocop/cop/layout/indentation_style.rb +++ b/lib/rubocop/cop/layout/indentation_style.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop checks that the indentation method is consistent. + # Checks that the indentation method is consistent. # Either tabs only or spaces only are used for indentation. # # @example EnforcedStyle: spaces (default) diff --git a/lib/rubocop/cop/layout/indentation_width.rb b/lib/rubocop/cop/layout/indentation_width.rb index c7f3184a0d1..d2ddb2bca09 100644 --- a/lib/rubocop/cop/layout/indentation_width.rb +++ b/lib/rubocop/cop/layout/indentation_width.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop checks for indentation that doesn't use the specified number + # Checks for indentation that doesn't use the specified number # of spaces. # # See also the IndentationConsistency cop which is the companion to this diff --git a/lib/rubocop/cop/layout/initial_indentation.rb b/lib/rubocop/cop/layout/initial_indentation.rb index e323ffd29fa..44eb054b2ba 100644 --- a/lib/rubocop/cop/layout/initial_indentation.rb +++ b/lib/rubocop/cop/layout/initial_indentation.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop checks for indentation of the first non-blank non-comment + # Checks for indentation of the first non-blank non-comment # line in a file. # # @example diff --git a/lib/rubocop/cop/layout/leading_comment_space.rb b/lib/rubocop/cop/layout/leading_comment_space.rb index 726e434fbc8..5d6d614b9e8 100644 --- a/lib/rubocop/cop/layout/leading_comment_space.rb +++ b/lib/rubocop/cop/layout/leading_comment_space.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop checks whether comments have a leading space after the + # Checks whether comments have a leading space after the # `#` denoting the start of the comment. The leading space is not # required for some RDoc special syntax, like `#++`, `#--`, # `#:nodoc`, `=begin`- and `=end` comments, "shebang" directives, diff --git a/lib/rubocop/cop/layout/leading_empty_lines.rb b/lib/rubocop/cop/layout/leading_empty_lines.rb index c1b72c7d1e2..13428c0d1bf 100644 --- a/lib/rubocop/cop/layout/leading_empty_lines.rb +++ b/lib/rubocop/cop/layout/leading_empty_lines.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop checks for unnecessary leading blank lines at the beginning + # Checks for unnecessary leading blank lines at the beginning # of a file. # # @example diff --git a/lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb b/lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb index b1b9b9002ef..d78dcb0757c 100644 --- a/lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb +++ b/lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop checks the indentation of the next line after a line that ends with a string + # Checks the indentation of the next line after a line that ends with a string # literal and a backslash. # # If `EnforcedStyle: aligned` is set, the concatenated string parts shall be aligned with the diff --git a/lib/rubocop/cop/layout/line_length.rb b/lib/rubocop/cop/layout/line_length.rb index 8b0ac9d86f7..f43445b19fc 100644 --- a/lib/rubocop/cop/layout/line_length.rb +++ b/lib/rubocop/cop/layout/line_length.rb @@ -5,7 +5,7 @@ module RuboCop module Cop module Layout - # This cop checks the length of lines in the source code. + # Checks the length of lines in the source code. # The maximum length is configurable. # The tab size is configured in the `IndentationWidth` # of the `Layout/IndentationStyle` cop. diff --git a/lib/rubocop/cop/layout/multiline_array_brace_layout.rb b/lib/rubocop/cop/layout/multiline_array_brace_layout.rb index 42d1acd1a80..d51ffc14055 100644 --- a/lib/rubocop/cop/layout/multiline_array_brace_layout.rb +++ b/lib/rubocop/cop/layout/multiline_array_brace_layout.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop checks that the closing brace in an array literal is either + # Checks that the closing brace in an array literal is either # on the same line as the last array element or on a new line. # # When using the `symmetrical` (default) style: diff --git a/lib/rubocop/cop/layout/multiline_array_line_breaks.rb b/lib/rubocop/cop/layout/multiline_array_line_breaks.rb index f43905a7361..203fdae2eb0 100644 --- a/lib/rubocop/cop/layout/multiline_array_line_breaks.rb +++ b/lib/rubocop/cop/layout/multiline_array_line_breaks.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop ensures that each item in a multi-line array + # Ensures that each item in a multi-line array # starts on a separate line. # # @example diff --git a/lib/rubocop/cop/layout/multiline_assignment_layout.rb b/lib/rubocop/cop/layout/multiline_assignment_layout.rb index a245372a608..99ac6d8ea71 100644 --- a/lib/rubocop/cop/layout/multiline_assignment_layout.rb +++ b/lib/rubocop/cop/layout/multiline_assignment_layout.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop checks whether the multiline assignments have a newline + # Checks whether the multiline assignments have a newline # after the assignment operator. # # @example EnforcedStyle: new_line (default) diff --git a/lib/rubocop/cop/layout/multiline_block_layout.rb b/lib/rubocop/cop/layout/multiline_block_layout.rb index 036a1305628..a8bee0d8b0b 100644 --- a/lib/rubocop/cop/layout/multiline_block_layout.rb +++ b/lib/rubocop/cop/layout/multiline_block_layout.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop checks whether the multiline do end blocks have a newline + # Checks whether the multiline do end blocks have a newline # after the start of the block. Additionally, it checks whether the block # arguments, if any, are on the same line as the start of the # block. Putting block arguments on separate lines, because the whole diff --git a/lib/rubocop/cop/layout/multiline_hash_brace_layout.rb b/lib/rubocop/cop/layout/multiline_hash_brace_layout.rb index ee92a9dda64..270056ae31c 100644 --- a/lib/rubocop/cop/layout/multiline_hash_brace_layout.rb +++ b/lib/rubocop/cop/layout/multiline_hash_brace_layout.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop checks that the closing brace in a hash literal is either + # Checks that the closing brace in a hash literal is either # on the same line as the last hash element, or a new line. # # When using the `symmetrical` (default) style: diff --git a/lib/rubocop/cop/layout/multiline_hash_key_line_breaks.rb b/lib/rubocop/cop/layout/multiline_hash_key_line_breaks.rb index 58887a46690..9ecc4795c7f 100644 --- a/lib/rubocop/cop/layout/multiline_hash_key_line_breaks.rb +++ b/lib/rubocop/cop/layout/multiline_hash_key_line_breaks.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop ensures that each key in a multi-line hash + # Ensures that each key in a multi-line hash # starts on a separate line. # # @example diff --git a/lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb b/lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb index d7ed853e3e2..0bf2c183aae 100644 --- a/lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb +++ b/lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop ensures that each argument in a multi-line method call + # Ensures that each argument in a multi-line method call # starts on a separate line. # # NOTE: this cop does not move the first argument, if you want that to diff --git a/lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb b/lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb index ff2c9f03932..98fed613289 100644 --- a/lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb +++ b/lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop checks that the closing brace in a method call is either + # Checks that the closing brace in a method call is either # on the same line as the last method argument, or a new line. # # When using the `symmetrical` (default) style: diff --git a/lib/rubocop/cop/layout/multiline_method_call_indentation.rb b/lib/rubocop/cop/layout/multiline_method_call_indentation.rb index c26c8939782..21465a32673 100644 --- a/lib/rubocop/cop/layout/multiline_method_call_indentation.rb +++ b/lib/rubocop/cop/layout/multiline_method_call_indentation.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop checks the indentation of the method name part in method calls + # Checks the indentation of the method name part in method calls # that span more than one line. # # @example EnforcedStyle: aligned (default) diff --git a/lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb b/lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb index 7249f577a0b..71c0e54af76 100644 --- a/lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb +++ b/lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop checks that the closing brace in a method definition is either + # Checks that the closing brace in a method definition is either # on the same line as the last method parameter, or a new line. # # When using the `symmetrical` (default) style: diff --git a/lib/rubocop/cop/layout/multiline_operation_indentation.rb b/lib/rubocop/cop/layout/multiline_operation_indentation.rb index d69b7486b33..6261cbd2a70 100644 --- a/lib/rubocop/cop/layout/multiline_operation_indentation.rb +++ b/lib/rubocop/cop/layout/multiline_operation_indentation.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop checks the indentation of the right hand side operand in binary operations that + # Checks the indentation of the right hand side operand in binary operations that # span more than one line. # # The `aligned` style checks that operators are aligned if they are part of an `if` or `while` diff --git a/lib/rubocop/cop/layout/redundant_line_break.rb b/lib/rubocop/cop/layout/redundant_line_break.rb index 27303be074e..4dc136ed88f 100644 --- a/lib/rubocop/cop/layout/redundant_line_break.rb +++ b/lib/rubocop/cop/layout/redundant_line_break.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop checks whether certain expressions, e.g. method calls, that could fit + # Checks whether certain expressions, e.g. method calls, that could fit # completely on a single line, are broken up into multiple lines unnecessarily. # # @example any configuration diff --git a/lib/rubocop/cop/layout/rescue_ensure_alignment.rb b/lib/rubocop/cop/layout/rescue_ensure_alignment.rb index bb04420c0b7..f3f0353bd9d 100644 --- a/lib/rubocop/cop/layout/rescue_ensure_alignment.rb +++ b/lib/rubocop/cop/layout/rescue_ensure_alignment.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop checks whether the rescue and ensure keywords are aligned + # Checks whether the rescue and ensure keywords are aligned # properly. # # @example diff --git a/lib/rubocop/cop/layout/single_line_block_chain.rb b/lib/rubocop/cop/layout/single_line_block_chain.rb index a73230404d8..d329df92a00 100644 --- a/lib/rubocop/cop/layout/single_line_block_chain.rb +++ b/lib/rubocop/cop/layout/single_line_block_chain.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop checks if method calls are chained onto single line blocks. It considers that a + # Checks if method calls are chained onto single line blocks. It considers that a # line break before the dot improves the readability of the code. # # @example diff --git a/lib/rubocop/cop/layout/space_after_not.rb b/lib/rubocop/cop/layout/space_after_not.rb index 1649587b376..41822579e1d 100644 --- a/lib/rubocop/cop/layout/space_after_not.rb +++ b/lib/rubocop/cop/layout/space_after_not.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop checks for space after `!`. + # Checks for space after `!`. # # @example # # bad diff --git a/lib/rubocop/cop/layout/space_before_comment.rb b/lib/rubocop/cop/layout/space_before_comment.rb index 845e0deb617..629b3f12d2b 100644 --- a/lib/rubocop/cop/layout/space_before_comment.rb +++ b/lib/rubocop/cop/layout/space_before_comment.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop checks for missing space between a token and a comment on the + # Checks for missing space between a token and a comment on the # same line. # # @example diff --git a/lib/rubocop/cop/layout/space_in_lambda_literal.rb b/lib/rubocop/cop/layout/space_in_lambda_literal.rb index d0baf858f32..d951ee820c8 100644 --- a/lib/rubocop/cop/layout/space_in_lambda_literal.rb +++ b/lib/rubocop/cop/layout/space_in_lambda_literal.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop checks for spaces between `->` and opening parameter + # Checks for spaces between `->` and opening parameter # parenthesis (`(`) in lambda literals. # # @example EnforcedStyle: require_no_space (default) diff --git a/lib/rubocop/cop/layout/space_inside_string_interpolation.rb b/lib/rubocop/cop/layout/space_inside_string_interpolation.rb index 55171a4caac..c7eba5b3645 100644 --- a/lib/rubocop/cop/layout/space_inside_string_interpolation.rb +++ b/lib/rubocop/cop/layout/space_inside_string_interpolation.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop checks for whitespace within string interpolations. + # Checks for whitespace within string interpolations. # # @example EnforcedStyle: no_space (default) # # bad diff --git a/lib/rubocop/cop/layout/trailing_empty_lines.rb b/lib/rubocop/cop/layout/trailing_empty_lines.rb index 466894b3a36..42796a20d3c 100644 --- a/lib/rubocop/cop/layout/trailing_empty_lines.rb +++ b/lib/rubocop/cop/layout/trailing_empty_lines.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop looks for trailing blank lines and a final newline in the + # Looks for trailing blank lines and a final newline in the # source code. # # @example EnforcedStyle: final_blank_line diff --git a/lib/rubocop/cop/layout/trailing_whitespace.rb b/lib/rubocop/cop/layout/trailing_whitespace.rb index 90a89ae4820..6dafd25df82 100644 --- a/lib/rubocop/cop/layout/trailing_whitespace.rb +++ b/lib/rubocop/cop/layout/trailing_whitespace.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Layout - # This cop looks for trailing whitespace in the source code. + # Looks for trailing whitespace in the source code. # # @example # # The line in this example contains spaces after the 0. diff --git a/lib/rubocop/cop/lint/ambiguous_assignment.rb b/lib/rubocop/cop/lint/ambiguous_assignment.rb index ca32965340a..02348fa2cfa 100644 --- a/lib/rubocop/cop/lint/ambiguous_assignment.rb +++ b/lib/rubocop/cop/lint/ambiguous_assignment.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for mistyped shorthand assignments. + # Checks for mistyped shorthand assignments. # # @example # # bad diff --git a/lib/rubocop/cop/lint/ambiguous_block_association.rb b/lib/rubocop/cop/lint/ambiguous_block_association.rb index 2aba21e409a..ff2a97ce5db 100644 --- a/lib/rubocop/cop/lint/ambiguous_block_association.rb +++ b/lib/rubocop/cop/lint/ambiguous_block_association.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for ambiguous block association with method + # Checks for ambiguous block association with method # when param passed without parentheses. # # This cop can customize ignored methods with `IgnoredMethods`. diff --git a/lib/rubocop/cop/lint/ambiguous_operator.rb b/lib/rubocop/cop/lint/ambiguous_operator.rb index 211b74f8370..4df7ba4d942 100644 --- a/lib/rubocop/cop/lint/ambiguous_operator.rb +++ b/lib/rubocop/cop/lint/ambiguous_operator.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for ambiguous operators in the first argument of a + # Checks for ambiguous operators in the first argument of a # method invocation without parentheses. # # @example diff --git a/lib/rubocop/cop/lint/ambiguous_operator_precedence.rb b/lib/rubocop/cop/lint/ambiguous_operator_precedence.rb index 9d694ae8cc5..1a77bb43ca3 100644 --- a/lib/rubocop/cop/lint/ambiguous_operator_precedence.rb +++ b/lib/rubocop/cop/lint/ambiguous_operator_precedence.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop looks for expressions containing multiple binary operators + # Looks for expressions containing multiple binary operators # where precedence is ambiguous due to lack of parentheses. For example, # in `1 + 2 * 3`, the multiplication will happen before the addition, but # lexically it appears that the addition will happen first. diff --git a/lib/rubocop/cop/lint/ambiguous_range.rb b/lib/rubocop/cop/lint/ambiguous_range.rb index e672cecd960..f5e8c173350 100644 --- a/lib/rubocop/cop/lint/ambiguous_range.rb +++ b/lib/rubocop/cop/lint/ambiguous_range.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for ambiguous ranges. + # Checks for ambiguous ranges. # # Ranges have quite low precedence, which leads to unexpected behavior when # using a range with other operators. This cop avoids that by making ranges diff --git a/lib/rubocop/cop/lint/ambiguous_regexp_literal.rb b/lib/rubocop/cop/lint/ambiguous_regexp_literal.rb index 11985e37091..85ad061d13e 100644 --- a/lib/rubocop/cop/lint/ambiguous_regexp_literal.rb +++ b/lib/rubocop/cop/lint/ambiguous_regexp_literal.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for ambiguous regexp literals in the first argument of + # Checks for ambiguous regexp literals in the first argument of # a method invocation without parentheses. # # @example diff --git a/lib/rubocop/cop/lint/assignment_in_condition.rb b/lib/rubocop/cop/lint/assignment_in_condition.rb index 836a7bc8f61..77266858474 100644 --- a/lib/rubocop/cop/lint/assignment_in_condition.rb +++ b/lib/rubocop/cop/lint/assignment_in_condition.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for assignments in the conditions of + # Checks for assignments in the conditions of # if/while/until. # # `AllowSafeAssignment` option for safe assignment. diff --git a/lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb b/lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb index 4e1ffd37a23..37732b1a8ad 100644 --- a/lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb +++ b/lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for places where binary operator has identical operands. + # Checks for places where binary operator has identical operands. # # It covers arithmetic operators: `-`, `/`, `%`; # comparison operators: `==`, `===`, `=~`, `>`, `>=`, `<`, `<=`; diff --git a/lib/rubocop/cop/lint/boolean_symbol.rb b/lib/rubocop/cop/lint/boolean_symbol.rb index 02732f8a3db..42a84e391ad 100644 --- a/lib/rubocop/cop/lint/boolean_symbol.rb +++ b/lib/rubocop/cop/lint/boolean_symbol.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for `:true` and `:false` symbols. + # Checks for `:true` and `:false` symbols. # In most cases it would be a typo. # # @safety diff --git a/lib/rubocop/cop/lint/circular_argument_reference.rb b/lib/rubocop/cop/lint/circular_argument_reference.rb index ae9bb09d1f9..7cea124c58c 100644 --- a/lib/rubocop/cop/lint/circular_argument_reference.rb +++ b/lib/rubocop/cop/lint/circular_argument_reference.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for circular argument references in optional keyword + # Checks for circular argument references in optional keyword # arguments and optional ordinal arguments. # # This cop mirrors a warning produced by MRI since 2.2. diff --git a/lib/rubocop/cop/lint/debugger.rb b/lib/rubocop/cop/lint/debugger.rb index 3e938aea8b0..2c833b1b719 100644 --- a/lib/rubocop/cop/lint/debugger.rb +++ b/lib/rubocop/cop/lint/debugger.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for debug calls (such as `debugger` or `binding.pry`) that should + # Checks for debug calls (such as `debugger` or `binding.pry`) that should # not be kept for production code. # # The cop can be configured using `DebuggerMethods`. By default, a number of gems diff --git a/lib/rubocop/cop/lint/deprecated_class_methods.rb b/lib/rubocop/cop/lint/deprecated_class_methods.rb index 960eb08a722..4b48bc06bbd 100644 --- a/lib/rubocop/cop/lint/deprecated_class_methods.rb +++ b/lib/rubocop/cop/lint/deprecated_class_methods.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for uses of the deprecated class method usages. + # Checks for uses of the deprecated class method usages. # # @example # diff --git a/lib/rubocop/cop/lint/deprecated_constants.rb b/lib/rubocop/cop/lint/deprecated_constants.rb index 181b6f2be4b..bc9b8e1afa9 100644 --- a/lib/rubocop/cop/lint/deprecated_constants.rb +++ b/lib/rubocop/cop/lint/deprecated_constants.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for deprecated constants. + # Checks for deprecated constants. # # It has `DeprecatedConstants` config. If there is an alternative method, you can set # alternative value as `Alternative`. And you can set the deprecated version as diff --git a/lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb b/lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb index 3b07c24d5f0..ad0af5ad4a9 100644 --- a/lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb +++ b/lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks constructors for disjunctive assignments (`||=`) that should + # Checks constructors for disjunctive assignments (`||=`) that should # be plain assignments. # # So far, this cop is only concerned with disjunctive assignment of diff --git a/lib/rubocop/cop/lint/duplicate_branch.rb b/lib/rubocop/cop/lint/duplicate_branch.rb index 587142b4b03..873f99ddbec 100644 --- a/lib/rubocop/cop/lint/duplicate_branch.rb +++ b/lib/rubocop/cop/lint/duplicate_branch.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks that there are no repeated bodies + # Checks that there are no repeated bodies # within `if/unless`, `case-when`, `case-in` and `rescue` constructs. # # With `IgnoreLiteralBranches: true`, branches are not registered diff --git a/lib/rubocop/cop/lint/duplicate_case_condition.rb b/lib/rubocop/cop/lint/duplicate_case_condition.rb index eef3825d93d..9ec0a85b4d8 100644 --- a/lib/rubocop/cop/lint/duplicate_case_condition.rb +++ b/lib/rubocop/cop/lint/duplicate_case_condition.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks that there are no repeated conditions + # Checks that there are no repeated conditions # used in case 'when' expressions. # # @example diff --git a/lib/rubocop/cop/lint/duplicate_elsif_condition.rb b/lib/rubocop/cop/lint/duplicate_elsif_condition.rb index 0dfb9ad0f8b..54780fedacd 100644 --- a/lib/rubocop/cop/lint/duplicate_elsif_condition.rb +++ b/lib/rubocop/cop/lint/duplicate_elsif_condition.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks that there are no repeated conditions used in if 'elsif'. + # Checks that there are no repeated conditions used in if 'elsif'. # # @example # # bad diff --git a/lib/rubocop/cop/lint/duplicate_hash_key.rb b/lib/rubocop/cop/lint/duplicate_hash_key.rb index 75bfbdf35bd..8c572fcc894 100644 --- a/lib/rubocop/cop/lint/duplicate_hash_key.rb +++ b/lib/rubocop/cop/lint/duplicate_hash_key.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for duplicated keys in hash literals. + # Checks for duplicated keys in hash literals. # # This cop mirrors a warning in Ruby 2.2. # diff --git a/lib/rubocop/cop/lint/duplicate_methods.rb b/lib/rubocop/cop/lint/duplicate_methods.rb index 20d0ebd1b2e..8616fbc9e73 100644 --- a/lib/rubocop/cop/lint/duplicate_methods.rb +++ b/lib/rubocop/cop/lint/duplicate_methods.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for duplicated instance (or singleton) method + # Checks for duplicated instance (or singleton) method # definitions. # # @example diff --git a/lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb b/lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb index 0b27bb2b774..bbd2e7302ec 100644 --- a/lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb +++ b/lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for duplicate elements in Regexp character classes. + # Checks for duplicate elements in Regexp character classes. # # @example # diff --git a/lib/rubocop/cop/lint/duplicate_require.rb b/lib/rubocop/cop/lint/duplicate_require.rb index 26ff1f13427..822477d7544 100644 --- a/lib/rubocop/cop/lint/duplicate_require.rb +++ b/lib/rubocop/cop/lint/duplicate_require.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for duplicate `require`s and `require_relative`s. + # Checks for duplicate `require`s and `require_relative`s. # # @safety # This cop's autocorrection is unsafe because it may break the dependency order diff --git a/lib/rubocop/cop/lint/duplicate_rescue_exception.rb b/lib/rubocop/cop/lint/duplicate_rescue_exception.rb index 36bfd11df2f..22f59f90e57 100644 --- a/lib/rubocop/cop/lint/duplicate_rescue_exception.rb +++ b/lib/rubocop/cop/lint/duplicate_rescue_exception.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks that there are no repeated exceptions + # Checks that there are no repeated exceptions # used in 'rescue' expressions. # # @example diff --git a/lib/rubocop/cop/lint/each_with_object_argument.rb b/lib/rubocop/cop/lint/each_with_object_argument.rb index e4d6fa2a4db..3c82fb2bae3 100644 --- a/lib/rubocop/cop/lint/each_with_object_argument.rb +++ b/lib/rubocop/cop/lint/each_with_object_argument.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks if each_with_object is called with an immutable + # Checks if each_with_object is called with an immutable # argument. Since the argument is the object that the given block shall # make calls on to build something based on the enumerable that # each_with_object iterates over, an immutable argument makes no sense. diff --git a/lib/rubocop/cop/lint/else_layout.rb b/lib/rubocop/cop/lint/else_layout.rb index 0e301951c64..f728b5c2ed3 100644 --- a/lib/rubocop/cop/lint/else_layout.rb +++ b/lib/rubocop/cop/lint/else_layout.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for odd `else` block layout - like + # Checks for odd `else` block layout - like # having an expression on the same line as the `else` keyword, # which is usually a mistake. # diff --git a/lib/rubocop/cop/lint/empty_block.rb b/lib/rubocop/cop/lint/empty_block.rb index 006fcc16614..a2ff31b6b32 100644 --- a/lib/rubocop/cop/lint/empty_block.rb +++ b/lib/rubocop/cop/lint/empty_block.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for blocks without a body. + # Checks for blocks without a body. # Such empty blocks are typically an oversight or we should provide a comment # be clearer what we're aiming for. # diff --git a/lib/rubocop/cop/lint/empty_class.rb b/lib/rubocop/cop/lint/empty_class.rb index ea999303882..c90d10fecf8 100644 --- a/lib/rubocop/cop/lint/empty_class.rb +++ b/lib/rubocop/cop/lint/empty_class.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for classes and metaclasses without a body. + # Checks for classes and metaclasses without a body. # Such empty classes and metaclasses are typically an oversight or we should provide a comment # to be clearer what we're aiming for. # diff --git a/lib/rubocop/cop/lint/empty_conditional_body.rb b/lib/rubocop/cop/lint/empty_conditional_body.rb index 67829ec4232..d29d08ded5b 100644 --- a/lib/rubocop/cop/lint/empty_conditional_body.rb +++ b/lib/rubocop/cop/lint/empty_conditional_body.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for the presence of `if`, `elsif` and `unless` branches without a body. + # Checks for the presence of `if`, `elsif` and `unless` branches without a body. # @example # # bad # if condition diff --git a/lib/rubocop/cop/lint/empty_ensure.rb b/lib/rubocop/cop/lint/empty_ensure.rb index 4fa804a4a23..67339a8dee9 100644 --- a/lib/rubocop/cop/lint/empty_ensure.rb +++ b/lib/rubocop/cop/lint/empty_ensure.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for empty `ensure` blocks + # Checks for empty `ensure` blocks # # @example # diff --git a/lib/rubocop/cop/lint/empty_expression.rb b/lib/rubocop/cop/lint/empty_expression.rb index 8831f734d7c..f6cbb768f6c 100644 --- a/lib/rubocop/cop/lint/empty_expression.rb +++ b/lib/rubocop/cop/lint/empty_expression.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for the presence of empty expressions. + # Checks for the presence of empty expressions. # # @example # diff --git a/lib/rubocop/cop/lint/empty_file.rb b/lib/rubocop/cop/lint/empty_file.rb index 5af3194934d..8a5ea43c70e 100644 --- a/lib/rubocop/cop/lint/empty_file.rb +++ b/lib/rubocop/cop/lint/empty_file.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop enforces that Ruby source files are not empty. + # Enforces that Ruby source files are not empty. # # @example # # bad diff --git a/lib/rubocop/cop/lint/empty_in_pattern.rb b/lib/rubocop/cop/lint/empty_in_pattern.rb index f401a38df50..bb5ab466771 100644 --- a/lib/rubocop/cop/lint/empty_in_pattern.rb +++ b/lib/rubocop/cop/lint/empty_in_pattern.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for the presence of `in` pattern branches without a body. + # Checks for the presence of `in` pattern branches without a body. # # @example # diff --git a/lib/rubocop/cop/lint/empty_interpolation.rb b/lib/rubocop/cop/lint/empty_interpolation.rb index 5c86aead7fc..8e1b40bce65 100644 --- a/lib/rubocop/cop/lint/empty_interpolation.rb +++ b/lib/rubocop/cop/lint/empty_interpolation.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for empty interpolation. + # Checks for empty interpolation. # # @example # diff --git a/lib/rubocop/cop/lint/empty_when.rb b/lib/rubocop/cop/lint/empty_when.rb index d83c352e2cf..bc80d9517be 100644 --- a/lib/rubocop/cop/lint/empty_when.rb +++ b/lib/rubocop/cop/lint/empty_when.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for the presence of `when` branches without a body. + # Checks for the presence of `when` branches without a body. # # @example # diff --git a/lib/rubocop/cop/lint/ensure_return.rb b/lib/rubocop/cop/lint/ensure_return.rb index 03cb0d0c59b..40fab3edd44 100644 --- a/lib/rubocop/cop/lint/ensure_return.rb +++ b/lib/rubocop/cop/lint/ensure_return.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for `return` from an `ensure` block. + # Checks for `return` from an `ensure` block. # `return` from an ensure block is a dangerous code smell as it # will take precedence over any exception being raised, # and the exception will be silently thrown away as if it were rescued. diff --git a/lib/rubocop/cop/lint/flip_flop.rb b/lib/rubocop/cop/lint/flip_flop.rb index 73211b59257..b4262f9b766 100644 --- a/lib/rubocop/cop/lint/flip_flop.rb +++ b/lib/rubocop/cop/lint/flip_flop.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop looks for uses of flip-flop operator + # Looks for uses of flip-flop operator # based on the Ruby Style Guide. # # Here is the history of flip-flops in Ruby. diff --git a/lib/rubocop/cop/lint/float_comparison.rb b/lib/rubocop/cop/lint/float_comparison.rb index 028150ec5fd..eacc56976bf 100644 --- a/lib/rubocop/cop/lint/float_comparison.rb +++ b/lib/rubocop/cop/lint/float_comparison.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for the presence of precise comparison of floating point numbers. + # Checks for the presence of precise comparison of floating point numbers. # # Floating point values are inherently inaccurate, and comparing them for exact equality # is almost never the desired semantics. Comparison via the `==/!=` operators checks diff --git a/lib/rubocop/cop/lint/float_out_of_range.rb b/lib/rubocop/cop/lint/float_out_of_range.rb index 3f930efe40d..7b4729f95a4 100644 --- a/lib/rubocop/cop/lint/float_out_of_range.rb +++ b/lib/rubocop/cop/lint/float_out_of_range.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop identifies Float literals which are, like, really really really + # Identifies Float literals which are, like, really really really # really really really really really big. Too big. No-one needs Floats # that big. If you need a float that big, something is wrong with you. # diff --git a/lib/rubocop/cop/lint/heredoc_method_call_position.rb b/lib/rubocop/cop/lint/heredoc_method_call_position.rb index 6cbbeea76aa..0e4edebb909 100644 --- a/lib/rubocop/cop/lint/heredoc_method_call_position.rb +++ b/lib/rubocop/cop/lint/heredoc_method_call_position.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for the ordering of a method call where + # Checks for the ordering of a method call where # the receiver of the call is a HEREDOC. # # @example diff --git a/lib/rubocop/cop/lint/implicit_string_concatenation.rb b/lib/rubocop/cop/lint/implicit_string_concatenation.rb index b68fdfb6775..baacb71dbef 100644 --- a/lib/rubocop/cop/lint/implicit_string_concatenation.rb +++ b/lib/rubocop/cop/lint/implicit_string_concatenation.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for implicit string concatenation of string literals + # Checks for implicit string concatenation of string literals # which are on the same line. # # @example diff --git a/lib/rubocop/cop/lint/ineffective_access_modifier.rb b/lib/rubocop/cop/lint/ineffective_access_modifier.rb index 0f2b0c32328..a6984ad7bea 100644 --- a/lib/rubocop/cop/lint/ineffective_access_modifier.rb +++ b/lib/rubocop/cop/lint/ineffective_access_modifier.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for `private` or `protected` access modifiers which are + # Checks for `private` or `protected` access modifiers which are # applied to a singleton method. These access modifiers do not make # singleton methods private/protected. `private_class_method` can be # used for that. diff --git a/lib/rubocop/cop/lint/inherit_exception.rb b/lib/rubocop/cop/lint/inherit_exception.rb index 2c7b32486bb..2d43d20994f 100644 --- a/lib/rubocop/cop/lint/inherit_exception.rb +++ b/lib/rubocop/cop/lint/inherit_exception.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop looks for error classes inheriting from `Exception`. + # Looks for error classes inheriting from `Exception`. # It is configurable to suggest using either `StandardError` (default) or # `RuntimeError` instead. # diff --git a/lib/rubocop/cop/lint/interpolation_check.rb b/lib/rubocop/cop/lint/interpolation_check.rb index 8fc44b9c9f0..ee976777b11 100644 --- a/lib/rubocop/cop/lint/interpolation_check.rb +++ b/lib/rubocop/cop/lint/interpolation_check.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for interpolation in a single quoted string. + # Checks for interpolation in a single quoted string. # # @safety # This cop is generally safe, but is marked as unsafe because diff --git a/lib/rubocop/cop/lint/lambda_without_literal_block.rb b/lib/rubocop/cop/lint/lambda_without_literal_block.rb index 577225a342c..9db76df697e 100644 --- a/lib/rubocop/cop/lint/lambda_without_literal_block.rb +++ b/lib/rubocop/cop/lint/lambda_without_literal_block.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks uses of lambda without a literal block. + # Checks uses of lambda without a literal block. # It emulates the following warning in Ruby 3.0: # # % ruby -vwe 'lambda(&proc {})' diff --git a/lib/rubocop/cop/lint/literal_as_condition.rb b/lib/rubocop/cop/lint/literal_as_condition.rb index e72441ffb9d..4f03eff4c55 100644 --- a/lib/rubocop/cop/lint/literal_as_condition.rb +++ b/lib/rubocop/cop/lint/literal_as_condition.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for literals used as the conditions or as + # Checks for literals used as the conditions or as # operands in and/or expressions serving as the conditions of # if/while/until/case-when/case-in. # diff --git a/lib/rubocop/cop/lint/literal_in_interpolation.rb b/lib/rubocop/cop/lint/literal_in_interpolation.rb index 34f4c49bbdf..f5d65666cf4 100644 --- a/lib/rubocop/cop/lint/literal_in_interpolation.rb +++ b/lib/rubocop/cop/lint/literal_in_interpolation.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for interpolated literals. + # Checks for interpolated literals. # # @example # diff --git a/lib/rubocop/cop/lint/loop.rb b/lib/rubocop/cop/lint/loop.rb index 8ec8bd2ad7b..d0122c76c54 100644 --- a/lib/rubocop/cop/lint/loop.rb +++ b/lib/rubocop/cop/lint/loop.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for uses of `begin...end while/until something`. + # Checks for uses of `begin...end while/until something`. # # @safety # The cop is unsafe because behavior can change in some cases, including diff --git a/lib/rubocop/cop/lint/missing_cop_enable_directive.rb b/lib/rubocop/cop/lint/missing_cop_enable_directive.rb index a398e554fd6..c4e332afe7e 100644 --- a/lib/rubocop/cop/lint/missing_cop_enable_directive.rb +++ b/lib/rubocop/cop/lint/missing_cop_enable_directive.rb @@ -4,7 +4,7 @@ module RuboCop module Cop module Lint - # This cop checks that there is an `# rubocop:enable ...` statement + # Checks that there is an `# rubocop:enable ...` statement # after a `# rubocop:disable ...` statement. This will prevent leaving # cop disables on wide ranges of code, that latter contributors to # a file wouldn't be aware of. diff --git a/lib/rubocop/cop/lint/missing_super.rb b/lib/rubocop/cop/lint/missing_super.rb index 4eb193b6adb..9236890ec34 100644 --- a/lib/rubocop/cop/lint/missing_super.rb +++ b/lib/rubocop/cop/lint/missing_super.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for the presence of constructors and lifecycle callbacks + # Checks for the presence of constructors and lifecycle callbacks # without calls to `super`. # # This cop does not consider `method_missing` (and `respond_to_missing?`) diff --git a/lib/rubocop/cop/lint/nested_method_definition.rb b/lib/rubocop/cop/lint/nested_method_definition.rb index 29aff2f4330..e39c1898ade 100644 --- a/lib/rubocop/cop/lint/nested_method_definition.rb +++ b/lib/rubocop/cop/lint/nested_method_definition.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for nested method definitions. + # Checks for nested method definitions. # # @example # diff --git a/lib/rubocop/cop/lint/nested_percent_literal.rb b/lib/rubocop/cop/lint/nested_percent_literal.rb index a8bc66b6089..05878c3b767 100644 --- a/lib/rubocop/cop/lint/nested_percent_literal.rb +++ b/lib/rubocop/cop/lint/nested_percent_literal.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for nested percent literals. + # Checks for nested percent literals. # # @example # diff --git a/lib/rubocop/cop/lint/non_local_exit_from_iterator.rb b/lib/rubocop/cop/lint/non_local_exit_from_iterator.rb index 937f5383111..b7e828f7601 100644 --- a/lib/rubocop/cop/lint/non_local_exit_from_iterator.rb +++ b/lib/rubocop/cop/lint/non_local_exit_from_iterator.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for non-local exits from iterators without a return + # Checks for non-local exits from iterators without a return # value. It registers an offense under these conditions: # # * No value is returned, diff --git a/lib/rubocop/cop/lint/number_conversion.rb b/lib/rubocop/cop/lint/number_conversion.rb index 4e2c8472fb4..e0c036ff6f3 100644 --- a/lib/rubocop/cop/lint/number_conversion.rb +++ b/lib/rubocop/cop/lint/number_conversion.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop warns the usage of unsafe number conversions. Unsafe + # Warns the usage of unsafe number conversions. Unsafe # number conversion can cause unexpected error if auto type conversion # fails. Cop prefer parsing with number class instead. # diff --git a/lib/rubocop/cop/lint/numbered_parameter_assignment.rb b/lib/rubocop/cop/lint/numbered_parameter_assignment.rb index 6996dcb1ab1..ff5d5eee512 100644 --- a/lib/rubocop/cop/lint/numbered_parameter_assignment.rb +++ b/lib/rubocop/cop/lint/numbered_parameter_assignment.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for uses of numbered parameter assignment. + # Checks for uses of numbered parameter assignment. # It emulates the following warning in Ruby 2.7: # # % ruby -ve '_1 = :value' diff --git a/lib/rubocop/cop/lint/or_assignment_to_constant.rb b/lib/rubocop/cop/lint/or_assignment_to_constant.rb index 3e4e97720cd..284d91e6120 100644 --- a/lib/rubocop/cop/lint/or_assignment_to_constant.rb +++ b/lib/rubocop/cop/lint/or_assignment_to_constant.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for unintended or-assignment to a constant. + # Checks for unintended or-assignment to a constant. # # Constants should always be assigned in the same location. And its value # should always be the same. If constants are assigned in multiple diff --git a/lib/rubocop/cop/lint/percent_string_array.rb b/lib/rubocop/cop/lint/percent_string_array.rb index ea5eef58e4c..a4233b5679e 100644 --- a/lib/rubocop/cop/lint/percent_string_array.rb +++ b/lib/rubocop/cop/lint/percent_string_array.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for quotes and commas in %w, e.g. `%w('foo', "bar")` + # Checks for quotes and commas in %w, e.g. `%w('foo', "bar")` # # It is more likely that the additional characters are unintended (for # example, mistranslating an array of literals to percent string notation) diff --git a/lib/rubocop/cop/lint/percent_symbol_array.rb b/lib/rubocop/cop/lint/percent_symbol_array.rb index 98ff32f0e17..dcf7c0e1175 100644 --- a/lib/rubocop/cop/lint/percent_symbol_array.rb +++ b/lib/rubocop/cop/lint/percent_symbol_array.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for colons and commas in %i, e.g. `%i(:foo, :bar)` + # Checks for colons and commas in %i, e.g. `%i(:foo, :bar)` # # It is more likely that the additional characters are unintended (for # example, mistranslating an array of literals to percent string notation) diff --git a/lib/rubocop/cop/lint/raise_exception.rb b/lib/rubocop/cop/lint/raise_exception.rb index 2b79dda5496..6a02975e3da 100644 --- a/lib/rubocop/cop/lint/raise_exception.rb +++ b/lib/rubocop/cop/lint/raise_exception.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for `raise` or `fail` statements which are + # Checks for `raise` or `fail` statements which are # raising `Exception` class. # # You can specify a module name that will be an implicit namespace diff --git a/lib/rubocop/cop/lint/rand_one.rb b/lib/rubocop/cop/lint/rand_one.rb index 2cd9c151e66..d17cf4815d9 100644 --- a/lib/rubocop/cop/lint/rand_one.rb +++ b/lib/rubocop/cop/lint/rand_one.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for `rand(1)` calls. + # Checks for `rand(1)` calls. # Such calls always return `0`. # # @example diff --git a/lib/rubocop/cop/lint/redundant_cop_disable_directive.rb b/lib/rubocop/cop/lint/redundant_cop_disable_directive.rb index b5aec0403f4..5faf0f2fd15 100644 --- a/lib/rubocop/cop/lint/redundant_cop_disable_directive.rb +++ b/lib/rubocop/cop/lint/redundant_cop_disable_directive.rb @@ -6,7 +6,7 @@ module RuboCop module Cop module Lint - # This cop detects instances of rubocop:disable comments that can be + # Detects instances of rubocop:disable comments that can be # removed without causing any offenses to be reported. It's implemented # as a cop in that it inherits from the Cop base class and calls # add_offense. The unusual part of its implementation is that it doesn't diff --git a/lib/rubocop/cop/lint/redundant_cop_enable_directive.rb b/lib/rubocop/cop/lint/redundant_cop_enable_directive.rb index a47f45bd297..9e8033ce2b9 100644 --- a/lib/rubocop/cop/lint/redundant_cop_enable_directive.rb +++ b/lib/rubocop/cop/lint/redundant_cop_enable_directive.rb @@ -9,7 +9,7 @@ module RuboCop module Cop module Lint - # This cop detects instances of rubocop:enable comments that can be + # Detects instances of rubocop:enable comments that can be # removed. # # When comment enables all cops at once `rubocop:enable all` diff --git a/lib/rubocop/cop/lint/redundant_safe_navigation.rb b/lib/rubocop/cop/lint/redundant_safe_navigation.rb index 7efb3f90727..14b7bd74a95 100644 --- a/lib/rubocop/cop/lint/redundant_safe_navigation.rb +++ b/lib/rubocop/cop/lint/redundant_safe_navigation.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for redundant safe navigation calls. + # Checks for redundant safe navigation calls. # `instance_of?`, `kind_of?`, `is_a?`, `eql?`, `respond_to?`, and `equal?` methods # are checked by default. These are customizable with `AllowedMethods` option. # diff --git a/lib/rubocop/cop/lint/redundant_splat_expansion.rb b/lib/rubocop/cop/lint/redundant_splat_expansion.rb index 0746eb16362..1465b749fe3 100644 --- a/lib/rubocop/cop/lint/redundant_splat_expansion.rb +++ b/lib/rubocop/cop/lint/redundant_splat_expansion.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for unneeded usages of splat expansion + # Checks for unneeded usages of splat expansion # # @example # diff --git a/lib/rubocop/cop/lint/redundant_string_coercion.rb b/lib/rubocop/cop/lint/redundant_string_coercion.rb index 50dad9fa4ec..59d26523739 100644 --- a/lib/rubocop/cop/lint/redundant_string_coercion.rb +++ b/lib/rubocop/cop/lint/redundant_string_coercion.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for string conversion in string interpolation, + # Checks for string conversion in string interpolation, # which is redundant. # # @example diff --git a/lib/rubocop/cop/lint/redundant_with_index.rb b/lib/rubocop/cop/lint/redundant_with_index.rb index a11f75e8081..45e514dc7bc 100644 --- a/lib/rubocop/cop/lint/redundant_with_index.rb +++ b/lib/rubocop/cop/lint/redundant_with_index.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for redundant `with_index`. + # Checks for redundant `with_index`. # # @example # # bad diff --git a/lib/rubocop/cop/lint/redundant_with_object.rb b/lib/rubocop/cop/lint/redundant_with_object.rb index c3fcb2a98b4..cfc54b1dba0 100644 --- a/lib/rubocop/cop/lint/redundant_with_object.rb +++ b/lib/rubocop/cop/lint/redundant_with_object.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for redundant `with_object`. + # Checks for redundant `with_object`. # # @example # # bad diff --git a/lib/rubocop/cop/lint/refinement_import_methods.rb b/lib/rubocop/cop/lint/refinement_import_methods.rb index f6f5837b482..94b3aad8e34 100644 --- a/lib/rubocop/cop/lint/refinement_import_methods.rb +++ b/lib/rubocop/cop/lint/refinement_import_methods.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks if `include` or `prepend` is called in `refine` block. + # Checks if `include` or `prepend` is called in `refine` block. # These methods are deprecated and should be replaced with `Refinement#import_methods`. # # It emulates deprecation warnings in Ruby 3.1. diff --git a/lib/rubocop/cop/lint/regexp_as_condition.rb b/lib/rubocop/cop/lint/regexp_as_condition.rb index 28f632d164d..6a0f6a76b72 100644 --- a/lib/rubocop/cop/lint/regexp_as_condition.rb +++ b/lib/rubocop/cop/lint/regexp_as_condition.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for regexp literals used as `match-current-line`. + # Checks for regexp literals used as `match-current-line`. # If a regexp literal is in condition, the regexp matches `$_` implicitly. # # @example diff --git a/lib/rubocop/cop/lint/require_parentheses.rb b/lib/rubocop/cop/lint/require_parentheses.rb index 39c6c393676..f66dc1d6663 100644 --- a/lib/rubocop/cop/lint/require_parentheses.rb +++ b/lib/rubocop/cop/lint/require_parentheses.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for expressions where there is a call to a predicate + # Checks for expressions where there is a call to a predicate # method with at least one argument, where no parentheses are used around # the parameter list, and a boolean operator, && or ||, is used in the # last argument. diff --git a/lib/rubocop/cop/lint/rescue_exception.rb b/lib/rubocop/cop/lint/rescue_exception.rb index 9deb1d285ed..6a0230e3ef8 100644 --- a/lib/rubocop/cop/lint/rescue_exception.rb +++ b/lib/rubocop/cop/lint/rescue_exception.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for `rescue` blocks targeting the Exception class. + # Checks for `rescue` blocks targeting the Exception class. # # @example # diff --git a/lib/rubocop/cop/lint/return_in_void_context.rb b/lib/rubocop/cop/lint/return_in_void_context.rb index a88f4d81f4f..82674ca18b2 100644 --- a/lib/rubocop/cop/lint/return_in_void_context.rb +++ b/lib/rubocop/cop/lint/return_in_void_context.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for the use of a return with a value in a context + # Checks for the use of a return with a value in a context # where the value will be ignored. (initialize and setter methods) # # @example diff --git a/lib/rubocop/cop/lint/safe_navigation_consistency.rb b/lib/rubocop/cop/lint/safe_navigation_consistency.rb index 4508a8b7fb7..b1b32a393e7 100644 --- a/lib/rubocop/cop/lint/safe_navigation_consistency.rb +++ b/lib/rubocop/cop/lint/safe_navigation_consistency.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop check to make sure that if safe navigation is used for a method + # Check to make sure that if safe navigation is used for a method # call in an `&&` or `||` condition that safe navigation is used for all # method calls on that same object. # diff --git a/lib/rubocop/cop/lint/safe_navigation_with_empty.rb b/lib/rubocop/cop/lint/safe_navigation_with_empty.rb index 78c5e40f42b..2aa2dae29a3 100644 --- a/lib/rubocop/cop/lint/safe_navigation_with_empty.rb +++ b/lib/rubocop/cop/lint/safe_navigation_with_empty.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks to make sure safe navigation isn't used with `empty?` in + # Checks to make sure safe navigation isn't used with `empty?` in # a conditional. # # While the safe navigation operator is generally a good idea, when diff --git a/lib/rubocop/cop/lint/script_permission.rb b/lib/rubocop/cop/lint/script_permission.rb index 85861837b9f..2d5a60a0659 100644 --- a/lib/rubocop/cop/lint/script_permission.rb +++ b/lib/rubocop/cop/lint/script_permission.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks if a file which has a shebang line as + # Checks if a file which has a shebang line as # its first line is granted execute permission. # # @example diff --git a/lib/rubocop/cop/lint/self_assignment.rb b/lib/rubocop/cop/lint/self_assignment.rb index 9d453f09a0e..dc484340481 100644 --- a/lib/rubocop/cop/lint/self_assignment.rb +++ b/lib/rubocop/cop/lint/self_assignment.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for self-assignments. + # Checks for self-assignments. # # @example # # bad diff --git a/lib/rubocop/cop/lint/shadowed_argument.rb b/lib/rubocop/cop/lint/shadowed_argument.rb index 32c44112262..9cd9a744b32 100644 --- a/lib/rubocop/cop/lint/shadowed_argument.rb +++ b/lib/rubocop/cop/lint/shadowed_argument.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for shadowed arguments. + # Checks for shadowed arguments. # # This cop has `IgnoreImplicitReferences` configuration option. # It means argument shadowing is used in order to pass parameters diff --git a/lib/rubocop/cop/lint/shadowed_exception.rb b/lib/rubocop/cop/lint/shadowed_exception.rb index 8ed773df539..f2c1f214973 100644 --- a/lib/rubocop/cop/lint/shadowed_exception.rb +++ b/lib/rubocop/cop/lint/shadowed_exception.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for a rescued exception that get shadowed by a + # Checks for a rescued exception that get shadowed by a # less specific exception being rescued before a more specific # exception is rescued. # diff --git a/lib/rubocop/cop/lint/shadowing_outer_local_variable.rb b/lib/rubocop/cop/lint/shadowing_outer_local_variable.rb index 9279c1ce946..29f4a83eff3 100644 --- a/lib/rubocop/cop/lint/shadowing_outer_local_variable.rb +++ b/lib/rubocop/cop/lint/shadowing_outer_local_variable.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for the use of local variable names from an outer scope + # Checks for the use of local variable names from an outer scope # in block arguments or block-local variables. This mirrors the warning # given by `ruby -cw` prior to Ruby 2.6: # "shadowing outer local variable - foo". diff --git a/lib/rubocop/cop/lint/struct_new_override.rb b/lib/rubocop/cop/lint/struct_new_override.rb index c3722928404..09216f56883 100644 --- a/lib/rubocop/cop/lint/struct_new_override.rb +++ b/lib/rubocop/cop/lint/struct_new_override.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks unexpected overrides of the `Struct` built-in methods + # Checks unexpected overrides of the `Struct` built-in methods # via `Struct.new`. # # @example diff --git a/lib/rubocop/cop/lint/suppressed_exception.rb b/lib/rubocop/cop/lint/suppressed_exception.rb index 91085957fd6..ebb23cbfe45 100644 --- a/lib/rubocop/cop/lint/suppressed_exception.rb +++ b/lib/rubocop/cop/lint/suppressed_exception.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for `rescue` blocks with no body. + # Checks for `rescue` blocks with no body. # # @example # diff --git a/lib/rubocop/cop/lint/symbol_conversion.rb b/lib/rubocop/cop/lint/symbol_conversion.rb index c748d2df002..67d1d29bf9e 100644 --- a/lib/rubocop/cop/lint/symbol_conversion.rb +++ b/lib/rubocop/cop/lint/symbol_conversion.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for uses of literal strings converted to + # Checks for uses of literal strings converted to # a symbol where a literal symbol could be used instead. # # There are two possible styles for this cop. diff --git a/lib/rubocop/cop/lint/syntax.rb b/lib/rubocop/cop/lint/syntax.rb index c294dcf3142..1c25a5b7d98 100644 --- a/lib/rubocop/cop/lint/syntax.rb +++ b/lib/rubocop/cop/lint/syntax.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop repacks Parser's diagnostics/errors + # Repacks Parser's diagnostics/errors # into RuboCop's offenses. class Syntax < Base def on_other_file diff --git a/lib/rubocop/cop/lint/to_enum_arguments.rb b/lib/rubocop/cop/lint/to_enum_arguments.rb index bdcb616f976..0a697257a90 100644 --- a/lib/rubocop/cop/lint/to_enum_arguments.rb +++ b/lib/rubocop/cop/lint/to_enum_arguments.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop ensures that `to_enum`/`enum_for`, called for the current method, + # Ensures that `to_enum`/`enum_for`, called for the current method, # has correct arguments. # # @example diff --git a/lib/rubocop/cop/lint/to_json.rb b/lib/rubocop/cop/lint/to_json.rb index 763d97417ae..7345330cf20 100644 --- a/lib/rubocop/cop/lint/to_json.rb +++ b/lib/rubocop/cop/lint/to_json.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks to make sure `#to_json` includes an optional argument. + # Checks to make sure `#to_json` includes an optional argument. # When overriding `#to_json`, callers may invoke JSON # generation via `JSON.generate(your_obj)`. Since `JSON#generate` allows # for an optional argument, your method should too. diff --git a/lib/rubocop/cop/lint/top_level_return_with_argument.rb b/lib/rubocop/cop/lint/top_level_return_with_argument.rb index 48c3dffa914..c6d9224a1ca 100644 --- a/lib/rubocop/cop/lint/top_level_return_with_argument.rb +++ b/lib/rubocop/cop/lint/top_level_return_with_argument.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for top level return with arguments. If there is a + # Checks for top level return with arguments. If there is a # top-level return statement with an argument, then the argument is # always ignored. This is detected automatically since Ruby 2.7. # diff --git a/lib/rubocop/cop/lint/trailing_comma_in_attribute_declaration.rb b/lib/rubocop/cop/lint/trailing_comma_in_attribute_declaration.rb index 3f3a37da6eb..cae7f3079c6 100644 --- a/lib/rubocop/cop/lint/trailing_comma_in_attribute_declaration.rb +++ b/lib/rubocop/cop/lint/trailing_comma_in_attribute_declaration.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for trailing commas in attribute declarations, such as + # Checks for trailing commas in attribute declarations, such as # `#attr_reader`. Leaving a trailing comma will nullify the next method # definition by overriding it with a getter method. # diff --git a/lib/rubocop/cop/lint/triple_quotes.rb b/lib/rubocop/cop/lint/triple_quotes.rb index 49afe013b6b..dee9e77525a 100644 --- a/lib/rubocop/cop/lint/triple_quotes.rb +++ b/lib/rubocop/cop/lint/triple_quotes.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for "triple quotes" (strings delimited by any odd number + # Checks for "triple quotes" (strings delimited by any odd number # of quotes greater than 1). # # Ruby allows multiple strings to be implicitly concatenated by just diff --git a/lib/rubocop/cop/lint/underscore_prefixed_variable_name.rb b/lib/rubocop/cop/lint/underscore_prefixed_variable_name.rb index e401eedd53a..ed13f91bde3 100644 --- a/lib/rubocop/cop/lint/underscore_prefixed_variable_name.rb +++ b/lib/rubocop/cop/lint/underscore_prefixed_variable_name.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for underscore-prefixed variables that are actually + # Checks for underscore-prefixed variables that are actually # used. # # Since block keyword arguments cannot be arbitrarily named at call diff --git a/lib/rubocop/cop/lint/unexpected_block_arity.rb b/lib/rubocop/cop/lint/unexpected_block_arity.rb index f1288d72979..8d10845b58b 100644 --- a/lib/rubocop/cop/lint/unexpected_block_arity.rb +++ b/lib/rubocop/cop/lint/unexpected_block_arity.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for a block that is known to need more positional + # Checks for a block that is known to need more positional # block arguments than are given (by default this is configured for # `Enumerable` methods needing 2 arguments). Optional arguments are allowed, # although they don't generally make sense as the default value will diff --git a/lib/rubocop/cop/lint/unified_integer.rb b/lib/rubocop/cop/lint/unified_integer.rb index eec0873865f..a7c46babe37 100644 --- a/lib/rubocop/cop/lint/unified_integer.rb +++ b/lib/rubocop/cop/lint/unified_integer.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for using Fixnum or Bignum constant. + # Checks for using Fixnum or Bignum constant. # # @example # diff --git a/lib/rubocop/cop/lint/unreachable_code.rb b/lib/rubocop/cop/lint/unreachable_code.rb index 7ab5b475129..315933d1e0f 100644 --- a/lib/rubocop/cop/lint/unreachable_code.rb +++ b/lib/rubocop/cop/lint/unreachable_code.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for unreachable code. + # Checks for unreachable code. # The check are based on the presence of flow of control # statement in non-final position in `begin` (implicit) blocks. # diff --git a/lib/rubocop/cop/lint/unreachable_loop.rb b/lib/rubocop/cop/lint/unreachable_loop.rb index 0d03163f3d7..a423b9b803a 100644 --- a/lib/rubocop/cop/lint/unreachable_loop.rb +++ b/lib/rubocop/cop/lint/unreachable_loop.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for loops that will have at most one iteration. + # Checks for loops that will have at most one iteration. # # A loop that can never reach the second iteration is a possible error in the code. # In rare cases where only one iteration (or at most one iteration) is intended behavior, diff --git a/lib/rubocop/cop/lint/unused_block_argument.rb b/lib/rubocop/cop/lint/unused_block_argument.rb index af42786b05e..b266d51c15a 100644 --- a/lib/rubocop/cop/lint/unused_block_argument.rb +++ b/lib/rubocop/cop/lint/unused_block_argument.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for unused block arguments. + # Checks for unused block arguments. # # @example # # bad diff --git a/lib/rubocop/cop/lint/unused_method_argument.rb b/lib/rubocop/cop/lint/unused_method_argument.rb index 6c3549cebde..f305f3be4ba 100644 --- a/lib/rubocop/cop/lint/unused_method_argument.rb +++ b/lib/rubocop/cop/lint/unused_method_argument.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for unused method arguments. + # Checks for unused method arguments. # # @example # # bad diff --git a/lib/rubocop/cop/lint/uri_escape_unescape.rb b/lib/rubocop/cop/lint/uri_escape_unescape.rb index d5c3ea97f4c..d7beb943f97 100644 --- a/lib/rubocop/cop/lint/uri_escape_unescape.rb +++ b/lib/rubocop/cop/lint/uri_escape_unescape.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop identifies places where `URI.escape` can be replaced by + # Identifies places where `URI.escape` can be replaced by # `CGI.escape`, `URI.encode_www_form`, or `URI.encode_www_form_component` # depending on your specific use case. # Also this cop identifies places where `URI.unescape` can be replaced by diff --git a/lib/rubocop/cop/lint/uri_regexp.rb b/lib/rubocop/cop/lint/uri_regexp.rb index 2813d94c5f2..cc98d971918 100644 --- a/lib/rubocop/cop/lint/uri_regexp.rb +++ b/lib/rubocop/cop/lint/uri_regexp.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop identifies places where `URI.regexp` is obsolete and should + # Identifies places where `URI.regexp` is obsolete and should # not be used. Instead, use `URI::DEFAULT_PARSER.make_regexp`. # # @example diff --git a/lib/rubocop/cop/lint/useless_access_modifier.rb b/lib/rubocop/cop/lint/useless_access_modifier.rb index 7d7cf702d7c..2b04eb7509d 100644 --- a/lib/rubocop/cop/lint/useless_access_modifier.rb +++ b/lib/rubocop/cop/lint/useless_access_modifier.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for redundant access modifiers, including those with no + # Checks for redundant access modifiers, including those with no # code, those which are repeated, and leading `public` modifiers in a # class or module body. Conditionally-defined methods are considered as # always being defined, and thus access modifiers guarding such methods diff --git a/lib/rubocop/cop/lint/useless_assignment.rb b/lib/rubocop/cop/lint/useless_assignment.rb index 63f5b46e7ec..734e19d5f21 100644 --- a/lib/rubocop/cop/lint/useless_assignment.rb +++ b/lib/rubocop/cop/lint/useless_assignment.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for every useless assignment to local variable in every + # Checks for every useless assignment to local variable in every # scope. # The basic idea for this cop was from the warning of `ruby -cw`: # diff --git a/lib/rubocop/cop/lint/useless_method_definition.rb b/lib/rubocop/cop/lint/useless_method_definition.rb index 0d9cf969f1c..fe365ef95a2 100644 --- a/lib/rubocop/cop/lint/useless_method_definition.rb +++ b/lib/rubocop/cop/lint/useless_method_definition.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for useless method definitions, specifically: empty constructors + # Checks for useless method definitions, specifically: empty constructors # and methods just delegating to `super`. # # @safety diff --git a/lib/rubocop/cop/lint/useless_ruby2_keywords.rb b/lib/rubocop/cop/lint/useless_ruby2_keywords.rb index 3b6485d3a02..fbaad55608d 100644 --- a/lib/rubocop/cop/lint/useless_ruby2_keywords.rb +++ b/lib/rubocop/cop/lint/useless_ruby2_keywords.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop looks for `ruby2_keywords` calls for methods that do not need it. + # Looks for `ruby2_keywords` calls for methods that do not need it. # # `ruby2_keywords` should only be called on methods that accept an argument splat # (`*args`) but do not explicit keyword arguments (`k:` or `k: true`) or diff --git a/lib/rubocop/cop/lint/useless_setter_call.rb b/lib/rubocop/cop/lint/useless_setter_call.rb index e4d8ebd0b70..9a236b0d9b5 100644 --- a/lib/rubocop/cop/lint/useless_setter_call.rb +++ b/lib/rubocop/cop/lint/useless_setter_call.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for setter call to local variable as the final + # Checks for setter call to local variable as the final # expression of a function definition. # # @safety diff --git a/lib/rubocop/cop/lint/useless_times.rb b/lib/rubocop/cop/lint/useless_times.rb index 345190b8659..9f404c8e9cf 100644 --- a/lib/rubocop/cop/lint/useless_times.rb +++ b/lib/rubocop/cop/lint/useless_times.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for uses of `Integer#times` that will never yield + # Checks for uses of `Integer#times` that will never yield # (when the integer <= 0) or that will only ever yield once # (`1.times`). # diff --git a/lib/rubocop/cop/lint/void.rb b/lib/rubocop/cop/lint/void.rb index a94380e6cfe..3d0f8fa08e2 100644 --- a/lib/rubocop/cop/lint/void.rb +++ b/lib/rubocop/cop/lint/void.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Lint - # This cop checks for operators, variables, literals, and nonmutating + # Checks for operators, variables, literals, and nonmutating # methods used in void context. # # @example CheckForMethodsWithNoSideEffects: false (default) diff --git a/lib/rubocop/cop/metrics/abc_size.rb b/lib/rubocop/cop/metrics/abc_size.rb index b1249ccb294..9a09511cf7b 100644 --- a/lib/rubocop/cop/metrics/abc_size.rb +++ b/lib/rubocop/cop/metrics/abc_size.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Metrics - # This cop checks that the ABC size of methods is not higher than the + # Checks that the ABC size of methods is not higher than the # configured maximum. The ABC size is based on assignments, branches # (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric # and https://en.wikipedia.org/wiki/ABC_Software_Metric. diff --git a/lib/rubocop/cop/metrics/block_length.rb b/lib/rubocop/cop/metrics/block_length.rb index 1474a700ffd..ab2e6499985 100644 --- a/lib/rubocop/cop/metrics/block_length.rb +++ b/lib/rubocop/cop/metrics/block_length.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Metrics - # This cop checks if the length of a block exceeds some maximum value. + # Checks if the length of a block exceeds some maximum value. # Comment lines can optionally be ignored. # The maximum allowed length is configurable. # The cop can be configured to ignore blocks passed to certain methods. diff --git a/lib/rubocop/cop/metrics/block_nesting.rb b/lib/rubocop/cop/metrics/block_nesting.rb index 3ba6f3954d4..6808274b61d 100644 --- a/lib/rubocop/cop/metrics/block_nesting.rb +++ b/lib/rubocop/cop/metrics/block_nesting.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Metrics - # This cop checks for excessive nesting of conditional and looping + # Checks for excessive nesting of conditional and looping # constructs. # # You can configure if blocks are considered using the `CountBlocks` diff --git a/lib/rubocop/cop/metrics/class_length.rb b/lib/rubocop/cop/metrics/class_length.rb index 777a623e849..d5dd5987f64 100644 --- a/lib/rubocop/cop/metrics/class_length.rb +++ b/lib/rubocop/cop/metrics/class_length.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Metrics - # This cop checks if the length a class exceeds some maximum value. + # Checks if the length a class exceeds some maximum value. # Comment lines can optionally be ignored. # The maximum allowed length is configurable. # diff --git a/lib/rubocop/cop/metrics/cyclomatic_complexity.rb b/lib/rubocop/cop/metrics/cyclomatic_complexity.rb index cd5293e300d..9aa06662134 100644 --- a/lib/rubocop/cop/metrics/cyclomatic_complexity.rb +++ b/lib/rubocop/cop/metrics/cyclomatic_complexity.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Metrics - # This cop checks that the cyclomatic complexity of methods is not higher + # Checks that the cyclomatic complexity of methods is not higher # than the configured maximum. The cyclomatic complexity is the number of # linearly independent paths through a method. The algorithm counts # decision points and adds one. diff --git a/lib/rubocop/cop/metrics/method_length.rb b/lib/rubocop/cop/metrics/method_length.rb index 3031a3948ea..06ae6255bbe 100644 --- a/lib/rubocop/cop/metrics/method_length.rb +++ b/lib/rubocop/cop/metrics/method_length.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Metrics - # This cop checks if the length of a method exceeds some maximum value. + # Checks if the length of a method exceeds some maximum value. # Comment lines can optionally be ignored. # The maximum allowed length is configurable. # diff --git a/lib/rubocop/cop/metrics/module_length.rb b/lib/rubocop/cop/metrics/module_length.rb index 07445722099..56ee99bb334 100644 --- a/lib/rubocop/cop/metrics/module_length.rb +++ b/lib/rubocop/cop/metrics/module_length.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Metrics - # This cop checks if the length a module exceeds some maximum value. + # Checks if the length a module exceeds some maximum value. # Comment lines can optionally be ignored. # The maximum allowed length is configurable. # diff --git a/lib/rubocop/cop/metrics/parameter_lists.rb b/lib/rubocop/cop/metrics/parameter_lists.rb index 661fe39c304..6ff025f1ff9 100644 --- a/lib/rubocop/cop/metrics/parameter_lists.rb +++ b/lib/rubocop/cop/metrics/parameter_lists.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Metrics - # This cop checks for methods with too many parameters. + # Checks for methods with too many parameters. # # The maximum number of parameters is configurable. # Keyword arguments can optionally be excluded from the total count, diff --git a/lib/rubocop/cop/metrics/perceived_complexity.rb b/lib/rubocop/cop/metrics/perceived_complexity.rb index 80fc9476bef..31ddf063f37 100644 --- a/lib/rubocop/cop/metrics/perceived_complexity.rb +++ b/lib/rubocop/cop/metrics/perceived_complexity.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Metrics - # This cop tries to produce a complexity score that's a measure of the + # Tries to produce a complexity score that's a measure of the # complexity the reader experiences when looking at a method. For that # reason it considers `when` nodes as something that doesn't add as much # complexity as an `if` or a `&&`. Except if it's one of those special diff --git a/lib/rubocop/cop/naming/accessor_method_name.rb b/lib/rubocop/cop/naming/accessor_method_name.rb index 9bf5a50f2d0..02f41106c3e 100644 --- a/lib/rubocop/cop/naming/accessor_method_name.rb +++ b/lib/rubocop/cop/naming/accessor_method_name.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Naming - # This cop makes sure that accessor methods are named properly. Applies + # Makes sure that accessor methods are named properly. Applies # to both instance and class methods. # # NOTE: Offenses are only registered for methods with the expected diff --git a/lib/rubocop/cop/naming/ascii_identifiers.rb b/lib/rubocop/cop/naming/ascii_identifiers.rb index 6deca210ec2..275a1255020 100644 --- a/lib/rubocop/cop/naming/ascii_identifiers.rb +++ b/lib/rubocop/cop/naming/ascii_identifiers.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Naming - # This cop checks for non-ascii characters in identifier and constant names. + # Checks for non-ascii characters in identifier and constant names. # Identifiers are always checked and whether constants are checked # can be controlled using AsciiConstants config. # diff --git a/lib/rubocop/cop/naming/binary_operator_parameter_name.rb b/lib/rubocop/cop/naming/binary_operator_parameter_name.rb index 2a02933790d..ab976bdeb97 100644 --- a/lib/rubocop/cop/naming/binary_operator_parameter_name.rb +++ b/lib/rubocop/cop/naming/binary_operator_parameter_name.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Naming - # This cop makes sure that certain binary operator methods have their + # Makes sure that certain binary operator methods have their # sole parameter named `other`. # # @example diff --git a/lib/rubocop/cop/naming/block_parameter_name.rb b/lib/rubocop/cop/naming/block_parameter_name.rb index 8f3c571936a..b4f44902092 100644 --- a/lib/rubocop/cop/naming/block_parameter_name.rb +++ b/lib/rubocop/cop/naming/block_parameter_name.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Naming - # This cop checks block parameter names for how descriptive they + # Checks block parameter names for how descriptive they # are. It is highly configurable. # # The `MinNameLength` config option takes an integer. It represents diff --git a/lib/rubocop/cop/naming/class_and_module_camel_case.rb b/lib/rubocop/cop/naming/class_and_module_camel_case.rb index bfdb608c780..81b31e127a0 100644 --- a/lib/rubocop/cop/naming/class_and_module_camel_case.rb +++ b/lib/rubocop/cop/naming/class_and_module_camel_case.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Naming - # This cop checks for class and module names with + # Checks for class and module names with # an underscore in them. # # `AllowedNames` config takes an array of permitted names. diff --git a/lib/rubocop/cop/naming/constant_name.rb b/lib/rubocop/cop/naming/constant_name.rb index 1226787a664..e8ba4526316 100644 --- a/lib/rubocop/cop/naming/constant_name.rb +++ b/lib/rubocop/cop/naming/constant_name.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Naming - # This cop checks whether constant names are written using + # Checks whether constant names are written using # SCREAMING_SNAKE_CASE. # # To avoid false positives, it ignores cases in which we cannot know diff --git a/lib/rubocop/cop/naming/file_name.rb b/lib/rubocop/cop/naming/file_name.rb index 5715b091c17..751b6f0fe69 100644 --- a/lib/rubocop/cop/naming/file_name.rb +++ b/lib/rubocop/cop/naming/file_name.rb @@ -5,7 +5,7 @@ module RuboCop module Cop module Naming - # This cop makes sure that Ruby source files have snake_case + # Makes sure that Ruby source files have snake_case # names. Ruby scripts (i.e. source files with a shebang in the # first line) are ignored. # diff --git a/lib/rubocop/cop/naming/heredoc_delimiter_case.rb b/lib/rubocop/cop/naming/heredoc_delimiter_case.rb index f7d71448b1f..d1936cb701e 100644 --- a/lib/rubocop/cop/naming/heredoc_delimiter_case.rb +++ b/lib/rubocop/cop/naming/heredoc_delimiter_case.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Naming - # This cop checks that your heredocs are using the configured case. + # Checks that your heredocs are using the configured case. # By default it is configured to enforce uppercase heredocs. # # @example EnforcedStyle: uppercase (default) diff --git a/lib/rubocop/cop/naming/heredoc_delimiter_naming.rb b/lib/rubocop/cop/naming/heredoc_delimiter_naming.rb index a28eb0456ad..4c9754ad73e 100644 --- a/lib/rubocop/cop/naming/heredoc_delimiter_naming.rb +++ b/lib/rubocop/cop/naming/heredoc_delimiter_naming.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Naming - # This cop checks that your heredocs are using meaningful delimiters. + # Checks that your heredocs are using meaningful delimiters. # By default it disallows `END` and `EO*`, and can be configured through # forbidden listing additional delimiters. # diff --git a/lib/rubocop/cop/naming/memoized_instance_variable_name.rb b/lib/rubocop/cop/naming/memoized_instance_variable_name.rb index 6668aec9763..e47e156b07d 100644 --- a/lib/rubocop/cop/naming/memoized_instance_variable_name.rb +++ b/lib/rubocop/cop/naming/memoized_instance_variable_name.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Naming - # This cop checks for memoized methods whose instance variable name + # Checks for memoized methods whose instance variable name # does not match the method name. Applies to both regular methods # (defined with `def`) and dynamic methods (defined with # `define_method` or `define_singleton_method`). diff --git a/lib/rubocop/cop/naming/method_name.rb b/lib/rubocop/cop/naming/method_name.rb index 6c4de2f8ab8..63fef6bceba 100644 --- a/lib/rubocop/cop/naming/method_name.rb +++ b/lib/rubocop/cop/naming/method_name.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Naming - # This cop makes sure that all methods use the configured style, + # Makes sure that all methods use the configured style, # snake_case or camelCase, for their names. # # This cop has `AllowedPatterns` configuration option. diff --git a/lib/rubocop/cop/naming/method_parameter_name.rb b/lib/rubocop/cop/naming/method_parameter_name.rb index 642d6a18efd..b75f6b67b17 100644 --- a/lib/rubocop/cop/naming/method_parameter_name.rb +++ b/lib/rubocop/cop/naming/method_parameter_name.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Naming - # This cop checks method parameter names for how descriptive they + # Checks method parameter names for how descriptive they # are. It is highly configurable. # # The `MinNameLength` config option takes an integer. It represents diff --git a/lib/rubocop/cop/naming/predicate_name.rb b/lib/rubocop/cop/naming/predicate_name.rb index aac396633e4..b4beb78ba0f 100644 --- a/lib/rubocop/cop/naming/predicate_name.rb +++ b/lib/rubocop/cop/naming/predicate_name.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Naming - # This cop makes sure that predicates are named properly. + # Makes sure that predicates are named properly. # # @example # # bad diff --git a/lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb b/lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb index e351aeb7b74..f4f25b0ec19 100644 --- a/lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb +++ b/lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Naming - # This cop makes sure that rescued exceptions variables are named as + # Makes sure that rescued exceptions variables are named as # expected. # # The `PreferredName` config option takes a `String`. It represents diff --git a/lib/rubocop/cop/naming/variable_name.rb b/lib/rubocop/cop/naming/variable_name.rb index 2ab98225329..a3fc4512845 100644 --- a/lib/rubocop/cop/naming/variable_name.rb +++ b/lib/rubocop/cop/naming/variable_name.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Naming - # This cop makes sure that all variables use the configured style, + # Makes sure that all variables use the configured style, # snake_case or camelCase, for their names. # # @example EnforcedStyle: snake_case (default) diff --git a/lib/rubocop/cop/naming/variable_number.rb b/lib/rubocop/cop/naming/variable_number.rb index 02345bf7406..59b2c4a4842 100644 --- a/lib/rubocop/cop/naming/variable_number.rb +++ b/lib/rubocop/cop/naming/variable_number.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Naming - # This cop makes sure that all numbered variables use the + # Makes sure that all numbered variables use the # configured style, snake_case, normalcase, or non_integer, # for their numbering. # diff --git a/lib/rubocop/cop/security/compound_hash.rb b/lib/rubocop/cop/security/compound_hash.rb index 73583971161..4922e707a37 100644 --- a/lib/rubocop/cop/security/compound_hash.rb +++ b/lib/rubocop/cop/security/compound_hash.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Security - # This cop checks for implementations of the `hash` method which combine + # Checks for implementations of the `hash` method which combine # values using custom logic instead of delegating to `Array#hash`. # # Manually combining hashes is error prone and hard to follow, especially diff --git a/lib/rubocop/cop/security/eval.rb b/lib/rubocop/cop/security/eval.rb index 7dfad3b19c4..ba0619cd4f2 100644 --- a/lib/rubocop/cop/security/eval.rb +++ b/lib/rubocop/cop/security/eval.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Security - # This cop checks for the use of `Kernel#eval` and `Binding#eval`. + # Checks for the use of `Kernel#eval` and `Binding#eval`. # # @example # diff --git a/lib/rubocop/cop/security/json_load.rb b/lib/rubocop/cop/security/json_load.rb index 2ef42bf70c6..dddcc02879c 100644 --- a/lib/rubocop/cop/security/json_load.rb +++ b/lib/rubocop/cop/security/json_load.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Security - # This cop checks for the use of JSON class methods which have potential + # Checks for the use of JSON class methods which have potential # security issues. # # @safety diff --git a/lib/rubocop/cop/security/marshal_load.rb b/lib/rubocop/cop/security/marshal_load.rb index 07e40291a1d..cbaf1c48274 100644 --- a/lib/rubocop/cop/security/marshal_load.rb +++ b/lib/rubocop/cop/security/marshal_load.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Security - # This cop checks for the use of Marshal class methods which have + # Checks for the use of Marshal class methods which have # potential security issues leading to remote code execution when # loading from an untrusted source. # diff --git a/lib/rubocop/cop/security/open.rb b/lib/rubocop/cop/security/open.rb index 11daac19d1b..69e8b317d8c 100644 --- a/lib/rubocop/cop/security/open.rb +++ b/lib/rubocop/cop/security/open.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Security - # This cop checks for the use of `Kernel#open` and `URI.open` with dynamic + # Checks for the use of `Kernel#open` and `URI.open` with dynamic # data. # # `Kernel#open` and `URI.open` enable not only file access but also process diff --git a/lib/rubocop/cop/security/yaml_load.rb b/lib/rubocop/cop/security/yaml_load.rb index 573f617458a..94e7befe93d 100644 --- a/lib/rubocop/cop/security/yaml_load.rb +++ b/lib/rubocop/cop/security/yaml_load.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Security - # This cop checks for the use of YAML class methods which have + # Checks for the use of YAML class methods which have # potential security issues leading to remote code execution when # loading from an untrusted source. # diff --git a/lib/rubocop/cop/style/accessor_grouping.rb b/lib/rubocop/cop/style/accessor_grouping.rb index 1769551d86c..4ab07095c2e 100644 --- a/lib/rubocop/cop/style/accessor_grouping.rb +++ b/lib/rubocop/cop/style/accessor_grouping.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for grouping of accessors in `class` and `module` bodies. + # Checks for grouping of accessors in `class` and `module` bodies. # By default it enforces accessors to be placed in grouped declarations, # but it can be configured to enforce separating them in multiple declarations. # diff --git a/lib/rubocop/cop/style/alias.rb b/lib/rubocop/cop/style/alias.rb index 68720122266..7a25c626369 100644 --- a/lib/rubocop/cop/style/alias.rb +++ b/lib/rubocop/cop/style/alias.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop enforces the use of either `#alias` or `#alias_method` + # Enforces the use of either `#alias` or `#alias_method` # depending on configuration. # It also flags uses of `alias :symbol` rather than `alias bareword`. # diff --git a/lib/rubocop/cop/style/and_or.rb b/lib/rubocop/cop/style/and_or.rb index 39755d9c620..f6ee8dc6067 100644 --- a/lib/rubocop/cop/style/and_or.rb +++ b/lib/rubocop/cop/style/and_or.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for uses of `and` and `or`, and suggests using `&&` and + # Checks for uses of `and` and `or`, and suggests using `&&` and # `||` instead. It can be configured to check only in conditions or in # all contexts. # diff --git a/lib/rubocop/cop/style/array_coercion.rb b/lib/rubocop/cop/style/array_coercion.rb index ecfcb41d226..01e34a3e41c 100644 --- a/lib/rubocop/cop/style/array_coercion.rb +++ b/lib/rubocop/cop/style/array_coercion.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop enforces the use of `Array()` instead of explicit `Array` check or `[*var]`. + # Enforces the use of `Array()` instead of explicit `Array` check or `[*var]`. # # The cop is disabled by default due to safety concerns. # diff --git a/lib/rubocop/cop/style/array_join.rb b/lib/rubocop/cop/style/array_join.rb index 82cf4a33833..baf11f8baf9 100644 --- a/lib/rubocop/cop/style/array_join.rb +++ b/lib/rubocop/cop/style/array_join.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for uses of "*" as a substitute for _join_. + # Checks for uses of "*" as a substitute for _join_. # # Not all cases can reliably checked, due to Ruby's dynamic # types, so we consider only cases when the first argument is an diff --git a/lib/rubocop/cop/style/ascii_comments.rb b/lib/rubocop/cop/style/ascii_comments.rb index 892bd90500b..70c1adce676 100644 --- a/lib/rubocop/cop/style/ascii_comments.rb +++ b/lib/rubocop/cop/style/ascii_comments.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for non-ascii (non-English) characters + # Checks for non-ascii (non-English) characters # in comments. You could set an array of allowed non-ascii chars in # `AllowedChars` attribute (copyright notice "©" by default). # diff --git a/lib/rubocop/cop/style/attr.rb b/lib/rubocop/cop/style/attr.rb index be3cf817c14..576e5510dc7 100644 --- a/lib/rubocop/cop/style/attr.rb +++ b/lib/rubocop/cop/style/attr.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for uses of Module#attr. + # Checks for uses of Module#attr. # # @example # # bad - creates a single attribute accessor (deprecated in Ruby 1.9) diff --git a/lib/rubocop/cop/style/auto_resource_cleanup.rb b/lib/rubocop/cop/style/auto_resource_cleanup.rb index d9b85b5ae13..71a8a55ee98 100644 --- a/lib/rubocop/cop/style/auto_resource_cleanup.rb +++ b/lib/rubocop/cop/style/auto_resource_cleanup.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for cases when you could use a block + # Checks for cases when you could use a block # accepting version of a method that does automatic # resource cleanup. # diff --git a/lib/rubocop/cop/style/bare_percent_literals.rb b/lib/rubocop/cop/style/bare_percent_literals.rb index effe4b0bf35..c4fed78dad4 100644 --- a/lib/rubocop/cop/style/bare_percent_literals.rb +++ b/lib/rubocop/cop/style/bare_percent_literals.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks if usage of %() or %Q() matches configuration. + # Checks if usage of %() or %Q() matches configuration. # # @example EnforcedStyle: bare_percent (default) # # bad diff --git a/lib/rubocop/cop/style/bisected_attr_accessor.rb b/lib/rubocop/cop/style/bisected_attr_accessor.rb index c08d5a61d48..90134db280e 100644 --- a/lib/rubocop/cop/style/bisected_attr_accessor.rb +++ b/lib/rubocop/cop/style/bisected_attr_accessor.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for places where `attr_reader` and `attr_writer` + # Checks for places where `attr_reader` and `attr_writer` # for the same method can be combined into single `attr_accessor`. # # @example diff --git a/lib/rubocop/cop/style/block_comments.rb b/lib/rubocop/cop/style/block_comments.rb index 3c06c075b6a..2862b8a4f3b 100644 --- a/lib/rubocop/cop/style/block_comments.rb +++ b/lib/rubocop/cop/style/block_comments.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop looks for uses of block comments (=begin...=end). + # Looks for uses of block comments (=begin...=end). # # @example # # bad diff --git a/lib/rubocop/cop/style/case_equality.rb b/lib/rubocop/cop/style/case_equality.rb index cb49d05660e..a5f6cd45231 100644 --- a/lib/rubocop/cop/style/case_equality.rb +++ b/lib/rubocop/cop/style/case_equality.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for uses of the case equality operator(===). + # Checks for uses of the case equality operator(===). # # If `AllowOnConstant` option is enabled, the cop will ignore violations when the receiver of # the case equality operator is a constant. diff --git a/lib/rubocop/cop/style/case_like_if.rb b/lib/rubocop/cop/style/case_like_if.rb index 33057ba901a..030e9aad82c 100644 --- a/lib/rubocop/cop/style/case_like_if.rb +++ b/lib/rubocop/cop/style/case_like_if.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop identifies places where `if-elsif` constructions + # Identifies places where `if-elsif` constructions # can be replaced with `case-when`. # # @safety diff --git a/lib/rubocop/cop/style/class_and_module_children.rb b/lib/rubocop/cop/style/class_and_module_children.rb index 01644da92e1..334560337bb 100644 --- a/lib/rubocop/cop/style/class_and_module_children.rb +++ b/lib/rubocop/cop/style/class_and_module_children.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks the style of children definitions at classes and + # Checks the style of children definitions at classes and # modules. Basically there are two different styles: # # @safety diff --git a/lib/rubocop/cop/style/class_check.rb b/lib/rubocop/cop/style/class_check.rb index 38d5f185925..81e8fda4032 100644 --- a/lib/rubocop/cop/style/class_check.rb +++ b/lib/rubocop/cop/style/class_check.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop enforces consistent use of `Object#is_a?` or `Object#kind_of?`. + # Enforces consistent use of `Object#is_a?` or `Object#kind_of?`. # # @example EnforcedStyle: is_a? (default) # # bad diff --git a/lib/rubocop/cop/style/class_equality_comparison.rb b/lib/rubocop/cop/style/class_equality_comparison.rb index 44ab44f64d4..1a81e53ca67 100644 --- a/lib/rubocop/cop/style/class_equality_comparison.rb +++ b/lib/rubocop/cop/style/class_equality_comparison.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop enforces the use of `Object#instance_of?` instead of class comparison + # Enforces the use of `Object#instance_of?` instead of class comparison # for equality. # # @example diff --git a/lib/rubocop/cop/style/class_methods.rb b/lib/rubocop/cop/style/class_methods.rb index cd957d203bc..19c7a81af3c 100644 --- a/lib/rubocop/cop/style/class_methods.rb +++ b/lib/rubocop/cop/style/class_methods.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for uses of the class/module name instead of + # Checks for uses of the class/module name instead of # self, when defining class/module methods. # # @example diff --git a/lib/rubocop/cop/style/class_methods_definitions.rb b/lib/rubocop/cop/style/class_methods_definitions.rb index 48b642880d8..b0d157f6f93 100644 --- a/lib/rubocop/cop/style/class_methods_definitions.rb +++ b/lib/rubocop/cop/style/class_methods_definitions.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop enforces using `def self.method_name` or `class << self` to define class methods. + # Enforces using `def self.method_name` or `class << self` to define class methods. # # @example EnforcedStyle: def_self (default) # # bad diff --git a/lib/rubocop/cop/style/class_vars.rb b/lib/rubocop/cop/style/class_vars.rb index 5b32d6b7cf4..9896ed0df53 100644 --- a/lib/rubocop/cop/style/class_vars.rb +++ b/lib/rubocop/cop/style/class_vars.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for uses of class variables. Offenses + # Checks for uses of class variables. Offenses # are signaled only on assignment to class variables to # reduce the number of offenses that would be reported. # diff --git a/lib/rubocop/cop/style/collection_compact.rb b/lib/rubocop/cop/style/collection_compact.rb index 5ca0f81328d..ca732b51e84 100644 --- a/lib/rubocop/cop/style/collection_compact.rb +++ b/lib/rubocop/cop/style/collection_compact.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for places where custom logic on rejection nils from arrays + # Checks for places where custom logic on rejection nils from arrays # and hashes can be replaced with `{Array,Hash}#{compact,compact!}`. # # @safety diff --git a/lib/rubocop/cop/style/collection_methods.rb b/lib/rubocop/cop/style/collection_methods.rb index ce6bdb8bd8d..2ab49a0804a 100644 --- a/lib/rubocop/cop/style/collection_methods.rb +++ b/lib/rubocop/cop/style/collection_methods.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop enforces the use of consistent method names + # Enforces the use of consistent method names # from the Enumerable module. # # You can customize the mapping from undesired method to desired method. diff --git a/lib/rubocop/cop/style/colon_method_call.rb b/lib/rubocop/cop/style/colon_method_call.rb index d5bdc2c15ff..b41865a2f1d 100644 --- a/lib/rubocop/cop/style/colon_method_call.rb +++ b/lib/rubocop/cop/style/colon_method_call.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for methods invoked via the :: operator instead + # Checks for methods invoked via the :: operator instead # of the . operator (like FileUtils::rmdir instead of FileUtils.rmdir). # # @example diff --git a/lib/rubocop/cop/style/colon_method_definition.rb b/lib/rubocop/cop/style/colon_method_definition.rb index 84efc8a1e08..c736dcb0524 100644 --- a/lib/rubocop/cop/style/colon_method_definition.rb +++ b/lib/rubocop/cop/style/colon_method_definition.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for class methods that are defined using the `::` + # Checks for class methods that are defined using the `::` # operator instead of the `.` operator. # # @example diff --git a/lib/rubocop/cop/style/combinable_loops.rb b/lib/rubocop/cop/style/combinable_loops.rb index 1079f2add9c..c29529a122e 100644 --- a/lib/rubocop/cop/style/combinable_loops.rb +++ b/lib/rubocop/cop/style/combinable_loops.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for places where multiple consecutive loops over the same data + # Checks for places where multiple consecutive loops over the same data # can be combined into a single loop. It is very likely that combining them # will make the code more efficient and more concise. # diff --git a/lib/rubocop/cop/style/command_literal.rb b/lib/rubocop/cop/style/command_literal.rb index 18177d67c03..197e38efe96 100644 --- a/lib/rubocop/cop/style/command_literal.rb +++ b/lib/rubocop/cop/style/command_literal.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop enforces using `` or %x around command literals. + # Enforces using `` or %x around command literals. # # @example EnforcedStyle: backticks (default) # # bad diff --git a/lib/rubocop/cop/style/comment_annotation.rb b/lib/rubocop/cop/style/comment_annotation.rb index 100f2566e5d..762824f1f82 100644 --- a/lib/rubocop/cop/style/comment_annotation.rb +++ b/lib/rubocop/cop/style/comment_annotation.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks that comment annotation keywords are written according + # Checks that comment annotation keywords are written according # to guidelines. # # Annotation keywords can be specified by overriding the cop's `Keywords` diff --git a/lib/rubocop/cop/style/commented_keyword.rb b/lib/rubocop/cop/style/commented_keyword.rb index ace48eedc92..cbfabae71f4 100644 --- a/lib/rubocop/cop/style/commented_keyword.rb +++ b/lib/rubocop/cop/style/commented_keyword.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for comments put on the same line as some keywords. + # Checks for comments put on the same line as some keywords. # These keywords are: `class`, `module`, `def`, `begin`, `end`. # # Note that some comments diff --git a/lib/rubocop/cop/style/constant_visibility.rb b/lib/rubocop/cop/style/constant_visibility.rb index d899e897f1b..8bf02032672 100644 --- a/lib/rubocop/cop/style/constant_visibility.rb +++ b/lib/rubocop/cop/style/constant_visibility.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks that constants defined in classes and modules have + # Checks that constants defined in classes and modules have # an explicit visibility declaration. By default, Ruby makes all class- # and module constants public, which litters the public API of the # class or module. Explicitly declaring a visibility makes intent more diff --git a/lib/rubocop/cop/style/date_time.rb b/lib/rubocop/cop/style/date_time.rb index 62a26f89863..5cc8c924f62 100644 --- a/lib/rubocop/cop/style/date_time.rb +++ b/lib/rubocop/cop/style/date_time.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for consistent usage of the `DateTime` class over the + # Checks for consistent usage of the `DateTime` class over the # `Time` class. This cop is disabled by default since these classes, # although highly overlapping, have particularities that make them not # replaceable in certain situations when dealing with multiple timezones diff --git a/lib/rubocop/cop/style/def_with_parentheses.rb b/lib/rubocop/cop/style/def_with_parentheses.rb index 0f502b63cd3..bca638fdd56 100644 --- a/lib/rubocop/cop/style/def_with_parentheses.rb +++ b/lib/rubocop/cop/style/def_with_parentheses.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for parentheses in the definition of a method, + # Checks for parentheses in the definition of a method, # that does not take any arguments. Both instance and # class/singleton methods are checked. # diff --git a/lib/rubocop/cop/style/dir.rb b/lib/rubocop/cop/style/dir.rb index 631b259930f..0432d8af4f2 100644 --- a/lib/rubocop/cop/style/dir.rb +++ b/lib/rubocop/cop/style/dir.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for places where the `#__dir__` method can replace more + # Checks for places where the `#__dir__` method can replace more # complex constructs to retrieve a canonicalized absolute path to the # current file. # diff --git a/lib/rubocop/cop/style/documentation.rb b/lib/rubocop/cop/style/documentation.rb index 1dd2fc7405d..1cea82e184f 100644 --- a/lib/rubocop/cop/style/documentation.rb +++ b/lib/rubocop/cop/style/documentation.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for missing top-level documentation of classes and + # Checks for missing top-level documentation of classes and # modules. Classes with no body are exempt from the check and so are # namespace modules - modules that have nothing in their bodies except # classes, other modules, constant definitions or constant visibility diff --git a/lib/rubocop/cop/style/documentation_method.rb b/lib/rubocop/cop/style/documentation_method.rb index 5f0bd46d7bc..67eb7ef7a26 100644 --- a/lib/rubocop/cop/style/documentation_method.rb +++ b/lib/rubocop/cop/style/documentation_method.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for missing documentation comment for public methods. + # Checks for missing documentation comment for public methods. # It can optionally be configured to also require documentation for # non-public methods. # diff --git a/lib/rubocop/cop/style/double_negation.rb b/lib/rubocop/cop/style/double_negation.rb index a302cb03a6b..4e6c52d54c7 100644 --- a/lib/rubocop/cop/style/double_negation.rb +++ b/lib/rubocop/cop/style/double_negation.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for uses of double negation (`!!`) to convert something to a boolean value. + # Checks for uses of double negation (`!!`) to convert something to a boolean value. # # When using `EnforcedStyle: allowed_in_returns`, allow double negation in contexts # that use boolean as a return value. When using `EnforcedStyle: forbidden`, double negation diff --git a/lib/rubocop/cop/style/each_for_simple_loop.rb b/lib/rubocop/cop/style/each_for_simple_loop.rb index e52a37282e3..1d3e13d9647 100644 --- a/lib/rubocop/cop/style/each_for_simple_loop.rb +++ b/lib/rubocop/cop/style/each_for_simple_loop.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for loops which iterate a constant number of times, + # Checks for loops which iterate a constant number of times, # using a Range literal and `#each`. This can be done more readably using # `Integer#times`. # diff --git a/lib/rubocop/cop/style/each_with_object.rb b/lib/rubocop/cop/style/each_with_object.rb index 0464e0b14f9..77e0abd79cd 100644 --- a/lib/rubocop/cop/style/each_with_object.rb +++ b/lib/rubocop/cop/style/each_with_object.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop looks for inject / reduce calls where the passed in object is + # Looks for inject / reduce calls where the passed in object is # returned at the end and so could be replaced by each_with_object without # the need to return the object at the end. # diff --git a/lib/rubocop/cop/style/empty_block_parameter.rb b/lib/rubocop/cop/style/empty_block_parameter.rb index d947cd0a3cf..2222cdd1393 100644 --- a/lib/rubocop/cop/style/empty_block_parameter.rb +++ b/lib/rubocop/cop/style/empty_block_parameter.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for pipes for empty block parameters. Pipes for empty + # Checks for pipes for empty block parameters. Pipes for empty # block parameters do not cause syntax errors, but they are redundant. # # @example diff --git a/lib/rubocop/cop/style/empty_case_condition.rb b/lib/rubocop/cop/style/empty_case_condition.rb index e9b23f612af..88e1f3a5a46 100644 --- a/lib/rubocop/cop/style/empty_case_condition.rb +++ b/lib/rubocop/cop/style/empty_case_condition.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for case statements with an empty condition. + # Checks for case statements with an empty condition. # # @example # diff --git a/lib/rubocop/cop/style/empty_lambda_parameter.rb b/lib/rubocop/cop/style/empty_lambda_parameter.rb index 713fcae8745..cb2bc219935 100644 --- a/lib/rubocop/cop/style/empty_lambda_parameter.rb +++ b/lib/rubocop/cop/style/empty_lambda_parameter.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for parentheses for empty lambda parameters. Parentheses + # Checks for parentheses for empty lambda parameters. Parentheses # for empty lambda parameters do not cause syntax errors, but they are # redundant. # diff --git a/lib/rubocop/cop/style/empty_literal.rb b/lib/rubocop/cop/style/empty_literal.rb index 7b4d3dfae3a..e9882c2e442 100644 --- a/lib/rubocop/cop/style/empty_literal.rb +++ b/lib/rubocop/cop/style/empty_literal.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for the use of a method, the result of which + # Checks for the use of a method, the result of which # would be a literal, like an empty array, hash, or string. # # @example diff --git a/lib/rubocop/cop/style/empty_method.rb b/lib/rubocop/cop/style/empty_method.rb index dc437cc693d..c805881bf0d 100644 --- a/lib/rubocop/cop/style/empty_method.rb +++ b/lib/rubocop/cop/style/empty_method.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for the formatting of empty method definitions. + # Checks for the formatting of empty method definitions. # By default it enforces empty method definitions to go on a single # line (compact style), but it can be configured to enforce the `end` # to go on its own line (expanded style). diff --git a/lib/rubocop/cop/style/encoding.rb b/lib/rubocop/cop/style/encoding.rb index 5dceabf98b6..8d530516ade 100644 --- a/lib/rubocop/cop/style/encoding.rb +++ b/lib/rubocop/cop/style/encoding.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks ensures source files have no utf-8 encoding comments. + # Checks ensures source files have no utf-8 encoding comments. # @example # # bad # # encoding: UTF-8 diff --git a/lib/rubocop/cop/style/end_block.rb b/lib/rubocop/cop/style/end_block.rb index 71a4ee32af0..28c533be9f4 100644 --- a/lib/rubocop/cop/style/end_block.rb +++ b/lib/rubocop/cop/style/end_block.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for END blocks. + # Checks for END blocks. # # @example # # bad diff --git a/lib/rubocop/cop/style/endless_method.rb b/lib/rubocop/cop/style/endless_method.rb index be42efdc4f5..cac1f205319 100644 --- a/lib/rubocop/cop/style/endless_method.rb +++ b/lib/rubocop/cop/style/endless_method.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for endless methods. + # Checks for endless methods. # # It can enforce either the use of endless methods definitions # for single-lined method bodies, or disallow endless methods. diff --git a/lib/rubocop/cop/style/env_home.rb b/lib/rubocop/cop/style/env_home.rb index d75888b8a81..c9eb5c970d5 100644 --- a/lib/rubocop/cop/style/env_home.rb +++ b/lib/rubocop/cop/style/env_home.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for consistent usage of `ENV['HOME']`. If `nil` is used as + # Checks for consistent usage of `ENV['HOME']`. If `nil` is used as # the second argument of `ENV.fetch`, it is treated as a bad case like `ENV[]`. # # @safety diff --git a/lib/rubocop/cop/style/eval_with_location.rb b/lib/rubocop/cop/style/eval_with_location.rb index 2f9ff67762b..b891107a36c 100644 --- a/lib/rubocop/cop/style/eval_with_location.rb +++ b/lib/rubocop/cop/style/eval_with_location.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop ensures that eval methods (`eval`, `instance_eval`, `class_eval` + # Ensures that eval methods (`eval`, `instance_eval`, `class_eval` # and `module_eval`) are given filename and line number values (`__FILE__` # and `__LINE__`). This data is used to ensure that any errors raised # within the evaluated code will be given the correct identification diff --git a/lib/rubocop/cop/style/even_odd.rb b/lib/rubocop/cop/style/even_odd.rb index 8df6582d220..514c530d01a 100644 --- a/lib/rubocop/cop/style/even_odd.rb +++ b/lib/rubocop/cop/style/even_odd.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for places where `Integer#even?` or `Integer#odd?` + # Checks for places where `Integer#even?` or `Integer#odd?` # can be used. # # @example diff --git a/lib/rubocop/cop/style/expand_path_arguments.rb b/lib/rubocop/cop/style/expand_path_arguments.rb index 5c7eba40508..2f36cd7bd85 100644 --- a/lib/rubocop/cop/style/expand_path_arguments.rb +++ b/lib/rubocop/cop/style/expand_path_arguments.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for use of the `File.expand_path` arguments. + # Checks for use of the `File.expand_path` arguments. # Likewise, it also checks for the `Pathname.new` argument. # # Contrastive bad case and good case are alternately shown in diff --git a/lib/rubocop/cop/style/explicit_block_argument.rb b/lib/rubocop/cop/style/explicit_block_argument.rb index 366d61a7eff..25bec7d3ffc 100644 --- a/lib/rubocop/cop/style/explicit_block_argument.rb +++ b/lib/rubocop/cop/style/explicit_block_argument.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop enforces the use of explicit block argument to avoid writing + # Enforces the use of explicit block argument to avoid writing # block literal that just passes its arguments to another block. # # NOTE: This cop only registers an offense if the block args match the diff --git a/lib/rubocop/cop/style/exponential_notation.rb b/lib/rubocop/cop/style/exponential_notation.rb index 7030e16662e..93219a980e1 100644 --- a/lib/rubocop/cop/style/exponential_notation.rb +++ b/lib/rubocop/cop/style/exponential_notation.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop enforces consistency when using exponential notation + # Enforces consistency when using exponential notation # for numbers in the code (eg 1.2e4). Different styles are supported: # # * `scientific` which enforces a mantissa between 1 (inclusive) and 10 (exclusive). diff --git a/lib/rubocop/cop/style/fetch_env_var.rb b/lib/rubocop/cop/style/fetch_env_var.rb index a7a3db5e731..85c5f7e0a1d 100644 --- a/lib/rubocop/cop/style/fetch_env_var.rb +++ b/lib/rubocop/cop/style/fetch_env_var.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop suggests `ENV.fetch` for the replacement of `ENV[]`. + # Suggests `ENV.fetch` for the replacement of `ENV[]`. # `ENV[]` silently fails and returns `nil` when the environment variable is unset, # which may cause unexpected behaviors when the developer forgets to set it. # On the other hand, `ENV.fetch` raises KeyError or returns the explicitly diff --git a/lib/rubocop/cop/style/float_division.rb b/lib/rubocop/cop/style/float_division.rb index 7297ccffc1e..0f33d4a9c88 100644 --- a/lib/rubocop/cop/style/float_division.rb +++ b/lib/rubocop/cop/style/float_division.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for division with integers coerced to floats. + # Checks for division with integers coerced to floats. # It is recommended to either always use `fdiv` or coerce one side only. # This cop also provides other options for code consistency. # diff --git a/lib/rubocop/cop/style/for.rb b/lib/rubocop/cop/style/for.rb index d9d67423dc3..3bf47e9fc46 100644 --- a/lib/rubocop/cop/style/for.rb +++ b/lib/rubocop/cop/style/for.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop looks for uses of the `for` keyword or `each` method. The + # Looks for uses of the `for` keyword or `each` method. The # preferred alternative is set in the EnforcedStyle configuration # parameter. An `each` call with a block on a single line is always # allowed. diff --git a/lib/rubocop/cop/style/format_string.rb b/lib/rubocop/cop/style/format_string.rb index b607e8a722e..2ec0a578df4 100644 --- a/lib/rubocop/cop/style/format_string.rb +++ b/lib/rubocop/cop/style/format_string.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop enforces the use of a single string formatting utility. + # Enforces the use of a single string formatting utility. # Valid options include Kernel#format, Kernel#sprintf and String#%. # # The detection of String#% cannot be implemented in a reliable diff --git a/lib/rubocop/cop/style/frozen_string_literal_comment.rb b/lib/rubocop/cop/style/frozen_string_literal_comment.rb index 6d12b5c46e4..62a9b76e42c 100644 --- a/lib/rubocop/cop/style/frozen_string_literal_comment.rb +++ b/lib/rubocop/cop/style/frozen_string_literal_comment.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop is designed to help you transition from mutable string literals + # Helps you transition from mutable string literals # to frozen string literals. # It will add the `# frozen_string_literal: true` magic comment to the top # of files to enable frozen string literals. Frozen string literals may be diff --git a/lib/rubocop/cop/style/global_std_stream.rb b/lib/rubocop/cop/style/global_std_stream.rb index 7631a69f341..0df658cc831 100644 --- a/lib/rubocop/cop/style/global_std_stream.rb +++ b/lib/rubocop/cop/style/global_std_stream.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop enforces the use of `$stdout/$stderr/$stdin` instead of `STDOUT/STDERR/STDIN`. + # Enforces the use of `$stdout/$stderr/$stdin` instead of `STDOUT/STDERR/STDIN`. # `STDOUT/STDERR/STDIN` are constants, and while you can actually # reassign (possibly to redirect some stream) constants in Ruby, you'll get # an interpreter warning if you do so. diff --git a/lib/rubocop/cop/style/global_vars.rb b/lib/rubocop/cop/style/global_vars.rb index 6c5f7c0d04f..553f3dec837 100644 --- a/lib/rubocop/cop/style/global_vars.rb +++ b/lib/rubocop/cop/style/global_vars.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop looks for uses of global variables. + # Looks for uses of global variables. # It does not report offenses for built-in global variables. # Built-in global variables are allowed by default. Additionally # users can allow additional variables via the AllowedVariables option. diff --git a/lib/rubocop/cop/style/hash_conversion.rb b/lib/rubocop/cop/style/hash_conversion.rb index 23cb00d22cf..866d53c825e 100644 --- a/lib/rubocop/cop/style/hash_conversion.rb +++ b/lib/rubocop/cop/style/hash_conversion.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks the usage of pre-2.1 `Hash[args]` method of converting enumerables and + # Checks the usage of pre-2.1 `Hash[args]` method of converting enumerables and # sequences of values to hashes. # # Correction code from splat argument (`Hash[*ary]`) is not simply determined. For example, diff --git a/lib/rubocop/cop/style/hash_each_methods.rb b/lib/rubocop/cop/style/hash_each_methods.rb index 457c63cdf53..c37e4941d67 100644 --- a/lib/rubocop/cop/style/hash_each_methods.rb +++ b/lib/rubocop/cop/style/hash_each_methods.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for uses of `each_key` and `each_value` Hash methods. + # Checks for uses of `each_key` and `each_value` Hash methods. # # NOTE: If you have an array of two-element arrays, you can put # parentheses around the block arguments to indicate that you're not diff --git a/lib/rubocop/cop/style/hash_except.rb b/lib/rubocop/cop/style/hash_except.rb index 8bbdbe21d32..6e764bf5913 100644 --- a/lib/rubocop/cop/style/hash_except.rb +++ b/lib/rubocop/cop/style/hash_except.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for usages of `Hash#reject`, `Hash#select`, and `Hash#filter` methods + # Checks for usages of `Hash#reject`, `Hash#select`, and `Hash#filter` methods # that can be replaced with `Hash#except` method. # # This cop should only be enabled on Ruby version 3.0 or higher. diff --git a/lib/rubocop/cop/style/hash_like_case.rb b/lib/rubocop/cop/style/hash_like_case.rb index 59fb7d97f95..45bdfc3331a 100644 --- a/lib/rubocop/cop/style/hash_like_case.rb +++ b/lib/rubocop/cop/style/hash_like_case.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for places where `case-when` represents a simple 1:1 + # Checks for places where `case-when` represents a simple 1:1 # mapping and can be replaced with a hash lookup. # # @example MinBranchesCount: 3 (default) diff --git a/lib/rubocop/cop/style/hash_syntax.rb b/lib/rubocop/cop/style/hash_syntax.rb index c5e9b5cf060..850cd18d498 100644 --- a/lib/rubocop/cop/style/hash_syntax.rb +++ b/lib/rubocop/cop/style/hash_syntax.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks hash literal syntax. + # Checks hash literal syntax. # # It can enforce either the use of the class hash rocket syntax or # the use of the newer Ruby 1.9 syntax (when applicable). diff --git a/lib/rubocop/cop/style/hash_transform_keys.rb b/lib/rubocop/cop/style/hash_transform_keys.rb index 5c4a99c3497..0cac133ca44 100644 --- a/lib/rubocop/cop/style/hash_transform_keys.rb +++ b/lib/rubocop/cop/style/hash_transform_keys.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop looks for uses of `_.each_with_object({}) {...}`, + # Looks for uses of `_.each_with_object({}) {...}`, # `_.map {...}.to_h`, and `Hash[_.map {...}]` that are actually just # transforming the keys of a hash, and tries to use a simpler & faster # call to `transform_keys` instead. diff --git a/lib/rubocop/cop/style/hash_transform_values.rb b/lib/rubocop/cop/style/hash_transform_values.rb index a6bf0d2e7f4..3d135e09cd7 100644 --- a/lib/rubocop/cop/style/hash_transform_values.rb +++ b/lib/rubocop/cop/style/hash_transform_values.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop looks for uses of `_.each_with_object({}) {...}`, + # Looks for uses of `_.each_with_object({}) {...}`, # `_.map {...}.to_h`, and `Hash[_.map {...}]` that are actually just # transforming the values of a hash, and tries to use a simpler & faster # call to `transform_values` instead. diff --git a/lib/rubocop/cop/style/identical_conditional_branches.rb b/lib/rubocop/cop/style/identical_conditional_branches.rb index 9851684f457..2b3df3db43f 100644 --- a/lib/rubocop/cop/style/identical_conditional_branches.rb +++ b/lib/rubocop/cop/style/identical_conditional_branches.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for identical expressions at the beginning or end of + # Checks for identical expressions at the beginning or end of # each branch of a conditional expression. Such expressions should normally # be placed outside the conditional expression - before or after it. # diff --git a/lib/rubocop/cop/style/if_with_boolean_literal_branches.rb b/lib/rubocop/cop/style/if_with_boolean_literal_branches.rb index 3ca5a7cc154..377609c14d8 100644 --- a/lib/rubocop/cop/style/if_with_boolean_literal_branches.rb +++ b/lib/rubocop/cop/style/if_with_boolean_literal_branches.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for redundant `if` with boolean literal branches. + # Checks for redundant `if` with boolean literal branches. # It checks only conditions to return boolean value (`true` or `false`) for safe detection. # The conditions to be checked are comparison methods, predicate methods, and double negative. # diff --git a/lib/rubocop/cop/style/implicit_runtime_error.rb b/lib/rubocop/cop/style/implicit_runtime_error.rb index ebea004c36e..fbfcf4a3f40 100644 --- a/lib/rubocop/cop/style/implicit_runtime_error.rb +++ b/lib/rubocop/cop/style/implicit_runtime_error.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for `raise` or `fail` statements which do not specify an + # Checks for `raise` or `fail` statements which do not specify an # explicit exception class. (This raises a `RuntimeError`. Some projects # might prefer to use exception classes which more precisely identify the # nature of the error.) diff --git a/lib/rubocop/cop/style/in_pattern_then.rb b/lib/rubocop/cop/style/in_pattern_then.rb index 534dc77e8a1..b1dd44af3be 100644 --- a/lib/rubocop/cop/style/in_pattern_then.rb +++ b/lib/rubocop/cop/style/in_pattern_then.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for `in;` uses in `case` expressions. + # Checks for `in;` uses in `case` expressions. # # @example # # bad diff --git a/lib/rubocop/cop/style/inline_comment.rb b/lib/rubocop/cop/style/inline_comment.rb index ecdee0b6771..a5432bed9d9 100644 --- a/lib/rubocop/cop/style/inline_comment.rb +++ b/lib/rubocop/cop/style/inline_comment.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for trailing inline comments. + # Checks for trailing inline comments. # # @example # diff --git a/lib/rubocop/cop/style/inverse_methods.rb b/lib/rubocop/cop/style/inverse_methods.rb index 45c69c2ff99..83c6d92085a 100644 --- a/lib/rubocop/cop/style/inverse_methods.rb +++ b/lib/rubocop/cop/style/inverse_methods.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop check for usages of not (`not` or `!`) called on a method + # Check for usages of not (`not` or `!`) called on a method # when an inverse of that method can be used instead. # # Methods that can be inverted by a not (`not` or `!`) should be defined diff --git a/lib/rubocop/cop/style/ip_addresses.rb b/lib/rubocop/cop/style/ip_addresses.rb index c7dcbabc6d1..6c827532f12 100644 --- a/lib/rubocop/cop/style/ip_addresses.rb +++ b/lib/rubocop/cop/style/ip_addresses.rb @@ -5,7 +5,7 @@ module RuboCop module Cop module Style - # This cop checks for hardcoded IP addresses, which can make code + # Checks for hardcoded IP addresses, which can make code # brittle. IP addresses are likely to need to be changed when code # is deployed to a different server or environment, which may break # a deployment if forgotten. Prefer setting IP addresses in ENV or diff --git a/lib/rubocop/cop/style/keyword_parameters_order.rb b/lib/rubocop/cop/style/keyword_parameters_order.rb index ef65db11a19..2106401b1b4 100644 --- a/lib/rubocop/cop/style/keyword_parameters_order.rb +++ b/lib/rubocop/cop/style/keyword_parameters_order.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop enforces that optional keyword parameters are placed at the + # Enforces that optional keyword parameters are placed at the # end of the parameters list. # # This improves readability, because when looking through the source, diff --git a/lib/rubocop/cop/style/lambda.rb b/lib/rubocop/cop/style/lambda.rb index 6c7c18dcd85..7f4e1474120 100644 --- a/lib/rubocop/cop/style/lambda.rb +++ b/lib/rubocop/cop/style/lambda.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop (by default) checks for uses of the lambda literal syntax for + # (by default) checks for uses of the lambda literal syntax for # single line lambdas, and the method call syntax for multiline lambdas. # It is configurable to enforce one of the styles for both single line # and multiline lambdas as well. diff --git a/lib/rubocop/cop/style/lambda_call.rb b/lib/rubocop/cop/style/lambda_call.rb index 0f0a6adef64..81abf811c94 100644 --- a/lib/rubocop/cop/style/lambda_call.rb +++ b/lib/rubocop/cop/style/lambda_call.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for use of the lambda.(args) syntax. + # Checks for use of the lambda.(args) syntax. # # @example EnforcedStyle: call (default) # # bad diff --git a/lib/rubocop/cop/style/line_end_concatenation.rb b/lib/rubocop/cop/style/line_end_concatenation.rb index f33fb554fea..c94cfc0fc82 100644 --- a/lib/rubocop/cop/style/line_end_concatenation.rb +++ b/lib/rubocop/cop/style/line_end_concatenation.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for string literal concatenation at + # Checks for string literal concatenation at # the end of a line. # # @safety diff --git a/lib/rubocop/cop/style/map_to_hash.rb b/lib/rubocop/cop/style/map_to_hash.rb index e5a2605d1f0..80c5efe9859 100644 --- a/lib/rubocop/cop/style/map_to_hash.rb +++ b/lib/rubocop/cop/style/map_to_hash.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop looks for uses of `map.to_h` or `collect.to_h` that could be + # Looks for uses of `map.to_h` or `collect.to_h` that could be # written with just `to_h` in Ruby >= 2.6. # # NOTE: `Style/HashTransformKeys` and `Style/HashTransformValues` will diff --git a/lib/rubocop/cop/style/method_call_with_args_parentheses.rb b/lib/rubocop/cop/style/method_call_with_args_parentheses.rb index fbe9582b9fe..ccf87d7bda3 100644 --- a/lib/rubocop/cop/style/method_call_with_args_parentheses.rb +++ b/lib/rubocop/cop/style/method_call_with_args_parentheses.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop enforces the presence (default) or absence of parentheses in + # Enforces the presence (default) or absence of parentheses in # method calls containing parameters. # # In the default style (require_parentheses), macro methods are ignored. diff --git a/lib/rubocop/cop/style/method_call_without_args_parentheses.rb b/lib/rubocop/cop/style/method_call_without_args_parentheses.rb index 4306a437889..2c3bce22d58 100644 --- a/lib/rubocop/cop/style/method_call_without_args_parentheses.rb +++ b/lib/rubocop/cop/style/method_call_without_args_parentheses.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for unwanted parentheses in parameterless method calls. + # Checks for unwanted parentheses in parameterless method calls. # # @example # # bad diff --git a/lib/rubocop/cop/style/method_called_on_do_end_block.rb b/lib/rubocop/cop/style/method_called_on_do_end_block.rb index 357ba50af1f..b58adc8f195 100644 --- a/lib/rubocop/cop/style/method_called_on_do_end_block.rb +++ b/lib/rubocop/cop/style/method_called_on_do_end_block.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for methods called on a do...end block. The point of + # Checks for methods called on a do...end block. The point of # this check is that it's easy to miss the call tacked on to the block # when reading code. # diff --git a/lib/rubocop/cop/style/method_def_parentheses.rb b/lib/rubocop/cop/style/method_def_parentheses.rb index 7955f9a0641..16ad63e8f38 100644 --- a/lib/rubocop/cop/style/method_def_parentheses.rb +++ b/lib/rubocop/cop/style/method_def_parentheses.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for parentheses around the arguments in method + # Checks for parentheses around the arguments in method # definitions. Both instance and class/singleton methods are checked. # # Regardless of style, parentheses are necessary for: diff --git a/lib/rubocop/cop/style/min_max.rb b/lib/rubocop/cop/style/min_max.rb index b2adb806902..ba09ee9d0cb 100644 --- a/lib/rubocop/cop/style/min_max.rb +++ b/lib/rubocop/cop/style/min_max.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for potential uses of `Enumerable#minmax`. + # Checks for potential uses of `Enumerable#minmax`. # # @example # diff --git a/lib/rubocop/cop/style/missing_respond_to_missing.rb b/lib/rubocop/cop/style/missing_respond_to_missing.rb index d30d4c25b54..d803d91d530 100644 --- a/lib/rubocop/cop/style/missing_respond_to_missing.rb +++ b/lib/rubocop/cop/style/missing_respond_to_missing.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for the presence of `method_missing` without also + # Checks for the presence of `method_missing` without also # defining `respond_to_missing?`. # # @example diff --git a/lib/rubocop/cop/style/mixin_grouping.rb b/lib/rubocop/cop/style/mixin_grouping.rb index 1c5360f742a..aeacdf78250 100644 --- a/lib/rubocop/cop/style/mixin_grouping.rb +++ b/lib/rubocop/cop/style/mixin_grouping.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for grouping of mixins in `class` and `module` bodies. + # Checks for grouping of mixins in `class` and `module` bodies. # By default it enforces mixins to be placed in separate declarations, # but it can be configured to enforce grouping them in one declaration. # diff --git a/lib/rubocop/cop/style/mixin_usage.rb b/lib/rubocop/cop/style/mixin_usage.rb index f2db61f252e..160abfd680f 100644 --- a/lib/rubocop/cop/style/mixin_usage.rb +++ b/lib/rubocop/cop/style/mixin_usage.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks that `include`, `extend` and `prepend` statements appear + # Checks that `include`, `extend` and `prepend` statements appear # inside classes and modules, not at the top level, so as to not affect # the behavior of `Object`. # diff --git a/lib/rubocop/cop/style/module_function.rb b/lib/rubocop/cop/style/module_function.rb index 228dc574bfc..68cfb970124 100644 --- a/lib/rubocop/cop/style/module_function.rb +++ b/lib/rubocop/cop/style/module_function.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for use of `extend self` or `module_function` in a + # Checks for use of `extend self` or `module_function` in a # module. # # Supported styles are: module_function, extend_self, forbidden. `forbidden` diff --git a/lib/rubocop/cop/style/multiline_block_chain.rb b/lib/rubocop/cop/style/multiline_block_chain.rb index 49885e7e149..8634465366f 100644 --- a/lib/rubocop/cop/style/multiline_block_chain.rb +++ b/lib/rubocop/cop/style/multiline_block_chain.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for chaining of a block after another block that spans + # Checks for chaining of a block after another block that spans # multiple lines. # # @example diff --git a/lib/rubocop/cop/style/multiline_in_pattern_then.rb b/lib/rubocop/cop/style/multiline_in_pattern_then.rb index 93569b4392a..df1f5241336 100644 --- a/lib/rubocop/cop/style/multiline_in_pattern_then.rb +++ b/lib/rubocop/cop/style/multiline_in_pattern_then.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks uses of the `then` keyword in multi-line `in` statement. + # Checks uses of the `then` keyword in multi-line `in` statement. # # @example # # bad diff --git a/lib/rubocop/cop/style/multiline_memoization.rb b/lib/rubocop/cop/style/multiline_memoization.rb index c2fb7854450..6534e6dcedd 100644 --- a/lib/rubocop/cop/style/multiline_memoization.rb +++ b/lib/rubocop/cop/style/multiline_memoization.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks expressions wrapping styles for multiline memoization. + # Checks expressions wrapping styles for multiline memoization. # # @example EnforcedStyle: keyword (default) # # bad diff --git a/lib/rubocop/cop/style/multiline_method_signature.rb b/lib/rubocop/cop/style/multiline_method_signature.rb index 1f58e933742..69fe07678ee 100644 --- a/lib/rubocop/cop/style/multiline_method_signature.rb +++ b/lib/rubocop/cop/style/multiline_method_signature.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for method signatures that span multiple lines. + # Checks for method signatures that span multiple lines. # # @example # diff --git a/lib/rubocop/cop/style/multiline_ternary_operator.rb b/lib/rubocop/cop/style/multiline_ternary_operator.rb index 6c8e47a0563..bfeb1cf8de0 100644 --- a/lib/rubocop/cop/style/multiline_ternary_operator.rb +++ b/lib/rubocop/cop/style/multiline_ternary_operator.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for multi-line ternary op expressions. + # Checks for multi-line ternary op expressions. # # NOTE: `return if ... else ... end` is syntax error. If `return` is used before # multiline ternary operator expression, it will be autocorrected to single-line diff --git a/lib/rubocop/cop/style/multiline_when_then.rb b/lib/rubocop/cop/style/multiline_when_then.rb index 00639137d53..8054329ccab 100644 --- a/lib/rubocop/cop/style/multiline_when_then.rb +++ b/lib/rubocop/cop/style/multiline_when_then.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks uses of the `then` keyword + # Checks uses of the `then` keyword # in multi-line when statements. # # @example diff --git a/lib/rubocop/cop/style/multiple_comparison.rb b/lib/rubocop/cop/style/multiple_comparison.rb index 1622ca1adc4..219e1568446 100644 --- a/lib/rubocop/cop/style/multiple_comparison.rb +++ b/lib/rubocop/cop/style/multiple_comparison.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks against comparing a variable with multiple items, where + # Checks against comparing a variable with multiple items, where # `Array#include?`, `Set#include?` or a `case` could be used instead # to avoid code repetition. # It accepts comparisons of multiple method calls to avoid unnecessary method calls diff --git a/lib/rubocop/cop/style/mutable_constant.rb b/lib/rubocop/cop/style/mutable_constant.rb index 6382eb8a875..ef6f858faeb 100644 --- a/lib/rubocop/cop/style/mutable_constant.rb +++ b/lib/rubocop/cop/style/mutable_constant.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks whether some constant value isn't a + # Checks whether some constant value isn't a # mutable literal (e.g. array or hash). # # Strict mode can be used to freeze all constants, rather than diff --git a/lib/rubocop/cop/style/negated_if_else_condition.rb b/lib/rubocop/cop/style/negated_if_else_condition.rb index fb7ac62ca9b..1500902d62f 100644 --- a/lib/rubocop/cop/style/negated_if_else_condition.rb +++ b/lib/rubocop/cop/style/negated_if_else_condition.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for uses of `if-else` and ternary operators with a negated condition + # Checks for uses of `if-else` and ternary operators with a negated condition # which can be simplified by inverting condition and swapping branches. # # @example diff --git a/lib/rubocop/cop/style/nested_file_dirname.rb b/lib/rubocop/cop/style/nested_file_dirname.rb index aceb5de5031..ba3b8e5181d 100644 --- a/lib/rubocop/cop/style/nested_file_dirname.rb +++ b/lib/rubocop/cop/style/nested_file_dirname.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for nested `File.dirname`. + # Checks for nested `File.dirname`. # It replaces nested `File.dirname` with the level argument introduced in Ruby 3.1. # # @example diff --git a/lib/rubocop/cop/style/nested_modifier.rb b/lib/rubocop/cop/style/nested_modifier.rb index 904cdcdd7b6..2261b1ea1d4 100644 --- a/lib/rubocop/cop/style/nested_modifier.rb +++ b/lib/rubocop/cop/style/nested_modifier.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for nested use of if, unless, while and until in their + # Checks for nested use of if, unless, while and until in their # modifier form. # # @example diff --git a/lib/rubocop/cop/style/nested_parenthesized_calls.rb b/lib/rubocop/cop/style/nested_parenthesized_calls.rb index e0e377641d0..380ba75056b 100644 --- a/lib/rubocop/cop/style/nested_parenthesized_calls.rb +++ b/lib/rubocop/cop/style/nested_parenthesized_calls.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for unparenthesized method calls in the argument list + # Checks for unparenthesized method calls in the argument list # of a parenthesized method call. # # @example diff --git a/lib/rubocop/cop/style/nested_ternary_operator.rb b/lib/rubocop/cop/style/nested_ternary_operator.rb index 8f4fe4f0b70..01657718c43 100644 --- a/lib/rubocop/cop/style/nested_ternary_operator.rb +++ b/lib/rubocop/cop/style/nested_ternary_operator.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for nested ternary op expressions. + # Checks for nested ternary op expressions. # # @example # # bad diff --git a/lib/rubocop/cop/style/nil_comparison.rb b/lib/rubocop/cop/style/nil_comparison.rb index 728d30b0577..e8cb56464ab 100644 --- a/lib/rubocop/cop/style/nil_comparison.rb +++ b/lib/rubocop/cop/style/nil_comparison.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for comparison of something with nil using `==` and + # Checks for comparison of something with nil using `==` and # `nil?`. # # Supported styles are: predicate, comparison. diff --git a/lib/rubocop/cop/style/nil_lambda.rb b/lib/rubocop/cop/style/nil_lambda.rb index 48b923e33c0..df02a1f5630 100644 --- a/lib/rubocop/cop/style/nil_lambda.rb +++ b/lib/rubocop/cop/style/nil_lambda.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for lambdas and procs that always return nil, + # Checks for lambdas and procs that always return nil, # which can be replaced with an empty lambda or proc instead. # # @example diff --git a/lib/rubocop/cop/style/non_nil_check.rb b/lib/rubocop/cop/style/non_nil_check.rb index 6c3d68796f2..e78d64f2fee 100644 --- a/lib/rubocop/cop/style/non_nil_check.rb +++ b/lib/rubocop/cop/style/non_nil_check.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for non-nil checks, which are usually redundant. + # Checks for non-nil checks, which are usually redundant. # # With `IncludeSemanticChanges` set to `false` by default, this cop # does not report offenses for `!x.nil?` and does no changes that might diff --git a/lib/rubocop/cop/style/not.rb b/lib/rubocop/cop/style/not.rb index 278d5485b6a..71228bdd470 100644 --- a/lib/rubocop/cop/style/not.rb +++ b/lib/rubocop/cop/style/not.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for uses of the keyword `not` instead of `!`. + # Checks for uses of the keyword `not` instead of `!`. # # @example # diff --git a/lib/rubocop/cop/style/numbered_parameters.rb b/lib/rubocop/cop/style/numbered_parameters.rb index 9f13ca31747..3cf45aadb65 100644 --- a/lib/rubocop/cop/style/numbered_parameters.rb +++ b/lib/rubocop/cop/style/numbered_parameters.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for numbered parameters. + # Checks for numbered parameters. # # It can either restrict the use of numbered parameters to # single-lined blocks, or disallow completely numbered parameters. diff --git a/lib/rubocop/cop/style/numbered_parameters_limit.rb b/lib/rubocop/cop/style/numbered_parameters_limit.rb index 36c84ddc908..06a48e47efa 100644 --- a/lib/rubocop/cop/style/numbered_parameters_limit.rb +++ b/lib/rubocop/cop/style/numbered_parameters_limit.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop detects use of an excessive amount of numbered parameters in a + # Detects use of an excessive amount of numbered parameters in a # single block. Having too many numbered parameters can make code too # cryptic and hard to read. # diff --git a/lib/rubocop/cop/style/numeric_literal_prefix.rb b/lib/rubocop/cop/style/numeric_literal_prefix.rb index c882053598c..d98d1cafaf8 100644 --- a/lib/rubocop/cop/style/numeric_literal_prefix.rb +++ b/lib/rubocop/cop/style/numeric_literal_prefix.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for octal, hex, binary, and decimal literals using + # Checks for octal, hex, binary, and decimal literals using # uppercase prefixes and corrects them to lowercase prefix # or no prefix (in case of decimals). # diff --git a/lib/rubocop/cop/style/numeric_literals.rb b/lib/rubocop/cop/style/numeric_literals.rb index 276e3a2bcbf..0db9dc0b256 100644 --- a/lib/rubocop/cop/style/numeric_literals.rb +++ b/lib/rubocop/cop/style/numeric_literals.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for big numeric literals without _ between groups + # Checks for big numeric literals without _ between groups # of digits in them. # # @example diff --git a/lib/rubocop/cop/style/numeric_predicate.rb b/lib/rubocop/cop/style/numeric_predicate.rb index fcbb3d39b78..38949a2d720 100644 --- a/lib/rubocop/cop/style/numeric_predicate.rb +++ b/lib/rubocop/cop/style/numeric_predicate.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for usage of comparison operators (`==`, + # Checks for usage of comparison operators (`==`, # `>`, `<`) to test numbers as zero, positive, or negative. # These can be replaced by their respective predicate methods. # The cop can also be configured to do the reverse. diff --git a/lib/rubocop/cop/style/object_then.rb b/lib/rubocop/cop/style/object_then.rb index b36947a726a..fc09314a750 100644 --- a/lib/rubocop/cop/style/object_then.rb +++ b/lib/rubocop/cop/style/object_then.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop enforces the use of consistent method names + # Enforces the use of consistent method names # `Object#yield_self` or `Object#then`. # # @example EnforcedStyle: then (default) diff --git a/lib/rubocop/cop/style/open_struct_use.rb b/lib/rubocop/cop/style/open_struct_use.rb index e9f350e2cd8..1940d2f54be 100644 --- a/lib/rubocop/cop/style/open_struct_use.rb +++ b/lib/rubocop/cop/style/open_struct_use.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop flags uses of OpenStruct, as it is now officially discouraged + # Flags uses of OpenStruct, as it is now officially discouraged # to be used for performance, version compatibility, and potential security issues. # # @safety diff --git a/lib/rubocop/cop/style/option_hash.rb b/lib/rubocop/cop/style/option_hash.rb index 81f55fd3c5d..b55063d560d 100644 --- a/lib/rubocop/cop/style/option_hash.rb +++ b/lib/rubocop/cop/style/option_hash.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for options hashes and discourages them if the + # Checks for options hashes and discourages them if the # current Ruby version supports keyword arguments. # # @example diff --git a/lib/rubocop/cop/style/optional_arguments.rb b/lib/rubocop/cop/style/optional_arguments.rb index 62179d29993..a6fd0895109 100644 --- a/lib/rubocop/cop/style/optional_arguments.rb +++ b/lib/rubocop/cop/style/optional_arguments.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for optional arguments to methods + # Checks for optional arguments to methods # that do not come at the end of the argument list. # # @safety diff --git a/lib/rubocop/cop/style/optional_boolean_parameter.rb b/lib/rubocop/cop/style/optional_boolean_parameter.rb index 428cc2a10af..6bfa7aa3285 100644 --- a/lib/rubocop/cop/style/optional_boolean_parameter.rb +++ b/lib/rubocop/cop/style/optional_boolean_parameter.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for places where keyword arguments can be used instead of + # Checks for places where keyword arguments can be used instead of # boolean arguments when defining methods. `respond_to_missing?` method is allowed by default. # These are customizable with `AllowedMethods` option. # diff --git a/lib/rubocop/cop/style/or_assignment.rb b/lib/rubocop/cop/style/or_assignment.rb index 36e00ff3ef8..a17874fec38 100644 --- a/lib/rubocop/cop/style/or_assignment.rb +++ b/lib/rubocop/cop/style/or_assignment.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for potential usage of the `||=` operator. + # Checks for potential usage of the `||=` operator. # # @example # # bad diff --git a/lib/rubocop/cop/style/parentheses_around_condition.rb b/lib/rubocop/cop/style/parentheses_around_condition.rb index a33e4eac694..00c71d8c13f 100644 --- a/lib/rubocop/cop/style/parentheses_around_condition.rb +++ b/lib/rubocop/cop/style/parentheses_around_condition.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for the presence of superfluous parentheses around the + # Checks for the presence of superfluous parentheses around the # condition of if/unless/while/until. # # `AllowSafeAssignment` option for safe assignment. diff --git a/lib/rubocop/cop/style/percent_literal_delimiters.rb b/lib/rubocop/cop/style/percent_literal_delimiters.rb index 6ae6fe09cbd..93c9f9614f9 100644 --- a/lib/rubocop/cop/style/percent_literal_delimiters.rb +++ b/lib/rubocop/cop/style/percent_literal_delimiters.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop enforces the consistent usage of `%`-literal delimiters. + # Enforces the consistent usage of `%`-literal delimiters. # # Specify the 'default' key to set all preferred delimiters at once. You # can continue to specify individual preferred delimiters to override the diff --git a/lib/rubocop/cop/style/percent_q_literals.rb b/lib/rubocop/cop/style/percent_q_literals.rb index 464bf1559d1..0ce212723bf 100644 --- a/lib/rubocop/cop/style/percent_q_literals.rb +++ b/lib/rubocop/cop/style/percent_q_literals.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for usage of the %Q() syntax when %q() would do. + # Checks for usage of the %Q() syntax when %q() would do. # # @example EnforcedStyle: lower_case_q (default) # # The `lower_case_q` style prefers `%q` unless diff --git a/lib/rubocop/cop/style/perl_backrefs.rb b/lib/rubocop/cop/style/perl_backrefs.rb index 7fe25d3bd42..f75314465e2 100644 --- a/lib/rubocop/cop/style/perl_backrefs.rb +++ b/lib/rubocop/cop/style/perl_backrefs.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop looks for uses of Perl-style regexp match + # Looks for uses of Perl-style regexp match # backreferences and their English versions like # $1, $2, $&, &+, $MATCH, $PREMATCH, etc. # diff --git a/lib/rubocop/cop/style/preferred_hash_methods.rb b/lib/rubocop/cop/style/preferred_hash_methods.rb index 443c920af32..e53f20c78e2 100644 --- a/lib/rubocop/cop/style/preferred_hash_methods.rb +++ b/lib/rubocop/cop/style/preferred_hash_methods.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for uses of methods `Hash#has_key?` and + # Checks for uses of methods `Hash#has_key?` and # `Hash#has_value?`, and suggests using `Hash#key?` and `Hash#value?` instead. # # It is configurable to enforce the verbose method names, by using the diff --git a/lib/rubocop/cop/style/proc.rb b/lib/rubocop/cop/style/proc.rb index 325e0a283e7..02bdc65b504 100644 --- a/lib/rubocop/cop/style/proc.rb +++ b/lib/rubocop/cop/style/proc.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for uses of Proc.new where Kernel#proc + # Checks for uses of Proc.new where Kernel#proc # would be more appropriate. # # @example diff --git a/lib/rubocop/cop/style/raise_args.rb b/lib/rubocop/cop/style/raise_args.rb index 40a54876473..1fa7b91169d 100644 --- a/lib/rubocop/cop/style/raise_args.rb +++ b/lib/rubocop/cop/style/raise_args.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks the args passed to `fail` and `raise`. For exploded + # Checks the args passed to `fail` and `raise`. For exploded # style (default), it recommends passing the exception class and message # to `raise`, rather than construct an instance of the error. It will # still allow passing just a message, or the construction of an error diff --git a/lib/rubocop/cop/style/random_with_offset.rb b/lib/rubocop/cop/style/random_with_offset.rb index a8e9e58bfcf..4d3b80cf099 100644 --- a/lib/rubocop/cop/style/random_with_offset.rb +++ b/lib/rubocop/cop/style/random_with_offset.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for the use of randomly generated numbers, + # Checks for the use of randomly generated numbers, # added/subtracted with integer literals, as well as those with # Integer#succ and Integer#pred methods. Prefer using ranges instead, # as it clearly states the intentions. diff --git a/lib/rubocop/cop/style/redundant_argument.rb b/lib/rubocop/cop/style/redundant_argument.rb index 778b4ef6b85..b4833e4fd6c 100644 --- a/lib/rubocop/cop/style/redundant_argument.rb +++ b/lib/rubocop/cop/style/redundant_argument.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for a redundant argument passed to certain methods. + # Checks for a redundant argument passed to certain methods. # # NOTE: This cop is limited to methods with single parameter. # diff --git a/lib/rubocop/cop/style/redundant_assignment.rb b/lib/rubocop/cop/style/redundant_assignment.rb index 4022416d85c..ba006fead64 100644 --- a/lib/rubocop/cop/style/redundant_assignment.rb +++ b/lib/rubocop/cop/style/redundant_assignment.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for redundant assignment before returning. + # Checks for redundant assignment before returning. # # @example # # bad diff --git a/lib/rubocop/cop/style/redundant_begin.rb b/lib/rubocop/cop/style/redundant_begin.rb index 350e9bd133c..87834c7788d 100644 --- a/lib/rubocop/cop/style/redundant_begin.rb +++ b/lib/rubocop/cop/style/redundant_begin.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for redundant `begin` blocks. + # Checks for redundant `begin` blocks. # # Currently it checks for code like this: # diff --git a/lib/rubocop/cop/style/redundant_capital_w.rb b/lib/rubocop/cop/style/redundant_capital_w.rb index b6508e25aab..39ee10ddaf4 100644 --- a/lib/rubocop/cop/style/redundant_capital_w.rb +++ b/lib/rubocop/cop/style/redundant_capital_w.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for usage of the %W() syntax when %w() would do. + # Checks for usage of the %W() syntax when %w() would do. # # @example # # bad diff --git a/lib/rubocop/cop/style/redundant_condition.rb b/lib/rubocop/cop/style/redundant_condition.rb index 33f1a1cec30..f10a3558f72 100644 --- a/lib/rubocop/cop/style/redundant_condition.rb +++ b/lib/rubocop/cop/style/redundant_condition.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for unnecessary conditional expressions. + # Checks for unnecessary conditional expressions. # # @example # # bad diff --git a/lib/rubocop/cop/style/redundant_conditional.rb b/lib/rubocop/cop/style/redundant_conditional.rb index 1ca903b5013..f0ecbe433b1 100644 --- a/lib/rubocop/cop/style/redundant_conditional.rb +++ b/lib/rubocop/cop/style/redundant_conditional.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for redundant returning of true/false in conditionals. + # Checks for redundant returning of true/false in conditionals. # # @example # # bad diff --git a/lib/rubocop/cop/style/redundant_exception.rb b/lib/rubocop/cop/style/redundant_exception.rb index 67520e66ce7..03e09f6eaa0 100644 --- a/lib/rubocop/cop/style/redundant_exception.rb +++ b/lib/rubocop/cop/style/redundant_exception.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for RuntimeError as the argument of raise/fail. + # Checks for RuntimeError as the argument of raise/fail. # # It checks for code like this: # diff --git a/lib/rubocop/cop/style/redundant_fetch_block.rb b/lib/rubocop/cop/style/redundant_fetch_block.rb index f586c1bb820..17503445188 100644 --- a/lib/rubocop/cop/style/redundant_fetch_block.rb +++ b/lib/rubocop/cop/style/redundant_fetch_block.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop identifies places where `fetch(key) { value }` + # Identifies places where `fetch(key) { value }` # can be replaced by `fetch(key, value)`. # # In such cases `fetch(key, value)` method is faster diff --git a/lib/rubocop/cop/style/redundant_file_extension_in_require.rb b/lib/rubocop/cop/style/redundant_file_extension_in_require.rb index 3f72062a09a..89c91958c57 100644 --- a/lib/rubocop/cop/style/redundant_file_extension_in_require.rb +++ b/lib/rubocop/cop/style/redundant_file_extension_in_require.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for the presence of superfluous `.rb` extension in + # Checks for the presence of superfluous `.rb` extension in # the filename provided to `require` and `require_relative`. # # Note: If the extension is omitted, Ruby tries adding '.rb', '.so', diff --git a/lib/rubocop/cop/style/redundant_freeze.rb b/lib/rubocop/cop/style/redundant_freeze.rb index f1f21006f99..d3295f1ae09 100644 --- a/lib/rubocop/cop/style/redundant_freeze.rb +++ b/lib/rubocop/cop/style/redundant_freeze.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop check for uses of `Object#freeze` on immutable objects. + # Check for uses of `Object#freeze` on immutable objects. # # NOTE: Regexp and Range literals are frozen objects since Ruby 3.0. # diff --git a/lib/rubocop/cop/style/redundant_interpolation.rb b/lib/rubocop/cop/style/redundant_interpolation.rb index b751b30d65b..44f8f8dbec3 100644 --- a/lib/rubocop/cop/style/redundant_interpolation.rb +++ b/lib/rubocop/cop/style/redundant_interpolation.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for strings that are just an interpolated expression. + # Checks for strings that are just an interpolated expression. # # @example # diff --git a/lib/rubocop/cop/style/redundant_parentheses.rb b/lib/rubocop/cop/style/redundant_parentheses.rb index 56f2351d3e7..6f2ac089b86 100644 --- a/lib/rubocop/cop/style/redundant_parentheses.rb +++ b/lib/rubocop/cop/style/redundant_parentheses.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for redundant parentheses. + # Checks for redundant parentheses. # # @example # diff --git a/lib/rubocop/cop/style/redundant_percent_q.rb b/lib/rubocop/cop/style/redundant_percent_q.rb index 9a6ed9d2097..49cbc91eab0 100644 --- a/lib/rubocop/cop/style/redundant_percent_q.rb +++ b/lib/rubocop/cop/style/redundant_percent_q.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for usage of the %q/%Q syntax when '' or "" would do. + # Checks for usage of the %q/%Q syntax when '' or "" would do. # # @example # diff --git a/lib/rubocop/cop/style/redundant_regexp_character_class.rb b/lib/rubocop/cop/style/redundant_regexp_character_class.rb index 996e2ae6615..392439f87a8 100644 --- a/lib/rubocop/cop/style/redundant_regexp_character_class.rb +++ b/lib/rubocop/cop/style/redundant_regexp_character_class.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for unnecessary single-element Regexp character classes. + # Checks for unnecessary single-element Regexp character classes. # # @example # diff --git a/lib/rubocop/cop/style/redundant_regexp_escape.rb b/lib/rubocop/cop/style/redundant_regexp_escape.rb index 8edeeb162d9..a8ba38da93a 100644 --- a/lib/rubocop/cop/style/redundant_regexp_escape.rb +++ b/lib/rubocop/cop/style/redundant_regexp_escape.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for redundant escapes inside Regexp literals. + # Checks for redundant escapes inside Regexp literals. # # @example # # bad diff --git a/lib/rubocop/cop/style/redundant_return.rb b/lib/rubocop/cop/style/redundant_return.rb index 396305de3b5..396944cac69 100644 --- a/lib/rubocop/cop/style/redundant_return.rb +++ b/lib/rubocop/cop/style/redundant_return.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for redundant `return` expressions. + # Checks for redundant `return` expressions. # # @example # # These bad cases should be extended to handle methods whose body is diff --git a/lib/rubocop/cop/style/redundant_self.rb b/lib/rubocop/cop/style/redundant_self.rb index 6772bde3508..3edfa90cf7d 100644 --- a/lib/rubocop/cop/style/redundant_self.rb +++ b/lib/rubocop/cop/style/redundant_self.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for redundant uses of `self`. + # Checks for redundant uses of `self`. # # The usage of `self` is only needed when: # diff --git a/lib/rubocop/cop/style/redundant_self_assignment.rb b/lib/rubocop/cop/style/redundant_self_assignment.rb index 5e3ab746ae8..20a816d1f80 100644 --- a/lib/rubocop/cop/style/redundant_self_assignment.rb +++ b/lib/rubocop/cop/style/redundant_self_assignment.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for places where redundant assignments are made for in place + # Checks for places where redundant assignments are made for in place # modification methods. # # @safety diff --git a/lib/rubocop/cop/style/redundant_self_assignment_branch.rb b/lib/rubocop/cop/style/redundant_self_assignment_branch.rb index 7c6b841da18..52012d57b72 100644 --- a/lib/rubocop/cop/style/redundant_self_assignment_branch.rb +++ b/lib/rubocop/cop/style/redundant_self_assignment_branch.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for places where conditional branch makes redundant self-assignment. + # Checks for places where conditional branch makes redundant self-assignment. # # It only detects local variable because it may replace state of instance variable, # class variable, and global variable that have state across methods with `nil`. diff --git a/lib/rubocop/cop/style/redundant_sort.rb b/lib/rubocop/cop/style/redundant_sort.rb index 59a1e43e491..f3e20b3bde6 100644 --- a/lib/rubocop/cop/style/redundant_sort.rb +++ b/lib/rubocop/cop/style/redundant_sort.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop is used to identify instances of sorting and then + # Identifies instances of sorting and then # taking only the first or last element. The same behavior can # be accomplished without a relatively expensive sort by using # `Enumerable#min` instead of sorting and taking the first diff --git a/lib/rubocop/cop/style/redundant_sort_by.rb b/lib/rubocop/cop/style/redundant_sort_by.rb index fa719591f5d..a746cdf3263 100644 --- a/lib/rubocop/cop/style/redundant_sort_by.rb +++ b/lib/rubocop/cop/style/redundant_sort_by.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop identifies places where `sort_by { ... }` can be replaced by + # Identifies places where `sort_by { ... }` can be replaced by # `sort`. # # @example diff --git a/lib/rubocop/cop/style/regexp_literal.rb b/lib/rubocop/cop/style/regexp_literal.rb index 107af5025e6..6d7c6dd113b 100644 --- a/lib/rubocop/cop/style/regexp_literal.rb +++ b/lib/rubocop/cop/style/regexp_literal.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop enforces using // or %r around regular expressions. + # Enforces using // or %r around regular expressions. # # @example EnforcedStyle: slashes (default) # # bad diff --git a/lib/rubocop/cop/style/rescue_modifier.rb b/lib/rubocop/cop/style/rescue_modifier.rb index 23285ad0fe7..d65fd75506d 100644 --- a/lib/rubocop/cop/style/rescue_modifier.rb +++ b/lib/rubocop/cop/style/rescue_modifier.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for uses of rescue in its modifier form. + # Checks for uses of rescue in its modifier form. # # The cop to check `rescue` in its modifier form is added for following # reasons: diff --git a/lib/rubocop/cop/style/rescue_standard_error.rb b/lib/rubocop/cop/style/rescue_standard_error.rb index 055f36d1ead..67ddedd2f06 100644 --- a/lib/rubocop/cop/style/rescue_standard_error.rb +++ b/lib/rubocop/cop/style/rescue_standard_error.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for rescuing `StandardError`. There are two supported + # Checks for rescuing `StandardError`. There are two supported # styles `implicit` and `explicit`. This cop will not register an offense # if any error other than `StandardError` is specified. # diff --git a/lib/rubocop/cop/style/return_nil.rb b/lib/rubocop/cop/style/return_nil.rb index 4ae35f545c0..18cc20ce971 100644 --- a/lib/rubocop/cop/style/return_nil.rb +++ b/lib/rubocop/cop/style/return_nil.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop enforces consistency between 'return nil' and 'return'. + # Enforces consistency between 'return nil' and 'return'. # # Supported styles are: return, return_nil. # diff --git a/lib/rubocop/cop/style/safe_navigation.rb b/lib/rubocop/cop/style/safe_navigation.rb index b2b9804fc49..476905dbffb 100644 --- a/lib/rubocop/cop/style/safe_navigation.rb +++ b/lib/rubocop/cop/style/safe_navigation.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop transforms usages of a method call safeguarded by a non `nil` + # Transforms usages of a method call safeguarded by a non `nil` # check for the variable whose method is being called to # safe navigation (`&.`). If there is a method chain, all of the methods # in the chain need to be checked for safety, and all of the methods will diff --git a/lib/rubocop/cop/style/sample.rb b/lib/rubocop/cop/style/sample.rb index 1c2189e1e87..b79d55243c2 100644 --- a/lib/rubocop/cop/style/sample.rb +++ b/lib/rubocop/cop/style/sample.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop is used to identify usages of `shuffle.first`, + # Identifies usages of `shuffle.first`, # `shuffle.last`, and `shuffle[]` and change them to use # `sample` instead. # diff --git a/lib/rubocop/cop/style/select_by_regexp.rb b/lib/rubocop/cop/style/select_by_regexp.rb index 8d624b05550..267ca889d90 100644 --- a/lib/rubocop/cop/style/select_by_regexp.rb +++ b/lib/rubocop/cop/style/select_by_regexp.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop looks for places where an subset of an Enumerable (array, + # Looks for places where an subset of an Enumerable (array, # range, set, etc.; see note below) is calculated based on a `Regexp` # match, and suggests `grep` or `grep_v` instead. # diff --git a/lib/rubocop/cop/style/self_assignment.rb b/lib/rubocop/cop/style/self_assignment.rb index 00b54a97ba8..13711e56fe3 100644 --- a/lib/rubocop/cop/style/self_assignment.rb +++ b/lib/rubocop/cop/style/self_assignment.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop enforces the use the shorthand for self-assignment. + # Enforces the use the shorthand for self-assignment. # # @example # diff --git a/lib/rubocop/cop/style/semicolon.rb b/lib/rubocop/cop/style/semicolon.rb index b6d101e98ac..b9c35836e51 100644 --- a/lib/rubocop/cop/style/semicolon.rb +++ b/lib/rubocop/cop/style/semicolon.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for multiple expressions placed on the same line. + # Checks for multiple expressions placed on the same line. # It also checks for lines terminated with a semicolon. # # This cop has `AllowAsExpressionSeparator` configuration option. diff --git a/lib/rubocop/cop/style/send.rb b/lib/rubocop/cop/style/send.rb index 46e58740eb9..fc1152d9599 100644 --- a/lib/rubocop/cop/style/send.rb +++ b/lib/rubocop/cop/style/send.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for the use of the send method. + # Checks for the use of the send method. # # @example # # bad diff --git a/lib/rubocop/cop/style/signal_exception.rb b/lib/rubocop/cop/style/signal_exception.rb index b130888d1c4..c187734e8d2 100644 --- a/lib/rubocop/cop/style/signal_exception.rb +++ b/lib/rubocop/cop/style/signal_exception.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for uses of `fail` and `raise`. + # Checks for uses of `fail` and `raise`. # # @example EnforcedStyle: only_raise (default) # # The `only_raise` style enforces the sole use of `raise`. diff --git a/lib/rubocop/cop/style/single_line_block_params.rb b/lib/rubocop/cop/style/single_line_block_params.rb index 836e66c2bed..6df4fd4ebe5 100644 --- a/lib/rubocop/cop/style/single_line_block_params.rb +++ b/lib/rubocop/cop/style/single_line_block_params.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks whether the block parameters of a single-line + # Checks whether the block parameters of a single-line # method accepting a block match the names specified via configuration. # # For instance one can configure `reduce`(`inject`) to use |a, e| as diff --git a/lib/rubocop/cop/style/single_line_methods.rb b/lib/rubocop/cop/style/single_line_methods.rb index 5df7c1d4456..a3f8c717f0e 100644 --- a/lib/rubocop/cop/style/single_line_methods.rb +++ b/lib/rubocop/cop/style/single_line_methods.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for single-line method definitions that contain a body. + # Checks for single-line method definitions that contain a body. # It will accept single-line methods with no body. # # Endless methods added in Ruby 3.0 are also accepted by this cop. diff --git a/lib/rubocop/cop/style/slicing_with_range.rb b/lib/rubocop/cop/style/slicing_with_range.rb index 31e266f3a8f..9c5b3fb0018 100644 --- a/lib/rubocop/cop/style/slicing_with_range.rb +++ b/lib/rubocop/cop/style/slicing_with_range.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks that arrays are sliced with endless ranges instead of + # Checks that arrays are sliced with endless ranges instead of # `ary[start..-1]` on Ruby 2.6+. # # @safety diff --git a/lib/rubocop/cop/style/static_class.rb b/lib/rubocop/cop/style/static_class.rb index ea2c72206f1..446b90f5f3a 100644 --- a/lib/rubocop/cop/style/static_class.rb +++ b/lib/rubocop/cop/style/static_class.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for places where classes with only class methods can be + # Checks for places where classes with only class methods can be # replaced with a module. Classes should be used only when it makes sense to create # instances out of them. # diff --git a/lib/rubocop/cop/style/stderr_puts.rb b/lib/rubocop/cop/style/stderr_puts.rb index c295c9d5ab7..4f10c82ff5e 100644 --- a/lib/rubocop/cop/style/stderr_puts.rb +++ b/lib/rubocop/cop/style/stderr_puts.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop identifies places where `$stderr.puts` can be replaced by + # Identifies places where `$stderr.puts` can be replaced by # `warn`. The latter has the advantage of easily being disabled by, # the `-W0` interpreter flag or setting `$VERBOSE` to `nil`. # diff --git a/lib/rubocop/cop/style/string_concatenation.rb b/lib/rubocop/cop/style/string_concatenation.rb index d9ff5b4b104..bb9f2af9ee9 100644 --- a/lib/rubocop/cop/style/string_concatenation.rb +++ b/lib/rubocop/cop/style/string_concatenation.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for places where string concatenation + # Checks for places where string concatenation # can be replaced with string interpolation. # # The cop can autocorrect simple cases but will skip autocorrecting diff --git a/lib/rubocop/cop/style/string_hash_keys.rb b/lib/rubocop/cop/style/string_hash_keys.rb index 7773fcbe2bd..95975db2fc5 100644 --- a/lib/rubocop/cop/style/string_hash_keys.rb +++ b/lib/rubocop/cop/style/string_hash_keys.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for the use of strings as keys in hashes. The use of + # Checks for the use of strings as keys in hashes. The use of # symbols is preferred instead. # # @safety diff --git a/lib/rubocop/cop/style/string_literals_in_interpolation.rb b/lib/rubocop/cop/style/string_literals_in_interpolation.rb index 6b01b72549e..ef14379d7f8 100644 --- a/lib/rubocop/cop/style/string_literals_in_interpolation.rb +++ b/lib/rubocop/cop/style/string_literals_in_interpolation.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks that quotes inside the string interpolation + # Checks that quotes inside the string interpolation # match the configured preference. # # @example EnforcedStyle: single_quotes (default) diff --git a/lib/rubocop/cop/style/string_methods.rb b/lib/rubocop/cop/style/string_methods.rb index 6b1d0f7d75c..816088bdd06 100644 --- a/lib/rubocop/cop/style/string_methods.rb +++ b/lib/rubocop/cop/style/string_methods.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop enforces the use of consistent method names + # Enforces the use of consistent method names # from the String class. # # @example diff --git a/lib/rubocop/cop/style/strip.rb b/lib/rubocop/cop/style/strip.rb index b560b7f4199..ff4db4b5821 100644 --- a/lib/rubocop/cop/style/strip.rb +++ b/lib/rubocop/cop/style/strip.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop identifies places where `lstrip.rstrip` can be replaced by + # Identifies places where `lstrip.rstrip` can be replaced by # `strip`. # # @example diff --git a/lib/rubocop/cop/style/struct_inheritance.rb b/lib/rubocop/cop/style/struct_inheritance.rb index b0f4ec7fa4a..f8921501615 100644 --- a/lib/rubocop/cop/style/struct_inheritance.rb +++ b/lib/rubocop/cop/style/struct_inheritance.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for inheritance from Struct.new. + # Checks for inheritance from Struct.new. # # @safety # Autocorrection is unsafe because it will change the inheritance diff --git a/lib/rubocop/cop/style/swap_values.rb b/lib/rubocop/cop/style/swap_values.rb index 1a3690d6f10..306fd45b77e 100644 --- a/lib/rubocop/cop/style/swap_values.rb +++ b/lib/rubocop/cop/style/swap_values.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop enforces the use of shorthand-style swapping of 2 variables. + # Enforces the use of shorthand-style swapping of 2 variables. # # @safety # Autocorrection is unsafe, because the temporary variable used to diff --git a/lib/rubocop/cop/style/symbol_array.rb b/lib/rubocop/cop/style/symbol_array.rb index ffdfff48aac..140bc46cab3 100644 --- a/lib/rubocop/cop/style/symbol_array.rb +++ b/lib/rubocop/cop/style/symbol_array.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop can check for array literals made up of symbols that are not + # Checks for array literals made up of symbols that are not # using the %i() syntax. # # Alternatively, it checks for symbol arrays using the %i() syntax on diff --git a/lib/rubocop/cop/style/symbol_literal.rb b/lib/rubocop/cop/style/symbol_literal.rb index 3ccf9eb4181..c75e984e8f8 100644 --- a/lib/rubocop/cop/style/symbol_literal.rb +++ b/lib/rubocop/cop/style/symbol_literal.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks symbol literal syntax. + # Checks symbol literal syntax. # # @example # diff --git a/lib/rubocop/cop/style/ternary_parentheses.rb b/lib/rubocop/cop/style/ternary_parentheses.rb index dac08bd69e3..78ee224df36 100644 --- a/lib/rubocop/cop/style/ternary_parentheses.rb +++ b/lib/rubocop/cop/style/ternary_parentheses.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for the presence of parentheses around ternary + # Checks for the presence of parentheses around ternary # conditions. It is configurable to enforce inclusion or omission of # parentheses using `EnforcedStyle`. Omission is only enforced when # removing the parentheses won't cause a different behavior. diff --git a/lib/rubocop/cop/style/trailing_body_on_class.rb b/lib/rubocop/cop/style/trailing_body_on_class.rb index 2e64d83dec7..76dc5e625fd 100644 --- a/lib/rubocop/cop/style/trailing_body_on_class.rb +++ b/lib/rubocop/cop/style/trailing_body_on_class.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for trailing code after the class definition. + # Checks for trailing code after the class definition. # # @example # # bad diff --git a/lib/rubocop/cop/style/trailing_body_on_method_definition.rb b/lib/rubocop/cop/style/trailing_body_on_method_definition.rb index 50581399f00..132b5c51870 100644 --- a/lib/rubocop/cop/style/trailing_body_on_method_definition.rb +++ b/lib/rubocop/cop/style/trailing_body_on_method_definition.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for trailing code after the method definition. + # Checks for trailing code after the method definition. # # NOTE: It always accepts endless method definitions that are basically on the same line. # diff --git a/lib/rubocop/cop/style/trailing_body_on_module.rb b/lib/rubocop/cop/style/trailing_body_on_module.rb index 2408014dc2a..4b6c22ec280 100644 --- a/lib/rubocop/cop/style/trailing_body_on_module.rb +++ b/lib/rubocop/cop/style/trailing_body_on_module.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for trailing code after the module definition. + # Checks for trailing code after the module definition. # # @example # # bad diff --git a/lib/rubocop/cop/style/trailing_comma_in_arguments.rb b/lib/rubocop/cop/style/trailing_comma_in_arguments.rb index d04e27f31fc..e8accad6b7e 100644 --- a/lib/rubocop/cop/style/trailing_comma_in_arguments.rb +++ b/lib/rubocop/cop/style/trailing_comma_in_arguments.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for trailing comma in argument lists. + # Checks for trailing comma in argument lists. # The supported styles are: # # * `consistent_comma`: Requires a comma after the last argument, diff --git a/lib/rubocop/cop/style/trailing_comma_in_array_literal.rb b/lib/rubocop/cop/style/trailing_comma_in_array_literal.rb index ede342954f9..4a595ab24f7 100644 --- a/lib/rubocop/cop/style/trailing_comma_in_array_literal.rb +++ b/lib/rubocop/cop/style/trailing_comma_in_array_literal.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for trailing comma in array literals. + # Checks for trailing comma in array literals. # The configuration options are: # # * `consistent_comma`: Requires a comma after the diff --git a/lib/rubocop/cop/style/trailing_comma_in_block_args.rb b/lib/rubocop/cop/style/trailing_comma_in_block_args.rb index 7a781341254..1ed5e6edce3 100644 --- a/lib/rubocop/cop/style/trailing_comma_in_block_args.rb +++ b/lib/rubocop/cop/style/trailing_comma_in_block_args.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks whether trailing commas in block arguments are + # Checks whether trailing commas in block arguments are # required. Blocks with only one argument and a trailing comma require # that comma to be present. Blocks with more than one argument never # require a trailing comma. diff --git a/lib/rubocop/cop/style/trailing_comma_in_hash_literal.rb b/lib/rubocop/cop/style/trailing_comma_in_hash_literal.rb index c69d6c7181d..d290e47f5a6 100644 --- a/lib/rubocop/cop/style/trailing_comma_in_hash_literal.rb +++ b/lib/rubocop/cop/style/trailing_comma_in_hash_literal.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for trailing comma in hash literals. + # Checks for trailing comma in hash literals. # The configuration options are: # # * `consistent_comma`: Requires a comma after the diff --git a/lib/rubocop/cop/style/trailing_method_end_statement.rb b/lib/rubocop/cop/style/trailing_method_end_statement.rb index d1818aaf734..617142b9481 100644 --- a/lib/rubocop/cop/style/trailing_method_end_statement.rb +++ b/lib/rubocop/cop/style/trailing_method_end_statement.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for trailing code after the method definition. + # Checks for trailing code after the method definition. # # @example # # bad diff --git a/lib/rubocop/cop/style/trailing_underscore_variable.rb b/lib/rubocop/cop/style/trailing_underscore_variable.rb index b037ef90ebe..074aaebe06d 100644 --- a/lib/rubocop/cop/style/trailing_underscore_variable.rb +++ b/lib/rubocop/cop/style/trailing_underscore_variable.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for extra underscores in variable assignment. + # Checks for extra underscores in variable assignment. # # @example # # bad diff --git a/lib/rubocop/cop/style/trivial_accessors.rb b/lib/rubocop/cop/style/trivial_accessors.rb index cdd83380406..ca4302e9676 100644 --- a/lib/rubocop/cop/style/trivial_accessors.rb +++ b/lib/rubocop/cop/style/trivial_accessors.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop looks for trivial reader/writer methods, that could + # Looks for trivial reader/writer methods, that could # have been created with the attr_* family of functions automatically. # # @example diff --git a/lib/rubocop/cop/style/unless_else.rb b/lib/rubocop/cop/style/unless_else.rb index a94d2206324..d4148fe1f4a 100644 --- a/lib/rubocop/cop/style/unless_else.rb +++ b/lib/rubocop/cop/style/unless_else.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop looks for `unless` expressions with `else` clauses. + # Looks for `unless` expressions with `else` clauses. # # @example # # bad diff --git a/lib/rubocop/cop/style/unless_logical_operators.rb b/lib/rubocop/cop/style/unless_logical_operators.rb index 9f4958deeea..80dbed6c82a 100644 --- a/lib/rubocop/cop/style/unless_logical_operators.rb +++ b/lib/rubocop/cop/style/unless_logical_operators.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for the use of logical operators in an `unless` condition. + # Checks for the use of logical operators in an `unless` condition. # It discourages such code, as the condition becomes more difficult # to read and understand. # diff --git a/lib/rubocop/cop/style/unpack_first.rb b/lib/rubocop/cop/style/unpack_first.rb index 73821a2ecaa..6abc7e4b6d9 100644 --- a/lib/rubocop/cop/style/unpack_first.rb +++ b/lib/rubocop/cop/style/unpack_first.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for accessing the first element of `String#unpack` + # Checks for accessing the first element of `String#unpack` # which can be replaced with the shorter method `unpack1`. # # @example diff --git a/lib/rubocop/cop/style/variable_interpolation.rb b/lib/rubocop/cop/style/variable_interpolation.rb index fc8460a5183..f9553b2d43a 100644 --- a/lib/rubocop/cop/style/variable_interpolation.rb +++ b/lib/rubocop/cop/style/variable_interpolation.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for variable interpolation (like "#@ivar"). + # Checks for variable interpolation (like "#@ivar"). # # @example # # bad diff --git a/lib/rubocop/cop/style/when_then.rb b/lib/rubocop/cop/style/when_then.rb index 5febd0a1da3..ad7cdd90489 100644 --- a/lib/rubocop/cop/style/when_then.rb +++ b/lib/rubocop/cop/style/when_then.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for `when;` uses in `case` expressions. + # Checks for `when;` uses in `case` expressions. # # @example # # bad diff --git a/lib/rubocop/cop/style/word_array.rb b/lib/rubocop/cop/style/word_array.rb index 754f5ab7b5f..2ae468ce946 100644 --- a/lib/rubocop/cop/style/word_array.rb +++ b/lib/rubocop/cop/style/word_array.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop can check for array literals made up of word-like + # Checks for array literals made up of word-like # strings, that are not using the %w() syntax. # # Alternatively, it can check for uses of the %w() syntax, in projects diff --git a/lib/rubocop/cop/style/yoda_condition.rb b/lib/rubocop/cop/style/yoda_condition.rb index b818b27d4f6..4edcc27689d 100644 --- a/lib/rubocop/cop/style/yoda_condition.rb +++ b/lib/rubocop/cop/style/yoda_condition.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop can either enforce or forbid Yoda conditions, + # Enforces or forbids Yoda conditions, # i.e. comparison operations where the order of expression is reversed. # eg. `5 == x` # diff --git a/lib/rubocop/cop/style/zero_length_predicate.rb b/lib/rubocop/cop/style/zero_length_predicate.rb index 3381545bb3d..5a9c961524c 100644 --- a/lib/rubocop/cop/style/zero_length_predicate.rb +++ b/lib/rubocop/cop/style/zero_length_predicate.rb @@ -3,7 +3,7 @@ module RuboCop module Cop module Style - # This cop checks for numeric comparisons that can be replaced + # Checks for numeric comparisons that can be replaced # by a predicate method, such as receiver.length == 0, # receiver.length > 0, receiver.length != 0, # receiver.length < 1 and receiver.size == 0 that can be