From 4f4e945adb68e7937c48cacc0a21b3ff8d731c3c Mon Sep 17 00:00:00 2001 From: Svyatoslav Chatchenko Date: Wed, 27 Dec 2017 15:11:12 +0100 Subject: [PATCH] Use EnvironmentConfigFiles.JVM_CONFIG_FILES instead of EnvironmentConfigFiles.EMPTY Because EMPTY is removed in 1.2.20 This is copy-paste of similar changes from Kotlin itself https://github.com/JetBrains/kotlin/commit/afc9d3ef8b5bd4f2db44823f4eb62c3ce7d5dfd1#diff-0326941c85afd979faa6998b7b95bff8R55 fixes #131 --- .../src/main/kotlin/com/github/shyiko/ktlint/core/KtLint.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ktlint-core/src/main/kotlin/com/github/shyiko/ktlint/core/KtLint.kt b/ktlint-core/src/main/kotlin/com/github/shyiko/ktlint/core/KtLint.kt index e93031d45a..ba70cd9080 100644 --- a/ktlint-core/src/main/kotlin/com/github/shyiko/ktlint/core/KtLint.kt +++ b/ktlint-core/src/main/kotlin/com/github/shyiko/ktlint/core/KtLint.kt @@ -49,7 +49,7 @@ object KtLint { } DiagnosticLogger.setFactory(LoggerFactory::class.java) val project = KotlinCoreEnvironment.createForProduction(Disposable {}, - CompilerConfiguration(), EnvironmentConfigFiles.EMPTY).project + CompilerConfiguration(), EnvironmentConfigFiles.JVM_CONFIG_FILES).project // everything below (up to PsiFileFactory.getInstance(...)) is to get AST mutations (`ktlint -F ...`) working // otherwise it's not needed val pomModel: PomModel = object : UserDataHolderBase(), PomModel {