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
L047 allows enforcing consistency of use of COUNT(*) or COUNT(1).
However some teams use COUNT(0) instead of either. Personally COUNT(1) has always made more sense to me, but that's by the by as sometimes you have to swallow your own preferences to follow team style.
So I would like to add the option to be able to enforce COUNT(0). I could see this being done in two ways:
The easiest would be to add a prefer_count_0 flag similar to prefer_count_1, and then decide a precedence if both are set (I'd suggest prefer_count_1 for backwards compatibility).
Perhaps a cleaner way (in terms of config anyway) would be to to change this to a prefer_count="1" option, that could also be set to "0", though that would be a breaking change (unless you supported both - in which case you might as well just go with the first option).
Any thoughts on this?
Happy to tackle this one myself btw.
The text was updated successfully, but these errors were encountered:
L047 allows enforcing consistency of use of
COUNT(*)
orCOUNT(1)
.However some teams use
COUNT(0)
instead of either. PersonallyCOUNT(1)
has always made more sense to me, but that's by the by as sometimes you have to swallow your own preferences to follow team style.So I would like to add the option to be able to enforce
COUNT(0)
. I could see this being done in two ways:prefer_count_0
flag similar toprefer_count_1
, and then decide a precedence if both are set (I'd suggestprefer_count_1
for backwards compatibility).prefer_count="1"
option, that could also be set to"0"
, though that would be a breaking change (unless you supported both - in which case you might as well just go with the first option).Any thoughts on this?
Happy to tackle this one myself btw.
The text was updated successfully, but these errors were encountered: