Skip to content

Commit 2cadf0c

Browse files
committed
more tweaks
1 parent 6aadc22 commit 2cadf0c

15 files changed

Lines changed: 68 additions & 65 deletions

‎.github/workflows/build-and-test.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
cache: 'gradle'
3636
- name: Build & Unit Test
3737
run: |
38-
xvfb-run --auto-servernum ./gradlew koverReport
38+
xvfb-run --auto-servernum ./gradlew koverHtmlReport
3939
zip -rg unit-test-results.zip build/reports/tests/unitTest
4040
zip -rq coverage-html.zip build/reports/kover/html
4141
- name: Export test results

‎build.gradle.kts‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ dependencies {
5353
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
5454
}
5555

56-
kotlin { sourceSets.all { languageSettings { languageVersion = "2.0" } } }
57-
5856
kotlin {
5957
compilerOptions {
6058
jvmTarget.set(JvmTarget.JVM_1_8)
@@ -109,7 +107,12 @@ tasks.register("integrationAndE2E", Test::class) {
109107
classpath = files(test.map { it.sources.runtimeClasspath })
110108
}
111109

112-
tasks { named<Test>("test") { useJUnitPlatform() } }
110+
tasks {
111+
named<Test>("test") {
112+
useJUnitPlatform()
113+
kover { isEnabled = false }
114+
}
115+
}
113116

114117
tasks.withType<Test> {
115118
minHeapSize = "1024m"

‎src/main/kotlin/dartzee/db/sanity/DatabaseSanityCheck.kt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ object DatabaseSanityCheck {
140140

141141
for (result in sanityErrors) {
142142
val row =
143-
arrayOf(result.getDescription(), result.getCount(), "View Results >", "Auto-fix")
143+
arrayOf<Any>(result.getDescription(), result.getCount(), "View Results >", "Auto-fix")
144144
model.addRow(row)
145145
}
146146

‎src/main/kotlin/dartzee/db/sanity/SanityCheckResultFinalScoreMismatch.kt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class SanityCheckResultFinalScoreMismatch(
3636
val finalScoreRaw = hmParticipantToFinalScore[pt]!!
3737

3838
val row =
39-
arrayOf(participantId, playerId, gameId, dtLastUpdate, finalScore, finalScoreRaw)
39+
arrayOf<Any>(participantId, playerId, gameId, dtLastUpdate, finalScore, finalScoreRaw)
4040
model.addRow(row)
4141
}
4242

‎src/main/kotlin/dartzee/db/sanity/SanityCheckX01Finishes.kt‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ class SanityCheckX01Finishes : ISanityCheck {
3434
model.addColumn("GameId")
3535
model.addColumn("Finish")
3636

37-
missing.forEach { model.addRow(arrayOf("MISSING", it.playerId, it.gameId, it.finish)) }
38-
extra.forEach { model.addRow(arrayOf("EXTRA", it.playerId, it.gameId, it.finish)) }
37+
missing.forEach { model.addRow(arrayOf<Any>("MISSING", it.playerId, it.gameId, it.finish)) }
38+
extra.forEach { model.addRow(arrayOf<Any>("EXTRA", it.playerId, it.gameId, it.finish)) }
3939

4040
if (model.rowCount > 0) {
4141
return listOf(SanityCheckResultSimpleTableModel(model, "X01 Finish mismatches"))

‎src/main/kotlin/dartzee/screen/stats/player/StatisticsTabTotalScore.kt‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ class StatisticsTabTotalScore(private val graphTitle: String, outlierMax: Int) :
169169
// Filter out unfinished games and games with the wrong params
170170
val filter = { g: GameWrapper ->
171171
g.gameParams == selectedParams.hiddenData &&
172-
(g.isFinished() || chckbxIncludeUnfinishedGames.isSelected)
172+
(g.isFinished() || chckbxIncludeUnfinishedGames.isSelected)
173173
}
174174
val gamesToGraph = filteredGames.filter(filter).sortedBy { it.dtStart }
175175
val otherGamesToGraph = filteredGamesOther.filter(filter).sortedBy { it.dtStart }
@@ -294,7 +294,7 @@ class StatisticsTabTotalScore(private val graphTitle: String, outlierMax: Int) :
294294
finalScore = g.getAllDarts().size
295295
}
296296

297-
val row = arrayOf(i + 1, finalScore, g.localId, !g.isFinished())
297+
val row = arrayOf<Any>(i + 1, finalScore, g.localId, !g.isFinished())
298298
model.addRow(row)
299299
}
300300

‎src/main/kotlin/dartzee/screen/stats/player/x01/StatisticsTabX01CheckoutPercent.kt‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class StatisticsTabX01CheckoutPercent : AbstractStatisticsTab() {
6464
val hits = darts.count { drt -> drt.isDouble() && drt.getTotal() == checkout }
6565

6666
val row =
67-
arrayOf(
67+
arrayOf<Any>(
6868
checkout / 2,
6969
opportunities,
7070
hits,
@@ -79,7 +79,7 @@ class StatisticsTabX01CheckoutPercent : AbstractStatisticsTab() {
7979
table.model = model
8080

8181
val totalsRow =
82-
arrayOf(
82+
arrayOf<Any>(
8383
"",
8484
totalOpportunities,
8585
totalHits,

‎src/main/kotlin/dartzee/screen/stats/player/x01/StatisticsTabX01ThreeDartAverage.kt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ class StatisticsTabX01ThreeDartAverage : AbstractStatisticsTab() {
134134

135135
// Table row - only show the raw data for the actual player, not the comparison
136136
if (model != null) {
137-
val row = arrayOf(ordinal, avg, startValue, gameId)
137+
val row = arrayOf<Any>(ordinal, avg, startValue, gameId)
138138
model.addRow(row)
139139
}
140140

‎src/main/kotlin/dartzee/screen/stats/player/x01/StatisticsTabX01ThreeDartScores.kt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ class StatisticsTabX01ThreeDartScores : AbstractStatisticsTab(), RowSelectionLis
132132

133133
table.setRenderer(1, SimpleRenderer(SwingConstants.LEFT, null))
134134

135-
val footerRow = arrayOf("Total", wrapper.getTotalCount(), "-")
135+
val footerRow = arrayOf<Any>("Total", wrapper.getTotalCount(), "-")
136136
table.addFooterRow(footerRow)
137137

138138
table.sortBy(1, true)

‎src/main/kotlin/dartzee/screen/stats/player/x01/StatisticsTabX01TopFinishes.kt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class StatisticsTabX01TopFinishes : AbstractStatisticsTab() {
5252

5353
val dartStr = game.getDartsForFinalRound().joinToString()
5454

55-
val row = arrayOf(total, dartStr, gameId)
55+
val row = arrayOf<Any>(total, dartStr, gameId)
5656
model.addRow(row)
5757
}
5858

0 commit comments

Comments
 (0)