mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
Rename to writeStubTrapFile
This commit is contained in:
@@ -39,7 +39,7 @@ class ExternalDeclExtractor(val logger: FileLogger, val invocationTrapFile: Stri
|
|||||||
}
|
}
|
||||||
fun extractLater(c: IrClass) = extractLater(c, "")
|
fun extractLater(c: IrClass) = extractLater(c, "")
|
||||||
|
|
||||||
fun noteElementExtractedFromSource(e: IrElement, signature: String = "") {
|
fun writeStubTrapFile(e: IrElement, signature: String = "") {
|
||||||
extractElement(e, signature, true) { trapFileBW, _, _ ->
|
extractElement(e, signature, true) { trapFileBW, _, _ ->
|
||||||
trapFileBW.write("// Trap file stubbed because this declaration was extracted from source in $sourceFilePath\n")
|
trapFileBW.write("// Trap file stubbed because this declaration was extracted from source in $sourceFilePath\n")
|
||||||
trapFileBW.write("// Part of invocation $invocationTrapFile\n")
|
trapFileBW.write("// Part of invocation $invocationTrapFile\n")
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ open class KotlinFileExtractor(
|
|||||||
file.declarations.forEach {
|
file.declarations.forEach {
|
||||||
extractDeclaration(it, extractPrivateMembers = true, extractFunctionBodies = true)
|
extractDeclaration(it, extractPrivateMembers = true, extractFunctionBodies = true)
|
||||||
if (it is IrProperty || it is IrField || it is IrFunction) {
|
if (it is IrProperty || it is IrField || it is IrFunction) {
|
||||||
externalClassExtractor.noteElementExtractedFromSource(it, getTrapFileSignature(it))
|
externalClassExtractor.writeStubTrapFile(it, getTrapFileSignature(it))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
extractStaticInitializer(file, { extractFileClass(file) })
|
extractStaticInitializer(file, { extractFileClass(file) })
|
||||||
@@ -105,7 +105,7 @@ open class KotlinFileExtractor(
|
|||||||
|
|
||||||
linesOfCode?.linesOfCodeInFile(id)
|
linesOfCode?.linesOfCodeInFile(id)
|
||||||
|
|
||||||
externalClassExtractor.noteElementExtractedFromSource(file)
|
externalClassExtractor.writeStubTrapFile(file)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -527,7 +527,7 @@ open class KotlinFileExtractor(
|
|||||||
linesOfCode?.linesOfCodeInDeclaration(c, id)
|
linesOfCode?.linesOfCodeInDeclaration(c, id)
|
||||||
|
|
||||||
if (extractFunctionBodies && !c.isAnonymousObject && !c.isLocal)
|
if (extractFunctionBodies && !c.isAnonymousObject && !c.isLocal)
|
||||||
externalClassExtractor.noteElementExtractedFromSource(c)
|
externalClassExtractor.writeStubTrapFile(c)
|
||||||
|
|
||||||
return id
|
return id
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user