# frozen_string_literal: true

module RuboCop
  module Cop
    # Cops for the `Lint` department. The department's cops are registered for lazy loading
    # and their files are loaded on demand.
    module Lint
      extend LazyLoader

      register_cop :AmbiguousAssignment, "#{__dir__}/lint/ambiguous_assignment"
      register_cop :AmbiguousBlockAssociation, "#{__dir__}/lint/ambiguous_block_association"
      register_cop :AmbiguousOperator, "#{__dir__}/lint/ambiguous_operator"
      register_cop :AmbiguousOperatorPrecedence, "#{__dir__}/lint/ambiguous_operator_precedence"
      register_cop :AmbiguousRange, "#{__dir__}/lint/ambiguous_range"
      register_cop :AmbiguousRegexpLiteral, "#{__dir__}/lint/ambiguous_regexp_literal"
      register_cop :ArrayLiteralInRegexp, "#{__dir__}/lint/array_literal_in_regexp"
      register_cop :AssignmentInCondition, "#{__dir__}/lint/assignment_in_condition"
      register_cop :BigDecimalNew, "#{__dir__}/lint/big_decimal_new"
      register_cop :BinaryOperatorWithIdenticalOperands, "#{__dir__}/lint/binary_operator_with_identical_operands"
      register_cop :BooleanSymbol, "#{__dir__}/lint/boolean_symbol"
      register_cop :CircularArgumentReference, "#{__dir__}/lint/circular_argument_reference"
      register_cop :ConstantDefinitionInBlock, "#{__dir__}/lint/constant_definition_in_block"
      register_cop :ConstantOverwrittenInRescue, "#{__dir__}/lint/constant_overwritten_in_rescue"
      register_cop :ConstantReassignment, "#{__dir__}/lint/constant_reassignment"
      register_cop :ConstantResolution, "#{__dir__}/lint/constant_resolution"
      register_cop :CopDirectiveSyntax, "#{__dir__}/lint/cop_directive_syntax"
      register_cop :DataDefineOverride, "#{__dir__}/lint/data_define_override"
      register_cop :Debugger, "#{__dir__}/lint/debugger"
      register_cop :DeprecatedClassMethods, "#{__dir__}/lint/deprecated_class_methods"
      register_cop :DeprecatedConstants, "#{__dir__}/lint/deprecated_constants"
      register_cop :DeprecatedOpenSSLConstant, "#{__dir__}/lint/deprecated_open_ssl_constant"
      register_cop :DeprecatedReference, "#{__dir__}/lint/deprecated_reference"
      register_cop :DisjunctiveAssignmentInConstructor, "#{__dir__}/lint/disjunctive_assignment_in_constructor"
      register_cop :DuplicateBranch, "#{__dir__}/lint/duplicate_branch"
      register_cop :DuplicateCaseCondition, "#{__dir__}/lint/duplicate_case_condition"
      register_cop :DuplicateElsifCondition, "#{__dir__}/lint/duplicate_elsif_condition"
      register_cop :DuplicateHashKey, "#{__dir__}/lint/duplicate_hash_key"
      register_cop :DuplicateMagicComment, "#{__dir__}/lint/duplicate_magic_comment"
      register_cop :DuplicateMatchPattern, "#{__dir__}/lint/duplicate_match_pattern"
      register_cop :DuplicateMethods, "#{__dir__}/lint/duplicate_methods"
      register_cop :DuplicateRegexpCharacterClassElement, "#{__dir__}/lint/duplicate_regexp_character_class_element"
      register_cop :DuplicateRequire, "#{__dir__}/lint/duplicate_require"
      register_cop :DuplicateRescueException, "#{__dir__}/lint/duplicate_rescue_exception"
      register_cop :DuplicateSetElement, "#{__dir__}/lint/duplicate_set_element"
      register_cop :EachWithObjectArgument, "#{__dir__}/lint/each_with_object_argument"
      register_cop :ElseLayout, "#{__dir__}/lint/else_layout"
      register_cop :EmptyBlock, "#{__dir__}/lint/empty_block"
      register_cop :EmptyClass, "#{__dir__}/lint/empty_class"
      register_cop :EmptyConditionalBody, "#{__dir__}/lint/empty_conditional_body"
      register_cop :EmptyEnsure, "#{__dir__}/lint/empty_ensure"
      register_cop :EmptyExpression, "#{__dir__}/lint/empty_expression"
      register_cop :EmptyFile, "#{__dir__}/lint/empty_file"
      register_cop :EmptyInPattern, "#{__dir__}/lint/empty_in_pattern"
      register_cop :EmptyInterpolation, "#{__dir__}/lint/empty_interpolation"
      register_cop :EmptyWhen, "#{__dir__}/lint/empty_when"
      register_cop :EnsureReturn, "#{__dir__}/lint/ensure_return"
      register_cop :SharedMutableDefault, "#{__dir__}/lint/shared_mutable_default"
      register_cop :ErbNewArguments, "#{__dir__}/lint/erb_new_arguments"
      register_cop :FlipFlop, "#{__dir__}/lint/flip_flop"
      register_cop :FloatComparison, "#{__dir__}/lint/float_comparison"
      register_cop :FloatOutOfRange, "#{__dir__}/lint/float_out_of_range"
      register_cop :FormatParameterMismatch, "#{__dir__}/lint/format_parameter_mismatch"
      register_cop :HashCompareByIdentity, "#{__dir__}/lint/hash_compare_by_identity"
      register_cop :HashNewWithKeywordArgumentsAsDefault, "#{__dir__}/lint/hash_new_with_keyword_arguments_as_default"
      register_cop :HeredocMethodCallPosition, "#{__dir__}/lint/heredoc_method_call_position"
      register_cop :IdentityComparison, "#{__dir__}/lint/identity_comparison"
      register_cop :ImplicitStringConcatenation, "#{__dir__}/lint/implicit_string_concatenation"
      register_cop :IncompatibleIoSelectWithFiberScheduler, "#{__dir__}/lint/incompatible_io_select_with_fiber_scheduler"
      register_cop :IneffectiveAccessModifier, "#{__dir__}/lint/ineffective_access_modifier"
      register_cop :InheritException, "#{__dir__}/lint/inherit_exception"
      register_cop :InterpolationCheck, "#{__dir__}/lint/interpolation_check"
      register_cop :ItWithoutArgumentsInBlock, "#{__dir__}/lint/it_without_arguments_in_block"
      register_cop :LambdaWithoutLiteralBlock, "#{__dir__}/lint/lambda_without_literal_block"
      register_cop :LiteralAsCondition, "#{__dir__}/lint/literal_as_condition"
      register_cop :LiteralAssignmentInCondition, "#{__dir__}/lint/literal_assignment_in_condition"
      register_cop :LiteralInInterpolation, "#{__dir__}/lint/literal_in_interpolation"
      register_cop :Loop, "#{__dir__}/lint/loop"
      register_cop :MissingCopEnableDirective, "#{__dir__}/lint/missing_cop_enable_directive"
      register_cop :MissingSuper, "#{__dir__}/lint/missing_super"
      register_cop :MixedCaseRange, "#{__dir__}/lint/mixed_case_range"
      register_cop :MixedRegexpCaptureTypes, "#{__dir__}/lint/mixed_regexp_capture_types"
      register_cop :MultipleComparison, "#{__dir__}/lint/multiple_comparison"
      register_cop :NameTypo, "#{__dir__}/lint/name_typo"
      register_cop :NestedMethodDefinition, "#{__dir__}/lint/nested_method_definition"
      register_cop :NestedPercentLiteral, "#{__dir__}/lint/nested_percent_literal"
      register_cop :NextWithoutAccumulator, "#{__dir__}/lint/next_without_accumulator"
      register_cop :NoReturnInBeginEndBlocks, "#{__dir__}/lint/no_return_in_begin_end_blocks"
      register_cop :NonAtomicFileOperation, "#{__dir__}/lint/non_atomic_file_operation"
      register_cop :NonDeterministicRequireOrder, "#{__dir__}/lint/non_deterministic_require_order"
      register_cop :NonLocalExitFromIterator, "#{__dir__}/lint/non_local_exit_from_iterator"
      register_cop :NumberConversion, "#{__dir__}/lint/number_conversion"
      register_cop :NumberedParameterAssignment, "#{__dir__}/lint/numbered_parameter_assignment"
      register_cop :NumericOperationWithConstantResult, "#{__dir__}/lint/numeric_operation_with_constant_result"
      register_cop :OrAssignmentToConstant, "#{__dir__}/lint/or_assignment_to_constant"
      register_cop :OrderedMagicComments, "#{__dir__}/lint/ordered_magic_comments"
      register_cop :OutOfRangeRegexpRef, "#{__dir__}/lint/out_of_range_regexp_ref"
      register_cop :ParenthesesAsGroupedExpression, "#{__dir__}/lint/parentheses_as_grouped_expression"
      register_cop :PercentStringArray, "#{__dir__}/lint/percent_string_array"
      register_cop :PercentSymbolArray, "#{__dir__}/lint/percent_symbol_array"
      register_cop :RaiseException, "#{__dir__}/lint/raise_exception"
      register_cop :RandOne, "#{__dir__}/lint/rand_one"
      register_cop :RedundantCopDisableDirective, "#{__dir__}/lint/redundant_cop_disable_directive"
      register_cop :RedundantCopEnableDirective, "#{__dir__}/lint/redundant_cop_enable_directive"
      register_cop :RedundantDirGlobSort, "#{__dir__}/lint/redundant_dir_glob_sort"
      register_cop :RedundantRegexpQuantifiers, "#{__dir__}/lint/redundant_regexp_quantifiers"
      register_cop :RedundantRequireStatement, "#{__dir__}/lint/redundant_require_statement"
      register_cop :RedundantSafeNavigation, "#{__dir__}/lint/redundant_safe_navigation"
      register_cop :RedundantSplatExpansion, "#{__dir__}/lint/redundant_splat_expansion"
      register_cop :RedundantStringCoercion, "#{__dir__}/lint/redundant_string_coercion"
      register_cop :RedundantTypeConversion, "#{__dir__}/lint/redundant_type_conversion"
      register_cop :RedundantWithIndex, "#{__dir__}/lint/redundant_with_index"
      register_cop :RedundantWithObject, "#{__dir__}/lint/redundant_with_object"
      register_cop :RefinementImportMethods, "#{__dir__}/lint/refinement_import_methods"
      register_cop :RegexpAsCondition, "#{__dir__}/lint/regexp_as_condition"
      register_cop :RequireParentheses, "#{__dir__}/lint/require_parentheses"
      register_cop :RequireRangeParentheses, "#{__dir__}/lint/require_range_parentheses"
      register_cop :RequireRelativeSelfPath, "#{__dir__}/lint/require_relative_self_path"
      register_cop :RescueException, "#{__dir__}/lint/rescue_exception"
      register_cop :RescueType, "#{__dir__}/lint/rescue_type"
      register_cop :ReturnInVoidContext, "#{__dir__}/lint/return_in_void_context"
      register_cop :SafeNavigationConsistency, "#{__dir__}/lint/safe_navigation_consistency"
      register_cop :SafeNavigationChain, "#{__dir__}/lint/safe_navigation_chain"
      register_cop :SafeNavigationWithEmpty, "#{__dir__}/lint/safe_navigation_with_empty"
      register_cop :ScriptPermission, "#{__dir__}/lint/script_permission"
      register_cop :SelfAssignment, "#{__dir__}/lint/self_assignment"
      register_cop :SendWithMixinArgument, "#{__dir__}/lint/send_with_mixin_argument"
      register_cop :ShadowedArgument, "#{__dir__}/lint/shadowed_argument"
      register_cop :ShadowedException, "#{__dir__}/lint/shadowed_exception"
      register_cop :ShadowingOuterLocalVariable, "#{__dir__}/lint/shadowing_outer_local_variable"
      register_cop :StructNewOverride, "#{__dir__}/lint/struct_new_override"
      register_cop :SuppressedException, "#{__dir__}/lint/suppressed_exception"
      register_cop :SuppressedExceptionInNumberConversion, "#{__dir__}/lint/suppressed_exception_in_number_conversion"
      register_cop :SymbolConversion, "#{__dir__}/lint/symbol_conversion"
      register_cop :Syntax, "#{__dir__}/lint/syntax"
      register_cop :ToEnumArguments, "#{__dir__}/lint/to_enum_arguments"
      register_cop :ToJSON, "#{__dir__}/lint/to_json"
      register_cop :TopLevelReturnWithArgument, "#{__dir__}/lint/top_level_return_with_argument"
      register_cop :TrailingCommaInAttributeDeclaration, "#{__dir__}/lint/trailing_comma_in_attribute_declaration"
      register_cop :TripleQuotes, "#{__dir__}/lint/triple_quotes"
      register_cop :UnderscorePrefixedVariableName, "#{__dir__}/lint/underscore_prefixed_variable_name"
      register_cop :UnescapedBracketInRegexp, "#{__dir__}/lint/unescaped_bracket_in_regexp"
      register_cop :UnexpectedBlockArity, "#{__dir__}/lint/unexpected_block_arity"
      register_cop :UnifiedInteger, "#{__dir__}/lint/unified_integer"
      register_cop :UnmodifiedReduceAccumulator, "#{__dir__}/lint/unmodified_reduce_accumulator"
      register_cop :UnreachableCode, "#{__dir__}/lint/unreachable_code"
      register_cop :UnreachableLoop, "#{__dir__}/lint/unreachable_loop"
      register_cop :UnreachablePatternBranch, "#{__dir__}/lint/unreachable_pattern_branch"
      register_cop :UnusedBlockArgument, "#{__dir__}/lint/unused_block_argument"
      register_cop :UnusedMethodArgument, "#{__dir__}/lint/unused_method_argument"
      register_cop :UnusedPrivateMethod, "#{__dir__}/lint/unused_private_method"
      register_cop :UriEscapeUnescape, "#{__dir__}/lint/uri_escape_unescape"
      register_cop :UriRegexp, "#{__dir__}/lint/uri_regexp"
      register_cop :UselessAccessModifier, "#{__dir__}/lint/useless_access_modifier"
      register_cop :UselessAssignment, "#{__dir__}/lint/useless_assignment"
      register_cop :UselessConstantScoping, "#{__dir__}/lint/useless_constant_scoping"
      register_cop :UselessDefaultValueArgument, "#{__dir__}/lint/useless_default_value_argument"
      register_cop :UselessDefined, "#{__dir__}/lint/useless_defined"
      register_cop :UselessElseWithoutRescue, "#{__dir__}/lint/useless_else_without_rescue"
      register_cop :UselessMethodDefinition, "#{__dir__}/lint/useless_method_definition"
      register_cop :UselessNumericOperation, "#{__dir__}/lint/useless_numeric_operation"
      register_cop :UselessOr, "#{__dir__}/lint/useless_or"
      register_cop :UselessRescue, "#{__dir__}/lint/useless_rescue"
      register_cop :UselessRuby2Keywords, "#{__dir__}/lint/useless_ruby2_keywords"
      register_cop :UselessSetterCall, "#{__dir__}/lint/useless_setter_call"
      register_cop :UselessTimes, "#{__dir__}/lint/useless_times"
      register_cop :Void, "#{__dir__}/lint/void"

      autoload :UnusedArgument, "#{__dir__}/mixin/unused_argument"

      # Utility classes for `Lint` department cops.
      module Utils
        autoload :NilReceiverChecker, "#{__dir__}/lint/utils/nil_receiver_checker"
      end
    end
  end
end
