comments:
  CommentOverPrivateProperty:
    active: true
  UndocumentedPublicClass:
    active: true
    excludes: ['**/*.kt']
    includes: ['**/detekt-api/src/main/**/api/*.kt']
  UndocumentedPublicFunction:
    active: true
    excludes: ['**/*.kt']
    includes: ['**/detekt-api/src/main/**/api/*.kt']

complexity:
  StringLiteralDuplication:
    active: true
    excludes: ['**/test/**', '**/*Test.kt', '**/*Spec.kt']
    threshold: 5
    ignoreAnnotation: true
    excludeStringsWithLessThan5Characters: true
    ignoreStringsRegex: '$^'
  ComplexInterface:
    active: true
    threshold: 10
    includeStaticDeclarations: false
    includePrivateDeclarations: false
  ComplexMethod:
    active: true
    ignoreSingleWhenExpression: true
  LargeClass:
    active: true
    excludes: ['**/test/**', '**/*.Test.kt', '**/*.Spec.kt']
  MethodOverloading:
    active: true
  TooManyFunctions:
    excludes: ['**/test/**', '**/functionalTest/**']

coroutines:
  active: true
  GlobalCoroutineUsage:
    active: true
  RedundantSuspendModifier:
    active: true
  SleepInsteadOfDelay:
    active: true
  SuspendFunWithFlowReturnType:
    active: true

exceptions:
  InstanceOfCheckForException:
    active: true
  NotImplementedDeclaration:
    active: true
  ObjectExtendsThrowable:
    active: true
  RethrowCaughtException:
    active: true
  ReturnFromFinally:
    active: true
  ThrowingExceptionFromFinally:
    active: true
  ThrowingExceptionInMain:
    active: true
  ThrowingExceptionsWithoutMessageOrCause:
    active: true
  ThrowingNewInstanceOfSameException:
    active: true

formatting:
  active: true
  android: false
  autoCorrect: true
  AnnotationSpacing:
    active: true
  EnumEntryNameCase:
    active: true
  MaximumLineLength:
    active: false
  MultiLineIfElse:
    active: true
  NoEmptyFirstLineInMethodBlock:
    active: true
  PackageName:
    active: true
  SpacingAroundAngleBrackets:
    active: true
  SpacingAroundDoubleColon:
    active: true
  SpacingAroundUnaryOperator:
    active: true
  SpacingBetweenDeclarationsWithAnnotations:
    active: true
  SpacingBetweenDeclarationsWithComments:
    active: true

naming:
  ClassNaming:
    excludes: ['**/*Spec.kt']
  FunctionNaming:
    active: true
    excludes:
      - '**/test/**'
      - '**/androidTest/**'
      - '**/commonTest/**'
      - '**/functionalTest/**'
      - '**/jvmTest/**'
      - '**/jsTest/**'
      - '**/iosTest/**'
  TopLevelPropertyNaming:
    constantPattern: '[a-z][_A-Za-z0-9]*|[A-Z][_A-Z0-9]*'
  InvalidPackageDeclaration:
    active: true
    excludes: ['**/build-logic/**/*.kt', '**/*.kts']
  NoNameShadowing:
    active: true
  NonBooleanPropertyPrefixedWithIs:
    active: true
  VariableMaxLength:
    active: true
  VariableMinLength:
    active: true

performance:
  SpreadOperator:
    excludes: ['**/test/**', '**/functionalTest/**']

potential-bugs:
  AvoidReferentialEquality:
    active: true
  DontDowncastCollectionTypes:
    active: true
  DoubleMutabilityForCollection:
    active: false
  ElseCaseInsteadOfExhaustiveWhen:
    active: true
  ExitOutsideMain:
    active: false
  HasPlatformType:
    active: true
  IgnoredReturnValue:
    active: true
  ImplicitUnitReturnType:
    active: true
  MapGetWithNotNullAssertionOperator:
    active: true
  UnconditionalJumpStatementInLoop:
    active: true
  UnreachableCatchBlock:
    active: true
  UnsafeCast:
    active: true
    excludes: ['**/test/**', '**/*.Test.kt', '**/*.Spec.kt']
  UselessPostfixExpression:
    active: true

style:
  CanBeNonNullable:
    active: true
  CascadingCallWrapping:
    active: true
  ClassOrdering:
    active: true
  CollapsibleIfStatements:
    active: true
  DestructuringDeclarationWithTooManyEntries:
    active: true
  EqualsOnSignatureLine:
    active: true
  ExplicitCollectionElementAccessMethod:
    active: true
  ExplicitItLambdaParameter:
    active: true
  ForbiddenComment:
    active: true
    values:
      - 'TODO:'
      - 'FIXME:'
      - 'STOPSHIP:'
      - '@author'
      - '@requiresTypeResolution'
    excludes: ['**/detekt-rules-style/**/ForbiddenComment.kt']
  ForbiddenImport:
    active: true
    imports:
      - 'org.assertj.core.api.Assertions'
      - 'org.junit.jupiter.api.Assertions*'
  ForbiddenMethodCall:
    active: true
    methods:
      - 'kotlin.io.print'
      - 'kotlin.io.println'
      - 'java.net.URL.openStream'
      - 'java.lang.Class.getResourceAsStream'
      - 'java.lang.ClassLoader.getResourceAsStream'
  ForbiddenVoid:
    active: true
  LibraryCodeMustSpecifyReturnType:
    active: true
    excludes: ['**/*.kt']
    includes: ['**/detekt-api/src/main/**/api/*.kt']
  MagicNumber:
    excludes: ['**/test/**', '**/*Test.kt', '**/*Spec.kt']
    ignorePropertyDeclaration: true
    ignoreAnnotation: true
    ignoreEnums: true
    ignoreNumbers:
      - '-1'
      - '0'
      - '1'
      - '2'
      - '100'
      - '1000'
  MandatoryBracesLoops:
    active: true
  MaxLineLength:
    active: true
    excludes: ['**/test/**', '**/*Test.kt', '**/*Spec.kt']
    excludeCommentStatements: true
  NestedClassesVisibility:
    active: true
  ObjectLiteralToLambda:
    active: true
  PreferToOverPairSyntax:
    active: true
  RedundantExplicitType:
    active: true
  RedundantHigherOrderMapUsage:
    active: true
  RedundantVisibilityModifierRule:
    active: true
  ReturnCount:
    active: true
    excludeGuardClauses: true
  SpacingBetweenPackageAndImports:
    active: true
  UnderscoresInNumericLiterals:
    active: true
  UnnecessaryAnnotationUseSiteTarget:
    active: true
  UnnecessaryFilter:
    active: true
  UnnecessaryLet:
    active: true
  UnnecessaryInnerClass:
    active: true
    ignoreAnnotated: ['Nested']
  UntilInsteadOfRangeTo:
    active: true
  UnusedImports:
    active: false # formatting already have this rule enabled
  UnusedPrivateMember:
    active: true
    allowedNames: '(_|ignored|expected)'
  UseAnyOrNoneInsteadOfFind:
    active: true
  UseCheckOrError:
    active: true
  UseEmptyCounterpart:
    active: true
  UseIfEmptyOrIfBlank:
    active: true
  UseIsNullOrEmpty:
    active: true
  UseOrEmpty:
    active: true
  UseRequire:
    active: true
  UseRequireNotNull:
    active: true
  VarCouldBeVal:
    active: true
    ignoreAnnotated: ['Parameter']
