Skip to content

Commit

Permalink
++
Browse files Browse the repository at this point in the history
  • Loading branch information
KuechA committed Jun 21, 2024
1 parent c760aa6 commit e79badf
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ class TSFIInformationExtractor : InformationExtractor() {

var parametersContent = ""

Check warning on line 358 in codyze-specification-languages/cpg-native/src/main/kotlin/de/fraunhofer/aisec/codyze/specificationLanguage/cpg/native/TSFIInformationExtractor.kt

View check run for this annotation

Codecov / codecov/patch

codyze-specification-languages/cpg-native/src/main/kotlin/de/fraunhofer/aisec/codyze/specificationLanguage/cpg/native/TSFIInformationExtractor.kt#L358

Added line #L358 was not covered by tests
for(param in tsfi.params){
parametersContent += formatter.format("parameter", param.description, mapOf("name" to param.name, "type" to param.type.name.toString().replace("<", "&lt;").replace(">", &gt;").replace("[]", "Array")))
parametersContent += formatter.format("parameter", param.description, mapOf("name" to param.name, "type" to param.type.name.toString().replace("<", "&lt;").replace(">", "&gt;").replace("[]", "Array")))

Check warning on line 360 in codyze-specification-languages/cpg-native/src/main/kotlin/de/fraunhofer/aisec/codyze/specificationLanguage/cpg/native/TSFIInformationExtractor.kt

View check run for this annotation

Codecov / codecov/patch

codyze-specification-languages/cpg-native/src/main/kotlin/de/fraunhofer/aisec/codyze/specificationLanguage/cpg/native/TSFIInformationExtractor.kt#L360

Added line #L360 was not covered by tests
}

if(parametersContent.isEmpty()) parametersContent = " "

Check warning

Code scanning / detekt

Reports spaces around keywords Warning

Missing spacing after "if"
Expand Down Expand Up @@ -402,7 +402,8 @@ class TSFIInformationExtractor : InformationExtractor() {
val nameString: String

Check warning on line 402 in codyze-specification-languages/cpg-native/src/main/kotlin/de/fraunhofer/aisec/codyze/specificationLanguage/cpg/native/TSFIInformationExtractor.kt

View check run for this annotation

Codecov / codecov/patch

codyze-specification-languages/cpg-native/src/main/kotlin/de/fraunhofer/aisec/codyze/specificationLanguage/cpg/native/TSFIInformationExtractor.kt#L402

Added line #L402 was not covered by tests
if (node is FunctionDeclaration){
nameString = node.name.toString() + "-" +node.parameters.map {
it.type.name.localName.replace("[]","Array") }.joinToString("-")
it.type.name.localName.replace("[]","Array").replace("<", "-lt-").replace(">", "-gt-")
}.joinToString("-")

Check warning on line 406 in codyze-specification-languages/cpg-native/src/main/kotlin/de/fraunhofer/aisec/codyze/specificationLanguage/cpg/native/TSFIInformationExtractor.kt

View check run for this annotation

Codecov / codecov/patch

codyze-specification-languages/cpg-native/src/main/kotlin/de/fraunhofer/aisec/codyze/specificationLanguage/cpg/native/TSFIInformationExtractor.kt#L404-L406

Added lines #L404 - L406 were not covered by tests
}else{
nameString = node.name.toString()

Check warning on line 408 in codyze-specification-languages/cpg-native/src/main/kotlin/de/fraunhofer/aisec/codyze/specificationLanguage/cpg/native/TSFIInformationExtractor.kt

View check run for this annotation

Codecov / codecov/patch

codyze-specification-languages/cpg-native/src/main/kotlin/de/fraunhofer/aisec/codyze/specificationLanguage/cpg/native/TSFIInformationExtractor.kt#L408

Added line #L408 was not covered by tests
}
Expand Down

0 comments on commit e79badf

Please sign in to comment.