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

Deprecate TrailingComma as it's now split in two rules #5423

Merged
merged 2 commits into from Oct 23, 2022

Conversation

cortinico
Copy link
Member

When we bumped KtLint we effectively deprecated a rule TrailingComma, but we never updated the deprecation.properties file for it. Here I'm doing it.

@chao2zhang
Copy link
Member

I think I run into the same problem when adding the rule to deprecation.properties.


* What went wrong:
Execution failed for task ':detekt-generator:verifyGeneratorOutput'.
> The default-detekt-config.yml is not up-to-date. You can execute the generateDocumentation Gradle task to update it and commit the changed files.

It fails the check because these are not deprecated, but rather removed.
I believe we should be fine without update deprecation.properties because TrailingComma is highly visible when our users upgrade to newer versions of detekt

@cortinico
Copy link
Member Author

It fails the check because these are not deprecated, but rather removed.
I believe we should be fine without update deprecation.properties because TrailingComma is highly visible when our users upgrade to newer versions of detekt

Yup you're right. Still it should be possible to give the user an informative message, no?

@BraisGabin
Copy link
Member

Yup you're right. Still it should be possible to give the user an informative message, no?

I would hardcode this inside the generator code. This way it will be added automatically.

@VitalyVPinchuk did this already here:

internal fun writeMigratedRules(): String {
return """
style>ForbiddenPublicDataClass=Rule migrated to `libraries` ruleset plugin
style>LibraryCodeMustSpecifyReturnType=Rule migrated to `libraries` ruleset plugin
style>LibraryEntitiesShouldNotBePublic=Rule migrated to `libraries` ruleset plugin
""".trimIndent()

So it should be as easy as add a new line there.

@BraisGabin BraisGabin merged commit 7697efd into main Oct 23, 2022
@BraisGabin BraisGabin deleted the nc/TrailingComma branch October 23, 2022 09:24
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.

None yet

4 participants