Skip to content

Commit

Permalink
chore: Clean-up utility method that is public in detekt-api (#25)
Browse files Browse the repository at this point in the history
`isInternal()` is defined publicly, no need to shamelessly reuse it
:smile:

Relies on #24.
  • Loading branch information
Nava2 authored Feb 16, 2024
1 parent ab03e39 commit c860491
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.faire.detekt.rules

import com.faire.detekt.utils.isInternal
import io.gitlab.arturbosch.detekt.api.CodeSmell
import io.gitlab.arturbosch.detekt.api.Config
import io.gitlab.arturbosch.detekt.api.Debt
Expand All @@ -9,6 +8,7 @@ import io.gitlab.arturbosch.detekt.api.Issue
import io.gitlab.arturbosch.detekt.api.Rule
import io.gitlab.arturbosch.detekt.api.Severity
import io.gitlab.arturbosch.detekt.api.internal.isSuppressedBy
import io.gitlab.arturbosch.detekt.rules.isInternal
import org.jetbrains.kotlin.lexer.KtTokens
import org.jetbrains.kotlin.psi.KtProperty
import org.jetbrains.kotlin.psi.psiUtil.isExtensionDeclaration
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/**
* Stolen from the Detekt source code. These extensions to [KtAnnotated] may also be useful for our rules.
*/
package com.faire.detekt.utils

import org.jetbrains.kotlin.psi.KtAnnotated
import org.jetbrains.kotlin.psi.KtAnnotationEntry
import org.jetbrains.kotlin.psi.KtUserType

/**
* Stolen from the Detekt source code. These extensions to [KtAnnotated] may also be useful for our rules.
*/
internal fun KtAnnotationEntry.getAnnotationName(): String? {
val tr = typeReference ?: return null
val type = tr.typeElement
Expand Down

This file was deleted.

0 comments on commit c860491

Please sign in to comment.