Skip to content

Commit 09febf8

Browse files
committed
style: detekt
1 parent 27fdbf0 commit 09febf8

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

detekt.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# https://github.com/detekt/detekt/blob/master/detekt-core/src/main/resources/default-detekt-config.yml
33

44
build:
5-
maxIssues: 8 #todo: zero out
5+
maxIssues: 6 #todo: zero out
66

77
formatting:
88
Indentation:
@@ -41,6 +41,10 @@ exceptions:
4141
excludes: [ '**/test/**' ]
4242

4343
complexity:
44+
NestedBlockDepth:
45+
threshold: 5
46+
TooManyFunctions:
47+
thresholdInClasses: 15
4448
LongParameterList:
4549
functionThreshold: 8
4650
LongMethod:

src/main/kotlin/spp/cli/Main.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ import spp.cli.commands.developer.view.SubscribeView
4444

4545
object Main {
4646

47-
lateinit var args: Array<String>
47+
private lateinit var args: Array<String>
4848

4949
@JvmStatic
5050
fun main(args: Array<String>) {

src/main/kotlin/spp/cli/util/ExitManager.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ object ExitManager {
4141
fun exitProcess(e: List<Error>): Nothing {
4242
echo(e[0].message, err = true)
4343
if (standalone) exitProcess(-1)
44-
throw Exception(e[0].message)
44+
throw IllegalStateException(e[0].message)
4545
}
4646

4747
private fun echo(

src/test/kotlin/integration/CLIIntegrationTest.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import java.io.OutputStream
2828
import java.io.PrintStream
2929
import kotlin.reflect.KClass
3030

31-
abstract class CLIIntegrationTest {
31+
open class CLIIntegrationTest {
3232
companion object {
3333
init {
3434
ExitManager.standalone = false

0 commit comments

Comments
 (0)