Hacker News new | ask | show | jobs
by yongjik 679 days ago
Not just that, but they also wrote the numbers in decimal - they didn't even want them in the code as an example of what not to do.

Maybe someone was having too much fun and got carried away, but what an odd sense of humor.

2 comments

> 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).

It'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.
But it's clippy, you can just annotate it with an #[allow(problematic_constants)]
It’s not humor.

It’s religion for the irreligious.