3 ms·
> wrote the numbers in decimal Maybe they just didn't want the checker to flag itself. I remember there was a similar check inside Google, where any file cont
by omoikane 2y ago
> wrote the numbers in decimal
Maybe they just didn't want the checker to flag itself.
I remember there was a similar check inside Google, where any file containing the words "DO NOT SUBMIT" will cause the presubmit check to fail. Naturally the presubmit checker needs to look for that string, but it couldn't trivially include the string as-is because that would prevent the presubmit checker from being submitted.
(Motivation for something like this is that if you inserted some extra logging statements or similar for debugging, you would add "DO NOT SUBMIT" in nearby comments, so that you will remember to remove them later).
- 8n4vidtmkvmk 2y agoIt's also fun if you want to include that string in a template file so that users of the template don't forget to fill in the template before submitting.
- 3836293648 2y agoBut it's clippy, you can just annotate it with an #[allow(problematic_constants)]