From ce71a2ec7abadd4d82d89dfc1f7fd3f79076e37a Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Wed, 31 Oct 2018 00:03:25 +0100 Subject: chore: Add linting via Ktlint This change adds support for linting the code base using ktlint and the excellent ktlint-gradle plugin. --- build.gradle | 1 + gradle/kotlin.gradle | 1 + odcsim-core/src/test/kotlin/com/atlarge/odcsim/ActorSystemTest.kt | 2 -- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index cc2e3e8e..f3e5996c 100644 --- a/build.gradle +++ b/build.gradle @@ -25,6 +25,7 @@ plugins { id 'org.jetbrains.kotlin.jvm' version '1.3.0' apply false id 'org.jetbrains.dokka' version '0.9.17' apply false + id 'org.jlleitschuh.gradle.ktlint' version '6.2.1' apply false } allprojects { diff --git a/gradle/kotlin.gradle b/gradle/kotlin.gradle index 7c4495f8..6e85235d 100644 --- a/gradle/kotlin.gradle +++ b/gradle/kotlin.gradle @@ -25,6 +25,7 @@ /* Default configuration for Kotlin projects */ apply plugin: 'kotlin' apply plugin: 'org.jetbrains.dokka' +apply plugin: 'org.jlleitschuh.gradle.ktlint' apply plugin: 'jacoco' sourceCompatibility = 1.8 diff --git a/odcsim-core/src/test/kotlin/com/atlarge/odcsim/ActorSystemTest.kt b/odcsim-core/src/test/kotlin/com/atlarge/odcsim/ActorSystemTest.kt index 879fe35a..73b060b9 100644 --- a/odcsim-core/src/test/kotlin/com/atlarge/odcsim/ActorSystemTest.kt +++ b/odcsim-core/src/test/kotlin/com/atlarge/odcsim/ActorSystemTest.kt @@ -154,7 +154,6 @@ abstract class ActorSystemTest { } } - @Nested @DisplayName("Actor") inner class Actor { @@ -257,7 +256,6 @@ abstract class ActorSystemTest { msg.send(Unit) // This actor should be stopped now and not receive the message anymore Behavior.stopped() } - }, name = "test") system.run() -- cgit v1.2.3