"Future function" — a better name for look-ahead, and a checklist
I have started calling look-ahead bias a future function instead, because the blunter name works better. "Bias" sounds like a tendency you correct for; "function" names it as a defect in the code. You can say "that's a future function" and the discussion ends.
The named patterns I now check for, in the order I've caught myself:
1. Selecting on today's close and buying at today's close. The most common one, and it always backtests beautifully.
2. Using a completed bar's values while the bar is still forming. The bar you're standing in doesn't have a close yet.
3. Any indicator computed over a window that extends past the decision point, a centred moving average is the classic.
4. Ranking a universe using end-of-period data and then trading the period.
5. Data that was revised after the fact. The value you have today is not the value that existed then.
Number 5 is the sneaky one because nothing in your code looks wrong.