Skip to content

Commit 28f3edf

Browse files
committed
chore: code cleanup and linting
1 parent b00f1b8 commit 28f3edf

File tree

19 files changed

+448
-273
lines changed

19 files changed

+448
-273
lines changed

packages/builder/api/builder.api

Lines changed: 96 additions & 204 deletions
Large diffs are not rendered by default.

packages/builder/detekt-baseline.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<ID>FunctionParameterNaming:Statics.kt$Statics$`in`: InputStream</ID>
77
<ID>LongMethod:JvmBuildConfigurator.kt$JvmBuildConfigurator$private fun ActionScope.kotlinc( name: String, resolver: MavenAetherResolver?, state: ElideBuildState, config: BuildConfigurator.BuildConfiguration, srcSet: SourceSet, additionalDeps: Classpath? = null, tests: Boolean = false, dependencies: List&lt;Task> = emptyList(), argsAmender: K2JVMCompilerArguments.() -> Unit = {}, )</ID>
88
<ID>ObjectPropertyNaming:Statics.kt$Statics$public val `in`: InputStream get() = delegatedInStream.value ?: System.`in`</ID>
9+
<ID>ReturnCount:GuestJvmTestDriver.kt$GuestJvmTestDriver$override suspend fun run(testCase: JvmTestCase): TestOutcome</ID>
910
<ID>UnusedParameter:NativeImageDriver.kt$NativeImageDriver$inputs: NativeImageInputs.Paths</ID>
1011
<ID>UnusedParameter:NativeImageDriver.kt$NativeImageDriver$javaToolchainHome: Path</ID>
1112
<ID>UnusedParameter:TestDriver.kt$TestDriver$binder: ExecutionBinder? = null</ID>

packages/builder/src/main/kotlin/elide/tooling/runner/AbstractTestRunner.kt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
/*
2+
* Copyright (c) 2024-2025 Elide Technologies, Inc.
3+
*
4+
* Licensed under the MIT license (the "License"); you may not use this file except in compliance
5+
* with the License. You may obtain a copy of the License at
6+
*
7+
* https://opensource.org/license/mit/
8+
*
9+
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
10+
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
11+
* License for the specific language governing permissions and limitations under the License.
12+
*/
113
package elide.tooling.runner
214

315
import java.util.concurrent.atomic.AtomicInteger

packages/builder/src/main/kotlin/elide/tooling/runner/ConcurrentTestRunner.kt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
/*
2+
* Copyright (c) 2024-2025 Elide Technologies, Inc.
3+
*
4+
* Licensed under the MIT license (the "License"); you may not use this file except in compliance
5+
* with the License. You may obtain a copy of the License at
6+
*
7+
* https://opensource.org/license/mit/
8+
*
9+
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
10+
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
11+
* License for the specific language governing permissions and limitations under the License.
12+
*/
113
package elide.tooling.runner
214

315
import kotlinx.coroutines.CoroutineDispatcher

packages/builder/src/main/kotlin/elide/tooling/runner/SequentialTestRunner.kt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
/*
2+
* Copyright (c) 2024-2025 Elide Technologies, Inc.
3+
*
4+
* Licensed under the MIT license (the "License"); you may not use this file except in compliance
5+
* with the License. You may obtain a copy of the License at
6+
*
7+
* https://opensource.org/license/mit/
8+
*
9+
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
10+
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
11+
* License for the specific language governing permissions and limitations under the License.
12+
*/
113
package elide.tooling.runner
214

315
import kotlinx.coroutines.flow.Flow

packages/builder/src/main/kotlin/elide/tooling/testing/DynamicTestCase.kt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
/*
2+
* Copyright (c) 2024-2025 Elide Technologies, Inc.
3+
*
4+
* Licensed under the MIT license (the "License"); you may not use this file except in compliance
5+
* with the License. You may obtain a copy of the License at
6+
*
7+
* https://opensource.org/license/mit/
8+
*
9+
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
10+
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
11+
* License for the specific language governing permissions and limitations under the License.
12+
*/
113
package elide.tooling.testing
214

315
import elide.runtime.core.PolyglotContext

packages/builder/src/main/kotlin/elide/tooling/testing/MutableTestRegistry.kt

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
1+
/*
2+
* Copyright (c) 2024-2025 Elide Technologies, Inc.
3+
*
4+
* Licensed under the MIT license (the "License"); you may not use this file except in compliance
5+
* with the License. You may obtain a copy of the License at
6+
*
7+
* https://opensource.org/license/mit/
8+
*
9+
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
10+
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
11+
* License for the specific language governing permissions and limitations under the License.
12+
*/
113
package elide.tooling.testing
214

315
import com.google.common.graph.GraphBuilder
416
import com.google.common.graph.Traverser
5-
import org.eclipse.aether.util.graph.visitor.PathRecordingDependencyVisitor
617

718
@Suppress("UnstableApiUsage")
819
public class MutableTestRegistry : TestRegistry {

packages/builder/src/main/kotlin/elide/tooling/testing/TestDriverRegistry.kt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
/*
2+
* Copyright (c) 2024-2025 Elide Technologies, Inc.
3+
*
4+
* Licensed under the MIT license (the "License"); you may not use this file except in compliance
5+
* with the License. You may obtain a copy of the License at
6+
*
7+
* https://opensource.org/license/mit/
8+
*
9+
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
10+
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
11+
* License for the specific language governing permissions and limitations under the License.
12+
*/
113
package elide.tooling.testing
214

315
import elide.annotations.Singleton

packages/builder/src/main/kotlin/elide/tooling/testing/jvm/GuestJvmTestDriver.kt

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
/*
2+
* Copyright (c) 2024-2025 Elide Technologies, Inc.
3+
*
4+
* Licensed under the MIT license (the "License"); you may not use this file except in compliance
5+
* with the License. You may obtain a copy of the License at
6+
*
7+
* https://opensource.org/license/mit/
8+
*
9+
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
10+
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
11+
* License for the specific language governing permissions and limitations under the License.
12+
*/
113
package elide.tooling.testing.jvm
214

315
import elide.runtime.core.PolyglotContext
@@ -14,19 +26,18 @@ public class GuestJvmTestDriver(private val contextProvider: () -> PolyglotConte
1426
override val type: TestTypeKey<JvmTestCase> get() = JvmTestCase
1527

1628
override suspend fun run(testCase: JvmTestCase): TestOutcome {
17-
val guestContext = contextProvider()
18-
val testClass = guestContext.bindings(Jvm.Plugin).getMember(testCase.className)
29+
val testClass = contextProvider().bindings(Jvm.Plugin).getMember(testCase.className)
1930
?: return TestOutcome.Error("Failed to resolve test class: ${testCase.className}")
2031

21-
if (!testClass.canInstantiate()) return TestOutcome.Error("Cannot instantiate test class ${testCase.className}")
32+
if (!testClass.canInstantiate()) return TestOutcome.Error("Failed to instantiate test class ${testCase.className}")
2233
val testInstance = testClass.newInstance()
2334

2435
if (!testInstance.canInvokeMember(testCase.methodName))
2536
return TestOutcome.Error("Cannot invoke member ${testCase.methodName}")
2637

2738
return runCatching { testInstance.invokeMember(testCase.methodName) }.fold(
2839
onSuccess = { TestOutcome.Success },
29-
onFailure = { TestOutcome.Failure(it) }
40+
onFailure = { TestOutcome.Failure(it) },
3041
)
3142
}
3243
}

packages/builder/src/main/kotlin/elide/tooling/testing/jvm/JvmTestCase.kt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
/*
2+
* Copyright (c) 2024-2025 Elide Technologies, Inc.
3+
*
4+
* Licensed under the MIT license (the "License"); you may not use this file except in compliance
5+
* with the License. You may obtain a copy of the License at
6+
*
7+
* https://opensource.org/license/mit/
8+
*
9+
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
10+
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
11+
* License for the specific language governing permissions and limitations under the License.
12+
*/
113
package elide.tooling.testing.jvm
214

315
import elide.tooling.testing.TestCase

0 commit comments

Comments
 (0)