naming as per other rule naming convention? Like for when we want to warn against casting to nullable type we say that rule as
CastToNullableType
. So shouldn't the name of
DontDowncastCollectionTypes
be
DowncastToCollectionTypes
?
b
Brais Gabin
04/21/2023, 2:33 PM
We lack of a guideline or convention for name our rules. Now that we are taking more seriously 2.0 it would be good to have one.
Brais Gabin
04/21/2023, 2:33 PM
If someone wants to write something and research how other static analysis tools do it would be great.
g
gammax
04/21/2023, 3:30 PM
So true :(
s
schalkms
04/21/2023, 6:06 PM
I think it would be good to have a naming guide. However, Priority is kind of low. As long as new rules have a sound name and describe the intention of the rule, detekt's shipped rulesets are fine, IMHO.
a
Atul Gupta
04/21/2023, 7:17 PM
Sometimes inconsistent name hides the actual intention of the rule especially for someone who is much more familiar with the rules and creates a mental mode of rule name to implementation. But I agree to @Brais Gabin that it would require a deep thought to it