From 402a8f55342c4565431c2a2e7287a70592f3fe33 Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Thu, 6 Oct 2022 12:51:27 +0200 Subject: style: Eliminate use of wildcard imports This change updates the repository to remove the use of wildcard imports everywhere. Wildcard imports are not allowed by default by Ktlint as well as Google's Java style guide. --- .../src/main/kotlin/org/opendc/simulator/power/SimPdu.kt | 5 ++++- .../src/main/kotlin/org/opendc/simulator/power/SimUps.kt | 5 ++++- .../src/test/kotlin/org/opendc/simulator/power/SimPowerSourceTest.kt | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) (limited to 'opendc-simulator/opendc-simulator-power/src') diff --git a/opendc-simulator/opendc-simulator-power/src/main/kotlin/org/opendc/simulator/power/SimPdu.kt b/opendc-simulator/opendc-simulator-power/src/main/kotlin/org/opendc/simulator/power/SimPdu.kt index 9f88fecc..69ac97ab 100644 --- a/opendc-simulator/opendc-simulator-power/src/main/kotlin/org/opendc/simulator/power/SimPdu.kt +++ b/opendc-simulator/opendc-simulator-power/src/main/kotlin/org/opendc/simulator/power/SimPdu.kt @@ -22,7 +22,10 @@ package org.opendc.simulator.power -import org.opendc.simulator.flow.* +import org.opendc.simulator.flow.FlowConsumer +import org.opendc.simulator.flow.FlowEngine +import org.opendc.simulator.flow.FlowMapper +import org.opendc.simulator.flow.FlowSource import org.opendc.simulator.flow.mux.FlowMultiplexer import org.opendc.simulator.flow.mux.MaxMinFlowMultiplexer diff --git a/opendc-simulator/opendc-simulator-power/src/main/kotlin/org/opendc/simulator/power/SimUps.kt b/opendc-simulator/opendc-simulator-power/src/main/kotlin/org/opendc/simulator/power/SimUps.kt index 46d659f8..00b2926e 100644 --- a/opendc-simulator/opendc-simulator-power/src/main/kotlin/org/opendc/simulator/power/SimUps.kt +++ b/opendc-simulator/opendc-simulator-power/src/main/kotlin/org/opendc/simulator/power/SimUps.kt @@ -22,7 +22,10 @@ package org.opendc.simulator.power -import org.opendc.simulator.flow.* +import org.opendc.simulator.flow.FlowEngine +import org.opendc.simulator.flow.FlowForwarder +import org.opendc.simulator.flow.FlowMapper +import org.opendc.simulator.flow.FlowSource import org.opendc.simulator.flow.mux.MaxMinFlowMultiplexer /** diff --git a/opendc-simulator/opendc-simulator-power/src/test/kotlin/org/opendc/simulator/power/SimPowerSourceTest.kt b/opendc-simulator/opendc-simulator-power/src/test/kotlin/org/opendc/simulator/power/SimPowerSourceTest.kt index b83b6ba7..963ba710 100644 --- a/opendc-simulator/opendc-simulator-power/src/test/kotlin/org/opendc/simulator/power/SimPowerSourceTest.kt +++ b/opendc-simulator/opendc-simulator-power/src/test/kotlin/org/opendc/simulator/power/SimPowerSourceTest.kt @@ -26,7 +26,10 @@ import io.mockk.every import io.mockk.mockk import io.mockk.spyk import io.mockk.verify -import org.junit.jupiter.api.Assertions.* +import org.junit.jupiter.api.Assertions.assertEquals +import org.junit.jupiter.api.Assertions.assertFalse +import org.junit.jupiter.api.Assertions.assertNull +import org.junit.jupiter.api.Assertions.assertTrue import org.junit.jupiter.api.Test import org.junit.jupiter.api.assertDoesNotThrow import org.junit.jupiter.api.assertThrows -- cgit v1.2.3 From 47357afd16f928260db34d4dd3e686fb9ee7c5ff Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Thu, 6 Oct 2022 13:13:10 +0200 Subject: build: Switch to Spotless for formatting This change updates the build configuration to use Spotless for code formating of both Kotlin and Java. --- .../src/main/kotlin/org/opendc/simulator/power/SimPdu.kt | 2 +- .../src/main/kotlin/org/opendc/simulator/power/SimUps.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'opendc-simulator/opendc-simulator-power/src') diff --git a/opendc-simulator/opendc-simulator-power/src/main/kotlin/org/opendc/simulator/power/SimPdu.kt b/opendc-simulator/opendc-simulator-power/src/main/kotlin/org/opendc/simulator/power/SimPdu.kt index 69ac97ab..c4076310 100644 --- a/opendc-simulator/opendc-simulator-power/src/main/kotlin/org/opendc/simulator/power/SimPdu.kt +++ b/opendc-simulator/opendc-simulator-power/src/main/kotlin/org/opendc/simulator/power/SimPdu.kt @@ -39,7 +39,7 @@ import org.opendc.simulator.flow.mux.MaxMinFlowMultiplexer public class SimPdu( engine: FlowEngine, private val idlePower: Double = 0.0, - private val lossCoefficient: Double = 0.0, + private val lossCoefficient: Double = 0.0 ) : SimPowerInlet() { /** * The [FlowMultiplexer] that distributes the electricity over the PDU outlets. diff --git a/opendc-simulator/opendc-simulator-power/src/main/kotlin/org/opendc/simulator/power/SimUps.kt b/opendc-simulator/opendc-simulator-power/src/main/kotlin/org/opendc/simulator/power/SimUps.kt index 00b2926e..0431d3cf 100644 --- a/opendc-simulator/opendc-simulator-power/src/main/kotlin/org/opendc/simulator/power/SimUps.kt +++ b/opendc-simulator/opendc-simulator-power/src/main/kotlin/org/opendc/simulator/power/SimUps.kt @@ -40,7 +40,7 @@ import org.opendc.simulator.flow.mux.MaxMinFlowMultiplexer public class SimUps( private val engine: FlowEngine, private val idlePower: Double = 0.0, - private val lossCoefficient: Double = 0.0, + private val lossCoefficient: Double = 0.0 ) : SimPowerOutlet() { /** * The resource aggregator used to combine the input sources. -- cgit v1.2.3