-
Notifications
You must be signed in to change notification settings - Fork 175
Description
Hello!
I'm exploring the ktlint-gradle plugin codebase to better understand its behavior and how to incorporate the Gradle Problems API integration.
I've notice that the additionalEditorconfigFile property in BaseKtlintCheckTask.kt is marked as deprecated:
@get:Internal
@get:Deprecated("ktlint no longer supports this parameter")
internal abstract val additionalEditorconfigFile: RegularFilePropertyand it is being used in the getEditorConfigFiles function in PluginUtil.kt:
internal fun getEditorConfigFiles(
currentProjectDir: Path,
additionalEditorconfigFile: RegularFileProperty
): Set<Path> {
val result = mutableSetOf<Path>()
searchEditorConfigFiles(
currentProjectDir,
result
)
if (additionalEditorconfigFile.isPresent) {
result.add(
additionalEditorconfigFile.asFile.get().toPath()
)
}
return result
}Despite being marked as deprecated with the message "ktlint no longer supports this parameter", the code still uses the property in getEditoryConfigFiles to construct a result. This creates some inconsistency and can lead to unexpected confusion for users. To improve maintainability of the plugin and clarity, what are your thoughts on removing the additionalEditorconfigFile property and the check in getEditorConfigFiles.
Thank you for your time!
-Vanessa