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
While for remainder with 1 there is the modulo_one lint, a remainder with -1 is only caught by the integer_arithmetic lint, which is disabled by default (playground). The issue has been discussed briefly in #663 but not resolved.
As there are only two possible outcomes when calculating the remainder with -1 (overflow/panic or 0), this should definitely be linted in my opinion. I suggest modifying the modulo_one lint to also be triggered by -1 (potentially with a different warning).
The text was updated successfully, but these errors were encountered:
While for remainder with 1 there is the modulo_one lint, a remainder with -1 is only caught by the integer_arithmetic lint, which is disabled by default (playground). The issue has been discussed briefly in #663 but not resolved.
As there are only two possible outcomes when calculating the remainder with -1 (overflow/panic or 0), this should definitely be linted in my opinion. I suggest modifying the modulo_one lint to also be triggered by -1 (potentially with a different warning).
The text was updated successfully, but these errors were encountered: