mirror of
https://github.com/github/codeql.git
synced 2025-12-18 09:43:15 +01:00
Kotlin: Populate numfiles
This commit is contained in:
@@ -35,6 +35,7 @@ import kotlin.collections.ArrayList
|
||||
open class KotlinFileExtractor(
|
||||
override val logger: FileLogger,
|
||||
override val tw: FileTrapWriter,
|
||||
val linesOfCode: LinesOfCode?,
|
||||
val filePath: String,
|
||||
dependencyCollector: OdasaOutput.TrapFileManager?,
|
||||
externalClassExtractor: ExternalDeclExtractor,
|
||||
@@ -90,6 +91,8 @@ open class KotlinFileExtractor(
|
||||
if (!declarationStack.isEmpty()) {
|
||||
logger.errorElement("Declaration stack is not empty after processing the file", file)
|
||||
}
|
||||
|
||||
linesOfCode?.linesOfCodeInFile(id)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -459,6 +462,8 @@ open class KotlinFileExtractor(
|
||||
extractClassModifiers(c, id)
|
||||
extractClassSupertypes(c, id, inReceiverContext = true) // inReceiverContext = true is specified to force extraction of member prototypes of base types
|
||||
|
||||
linesOfCode?.linesOfCodeInDeclaration(c, id)
|
||||
|
||||
return id
|
||||
}
|
||||
}
|
||||
@@ -1038,6 +1043,8 @@ open class KotlinFileExtractor(
|
||||
addModifiers(id, "suspend")
|
||||
}
|
||||
|
||||
linesOfCode?.linesOfCodeInDeclaration(f, id)
|
||||
|
||||
return id
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user