I'm referring to this question specifically. The OP knows the code as-is doesn't work and is looking for the answer to a specific question.
IMO fixing broken code should be off-topic here.
To be properly reviewed, code should at least pass basic tests, hopefully pass lint, pre-commit hooks and a full test run without known bugs or automated warnings (that'd be a waste of time for everyone involved).
Given the nature of the site, we are bound to meet "HELPMYCODEISBROKEN". I suggest we strictly move those to SO, but this is the easy part.
What happens with "this works, but is there a better way to..."? This could (I believe would) be on topic here, but if the line could be drawn at "coder is done picking options and ready to commit" we'd have an easier time figuring out whether to move stuff.