ClassNaming: Don't treat Kotlin syntax ` as part of class name #3977
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This tries to fix #2656. But I find this a bit controversial:
Pros:
`
is not part of the name of a class (or any other entity in the code).Cons:
FunctionNaming
is using this "error" to provide the feature that only allows any type of function name if it uses backticks. That's like that because in the tests we want to allow that kind of naming in the functions.I vote to merge because I think that the one that is wrong is
FunctionNaming
. But fixingFuctionNaming
is not easy. A way to fix it would be to allow multiple instances of the same rule with different configurations. This way we could have an instance that checks FunctionNaming in production code and another for test code.Maybe a solution is to exclude
FunctionNaming
from test source sets and don't allow backtick at all.