A discussion is taking place about creating a bot to remind users to format their code/logs/configs properly in Discourse. Mark_Walkom suggests a bot that can post a friendly reminder once per topic, while codinghorror proposes blocking the post until the user formats their code correctly.
codinghorror mentions that there are existing discussions about such a plugin, and sam points to the “Unformatted Code Detector theme component” built by lionel-rowe as a possible solution. Mark_Walkom prefers the bot approach to avoid cluttering the topic with moderation tasks. codinghorror argues that it’s better to nudge users to format their posts before submission, citing experience from Stack Overflow. lionel-rowe invites feedback on the theme component, acknowledging it may not have perfect coverage.
Home Assistant have a banner, which is nice. But easily dismissible. A bot seems like a more engaging way to remind people, but there may need to be limits around it so it only posts once per topic (for eg).
I dunno if anyone has thought of this, but it’d be pretty rad if this existed, and I don’t have the skills to upgrade it to do this
Wouldn’t it be more effective to block the post until such time as the user fixes it and formats their code? Why clutter the topic with back and forth when you can fix it at the source? There’s several discussions here about such a plugin.
Your mileage will vary here cause it depends on regexes and may have false positives / negatives, but I am sure it could be a reasonable starting point if you have a pathological issue.
I don’t think it makes sense to clutter topics with a lot of generic auto-replies. It’s better to nudge the user to properly format their post before it can be submitted.
Trust me, I spent years dealing with this at Stack Overflow.
Yes indeed! @Mark_Walkom If you or your users spot any false negatives/positives per your use case, bug reports are always welcome (though it won’t ever have perfect coverage).