Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support ktlint 0.45-0.48 #620

Merged
merged 1 commit into from
Jan 27, 2023

Conversation

wakingrufus
Copy link
Collaborator

@wakingrufus wakingrufus commented Jan 12, 2023

support ktlint 0.46-0.48
add tests for 0.44 and 0.45 as well
This resolves #589
This resolves #607

@@ -100,8 +100,8 @@ class TestProject(
}

companion object {
const val CLEAN_SOURCES_FILE = "src/main/kotlin/clean-source.kt"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this now fails lint as an "unfixable" error so we need to change these

}
} catch (e: ParseException) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ParseException was changed to KtLintParseException, so this will catch either one

@cyb3rko
Copy link

cyb3rko commented Jan 12, 2023

Thank you 🚀 , would be awesome it this would get merged and work.

Copy link
Owner

@JLLeitschuh JLLeitschuh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly just some access modifier changes requested

cb: (LintError, Boolean) -> Unit
): com.pinterest.ktlint.core.KtLint.ExperimentalParams {
val script = !file.name.endsWith(".kt", ignoreCase = true)
val editorConfigOverride = userDataToEditorConfigOverride(userData)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Store this in a local lazy variable. It doesn't need to be created for every file

add tests for 0.44 and 0.45 as well
This resolves JLLeitschuh#589
This resolves JLLeitschuh#607
Copy link
Owner

@JLLeitschuh JLLeitschuh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@JLLeitschuh JLLeitschuh merged commit e2548f2 into JLLeitschuh:master Jan 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ktlint 0.47.x breaks plugin The plugin does not work when using Ktlint 0.46.0
3 participants