-
Notifications
You must be signed in to change notification settings - Fork 2
feat: plannedRemoval ktlint rule #136
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
Conversation
| @@ -43,7 +43,7 @@ class DeprecatedApiRule : Rule(RuleId("minor-version-strategy-rules:deprecated-a | |||
| emit( | |||
| node.startOffset, | |||
| "The deprecated API is scheduled for removal, please remove it before releasing the next minor version.", | |||
| true, | |||
| false, | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is to indicate if the rule can be auto-corrected. It should've been false from the beginning.
gradle/libs.versions.toml
Outdated
| smithy-gradle-plugin-version = "1.3.0" | ||
| junit-version = "5.10.1" | ||
| coroutines-version = "1.10.2" | ||
| slf4j = "2.0.17" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
naming: slf4j-version
| import com.pinterest.ktlint.rule.engine.core.api.RuleSetId | ||
|
|
||
| class MinorVersionRuleSetProvider : RuleSetProviderV3(RuleSetId("minor-version-strategy-rules")) { | ||
| internal const val RULE_SET = "minor-version-strategy-rules" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain this RULE_SET refactor?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean the MinorVersionRuleSetProvider one or in general?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general, why do we need it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Every rule ID needs to have a rule-set ID followed by : and then the name of the rule. This is just to stop repeating the rule-set ID so many times.
Issue #, if available:
N/A
Description of changes:
@PlannedRemovalis always accompanied by@DeprecatedBy submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.