You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rule discouraged-comment-location intended to make implementation of rules easier as certain 'unusual' comment locations do not have to be taken into account as they will have been blocked before those rules.
Disabling the rule however also forces users to disable other rules as well (for example see #2338). With the number of rules and the number of locations which are forbidden, this becomes more and more a useability problem for certain users. Disabling the discourages-comment-location rule for a specific type of comment location has the effect that all rules that depend on that rule have to be disabled as well.
Preferably a rule can handle comments in any possible location. If that for some reason is not possible, the comment location has to be blocked in that rule itself so that the rule does not need to depend on the discouraged-comment-location rule. Once, all ktlint rules have been migrated, the rule can not be removed until ktlint 2.x as other rule sets might depend on the rule.
The text was updated successfully, but these errors were encountered:
Rule
discouraged-comment-location
intended to make implementation of rules easier as certain 'unusual' comment locations do not have to be taken into account as they will have been blocked before those rules.Disabling the rule however also forces users to disable other rules as well (for example see #2338). With the number of rules and the number of locations which are forbidden, this becomes more and more a useability problem for certain users. Disabling the
discourages-comment-location
rule for a specific type of comment location has the effect that all rules that depend on that rule have to be disabled as well.Preferably a rule can handle comments in any possible location. If that for some reason is not possible, the comment location has to be blocked in that rule itself so that the rule does not need to depend on the
discouraged-comment-location
rule. Once, all ktlint rules have been migrated, the rule can not be removed until ktlint 2.x as other rule sets might depend on the rule.The text was updated successfully, but these errors were encountered: