Skip to content

False positives #111

Description

@CyrilFind

Hi, thanks for the plugin it's been helpful at cleaning up our Koin setup but I found several positives that I thought might be useful to share, I'll just paste my custom config with comments since it's pretty self explanatory but feel free to ask me for deatails, to correct me if I'm wrong or to tell me to create separate issues:

koin-rules:
  NoGetOutsideModuleDefinition:
    active: false # gives false positives on unrelated functions named `get` being called
  MissingScopedDependencyQualifier:
    active: false # gives false positives on named<AnnotationType>() instead of named("string")
  DeprecatedKoinApi:
    active: false # 2 false positives: the latest compiler plugin DSL syntax and the "injection" call in activities
  MissingKoinStopInTest: # false positive in Application classes where koin is started (not in tests)
    includes:
      - '**/test/**'
      - '**/androidTest/**'
  NoInjectDelegate:
    allowedSuperTypes:
      - 'Application'
      - 'Activity'
      - 'ComponentActivity'
      - 'AppCompatActivity'
      - 'FragmentActivity'
      - 'Fragment'
      - 'DialogFragment'
      - 'BottomSheetDialogFragment'
      - 'Service'
      - 'BroadcastReceiver'
      - 'ViewModel'
      - 'GlanceAppWidget'
      - 'GlanceAppWidgetReceiver'
      - "ContentProvider" # copied the rest from default config to add this
  NoKoinComponentInterface:
    allowedSuperTypes:
      - 'Application'
      - 'Activity'
      - 'ComponentActivity'
      - 'Fragment'
      - 'Service'
      - 'BroadcastReceiver'
      - "ContentProvider" # copied the rest from default config to add this

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions