Skip to content

Commit

Permalink
Format the code for 'spotless'/'ktlin' format
Browse files Browse the repository at this point in the history
  • Loading branch information
nicokosi committed Nov 3, 2019
1 parent fca681d commit dcce2e3
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 20 deletions.
16 changes: 8 additions & 8 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ application {
}

spotless {
kotlin {
ktlint()
}
kotlinGradle {
// same as kotlin, but for .gradle.kts files (defaults to '*.gradle.kts')
target("*.gradle.kts")
ktlint()
}
kotlin {
ktlint()
}
kotlinGradle {
// same as kotlin, but for .gradle.kts files (defaults to '*.gradle.kts')
target("*.gradle.kts")
ktlint()
}
}
7 changes: 4 additions & 3 deletions src/main/kotlin/pullpitok/App.kt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package pullpitok

import kotlin.system.exitProcess
import pullpitok.github.Action
import pullpitok.github.Event
import pullpitok.github.EventClient
import pullpitok.github.Type
import kotlin.system.exitProcess

fun main(args: Array<String>) {
loadLibSunec()
Expand Down Expand Up @@ -63,8 +63,9 @@ fun perAuthor(events: List<Event>): Map<String, List<Event>> = events
.groupBy { it.actor.login }

fun counters(
eventsPerAuthor: Map<String, List<Event>>,
predicate: (Event) -> Boolean): String {
eventsPerAuthor: Map<String, List<Event>>,
predicate: (Event) -> Boolean
): String {
eventsPerAuthor.entries
var counters = ""
for (events in eventsPerAuthor.entries) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/pullpitok/github/Event.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ enum class Action {
enum class Type {
PullRequestEvent,
PullRequestReviewCommentEvent
}
}
3 changes: 1 addition & 2 deletions src/main/kotlin/pullpitok/github/EventClient.kt
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,4 @@ class EventClient {
)
}
}

}
}
7 changes: 3 additions & 4 deletions src/test/kotlin/pullpitok/AppTest.kt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package pullpitok

import kotlin.test.assertEquals
import kotlin.test.assertFalse
import kotlin.test.assertTrue
import org.junit.Test
import pullpitok.github.Actor
import pullpitok.github.Event
import pullpitok.github.Payload
import kotlin.test.assertEquals
import kotlin.test.assertFalse
import kotlin.test.assertTrue

class AppTest {

Expand Down Expand Up @@ -38,5 +38,4 @@ class AppTest {
assertTrue(checkArgs(arrayOf("org/repo")))
assertTrue(checkArgs(arrayOf("org/repo", "token")))
}

}
3 changes: 1 addition & 2 deletions src/test/kotlin/pullpitok/github/EventClientTest.kt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package pullpitok.github

import org.junit.Test
import kotlin.test.assertEquals
import org.junit.Test

class EventClientTest {

Expand All @@ -28,5 +28,4 @@ class EventClientTest {
}

private fun loadJsonEventFile() = EventClientTest::class.java.getResource("/events.json").readText()

}

0 comments on commit dcce2e3

Please sign in to comment.