From 2b13acf1ce96bf60ee8349a05d39b68507545e3e Mon Sep 17 00:00:00 2001 From: Joonas Javanainen Date: Thu, 11 May 2023 21:46:23 +0300 Subject: [PATCH] Reformat with ktlint --- build.gradle.kts | 22 +++++++++---------- .../ghidraboy/decompiler/DecompilerTest.kt | 6 ++--- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 9c9004d..b4807c7 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -27,8 +27,8 @@ repositories { } val ghidraDir = System.getenv("GHIDRA_INSTALL_DIR") - ?: (project.findProperty("ghidra.dir") as? String) - ?: throw IllegalStateException("Can't find Ghidra installation") + ?: (project.findProperty("ghidra.dir") as? String) + ?: throw IllegalStateException("Can't find Ghidra installation") val ghidraProps = Properties().apply { file("$ghidraDir/Ghidra/application.properties").inputStream().use { load(it) } } val ghidraVersion = ghidraProps.getProperty("application.version")!! @@ -49,7 +49,7 @@ tasks.withType { val ghidraJars = fileTree("$ghidraDir/Ghidra/Framework") { include("**/*.jar") } + - fileTree("$ghidraDir/Ghidra/Features") { include("**/*.jar") } + fileTree("$ghidraDir/Ghidra/Features") { include("**/*.jar") } val sleigh: Configuration by configurations.creating @@ -72,11 +72,11 @@ val generateExtensionProps by tasks.registering() { output.outputStream().use { val props = Properties() props += mapOf( - ("name" to "GhidraBoy"), - ("description" to "Support for Sharp SM83 / Game Boy"), - ("author" to "Gekkio"), - ("createdOn" to LocalDate.now().toString()), - ("version" to ghidraVersion) + ("name" to "GhidraBoy"), + ("description" to "Support for Sharp SM83 / Game Boy"), + ("author" to "Gekkio"), + ("createdOn" to LocalDate.now().toString()), + ("version" to ghidraVersion) ) props.store(it, null) } @@ -88,10 +88,10 @@ val compileSleigh by tasks.registering(JavaExec::class) { val slaFile = file("data/languages/sm83.sla") inputs.files(fileTree("data/languages").include("*.slaspec", "*.sinc")) - .withPropertyName("sourceFiles") - .withPathSensitivity(PathSensitivity.RELATIVE) + .withPropertyName("sourceFiles") + .withPathSensitivity(PathSensitivity.RELATIVE) outputs.files(slaFile) - .withPropertyName("outputFile") + .withPropertyName("outputFile") classpath = sleigh mainClass.set("ghidra.pcodeCPort.slgh_compile.SleighCompile") diff --git a/src/test/kotlin/fi/gekkio/ghidraboy/decompiler/DecompilerTest.kt b/src/test/kotlin/fi/gekkio/ghidraboy/decompiler/DecompilerTest.kt index b1275f9..f7d9c70 100644 --- a/src/test/kotlin/fi/gekkio/ghidraboy/decompiler/DecompilerTest.kt +++ b/src/test/kotlin/fi/gekkio/ghidraboy/decompiler/DecompilerTest.kt @@ -105,7 +105,7 @@ class DecompilerTest : IntegrationTest() { params = listOf( parameter("dst", pointer(u8), register("HL")), parameter("src", pointer(u8), register("DE")), - parameter("len", u16, register("BC")), + parameter("len", u16, register("BC")) ) ) assertDecompiled( @@ -142,7 +142,7 @@ class DecompilerTest : IntegrationTest() { params = listOf( parameter("dst", pointer(u8), register("HL")), parameter("val", u8, register("A")), - parameter("len", u16, register("BC")), + parameter("len", u16, register("BC")) ) ) assertDecompiled( @@ -180,7 +180,7 @@ class DecompilerTest : IntegrationTest() { """.trimIndent(), name = "popcnt4_upper", params = listOf( - parameter("value", u8, register("A")), + parameter("value", u8, register("A")) ), returnParam = returnParameter(u8, register("A")) )