diff --git a/ktlint/src/main/kotlin/com/pinterest/ktlint/Main.kt b/ktlint/src/main/kotlin/com/pinterest/ktlint/Main.kt index ca425a2b62..f2772f41e3 100644 --- a/ktlint/src/main/kotlin/com/pinterest/ktlint/Main.kt +++ b/ktlint/src/main/kotlin/com/pinterest/ktlint/Main.kt @@ -241,8 +241,6 @@ class KtlintCommandLine { @Parameters(hidden = true) private var patterns = ArrayList() - private val workDir = File(".").canonicalPath - fun run() { if (apply || applyToProject) { applyToIDEA() diff --git a/ktlint/src/main/kotlin/com/pinterest/ktlint/internal/PrintASTSubCommand.kt b/ktlint/src/main/kotlin/com/pinterest/ktlint/internal/PrintASTSubCommand.kt index ab6e151eb4..94e3ed777f 100644 --- a/ktlint/src/main/kotlin/com/pinterest/ktlint/internal/PrintASTSubCommand.kt +++ b/ktlint/src/main/kotlin/com/pinterest/ktlint/internal/PrintASTSubCommand.kt @@ -66,7 +66,7 @@ internal class PrintASTSubCommand : Runnable { } try { - lintFile(fileName, fileContent, astRuleSet) + lintFile(fileName, fileContent, astRuleSet, debug = ktlintCommand.debug) } catch (e: Exception) { if (e is ParseException) { throw ParseException(e.line, e.col, "Not a valid Kotlin file (${e.message?.toLowerCase()})") @@ -77,6 +77,6 @@ internal class PrintASTSubCommand : Runnable { companion object { internal const val COMMAND_NAME = "printAST" - private const val STDIN_FILE = "" + private const val STDIN_FILE = "" } }