Cleanup getLabel

This commit is contained in:
Tamas Vajk
2021-09-16 15:03:55 +02:00
committed by Ian Lynagh
parent 48d019ebbe
commit 7ecb3650cb
2 changed files with 9 additions and 14 deletions

View File

@@ -88,15 +88,7 @@ class CommentExtractor(private val fileExtractor: KotlinFileExtractor) {
file.accept(IrVisitorLookup(ownerPsi, file), owners)
for (ownerIr in owners) {
val label = fileExtractor.getLabel(ownerIr)
if (label == null) {
logger.warn(Severity.Warn, "Couldn't get label for element: $ownerIr")
continue
}
if (label == "*") {
logger.info("Skipping fresh entity label for element: $ownerIr")
continue
}
val label = fileExtractor.getLabel(ownerIr) ?: continue
val existingLabel = tw.getExistingLabelFor<DbTop>(label)
if (existingLabel == null) {
logger.warn(Severity.Warn, "Couldn't get existing label for $label")