A bug about Private class InternalApi is unused.
nuhkoca opened this issue · 2 comments
nuhkoca commented
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,
cordis-dev commented
@nuhkoca Thanks for reporting - this seems like a false positive coming from Detekt (reported). UnusedPrivateClass
rule is now disabled as default until resolved by arturbosch/detekt.
nuhkoca commented
Thanks for informing @cordis-dev now it works as intended.