Skip to content

A bug about Private class InternalApi is unused. #12

Closed
@nuhkoca

Description

@nuhkoca

Hello,

I implemented Codefactor for one of my repositories. However, it mentions a weird issue.

Private class InternalApi is unused.

I have InternalApi annotation class and use it inside my class as follows:

DataModule.kt

@Retention(BINARY)
@Qualifier
private annotation class InternalApi

@Module
object DataModule {

    @InternalApi
    @Provides
    @Singleton
    internal fun provideGson(): Gson {
        return GsonBuilder().apply {
            setFieldNamingPolicy(UPPER_CAMEL_CASE_WITH_SPACES)
            serializeNulls()
            setLenient()
        }.create()
    }

    @InternalApi
    @Provides
    @Singleton
    internal fun provideHttpLoggingInterceptor(): HttpLoggingInterceptor {
        return HttpLoggingInterceptor().apply { level = Level.BODY }
    }

Could you please tell me how to solve this issue? Thanks,

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions