slop/arbitrary-delays
No sleeps outside tests
| Severity | info |
| Tiers | all |
| Stacks | any |
| Scope | root |
| Kind | expr |
| Source | library v0.0.0-20261011205826-ecb4e9b3ffd4 |
| Selected by | fleetlint-slop@0.1.0 |
Requirement
Non-test code does not wait a fixed time for something to happen.
Why
A delay that papers over an ordering problem fails on a slower machine and wastes time on a faster one.
Check
For each item in:
codegrep("nontest", r'\b(sleep|Thread\.sleep|time\.Sleep|Future\.delayed|setTimeout|delay)\s*\(')falseFix
Wait for the event or condition itself; keep real backoff and rate limiting with a comment saying so.
Agent instruction: Report each delay; replace it with waiting on the actual condition where that is evident, and leave deliberate backoff alone.
See: https://fleetlint.org/baseline/#slop
Generated by fleetlint docs from catalog v0.0.0-20261011205826-ecb4e9b3ffd4.