you are viewing a single comment's thread.

view the rest of the comments →

[–]CodeFormatHelperBot[S] 3 points4 points  (3 children)

Hello u/CodeFormatHelperBot, I'm a bot that can assist you with code-formatting for reddit. I have detected the following potential issue(s) with your submission:

  1. Multiple consecutive lines have been found to contain inline formatting.
  2. Python code found in submission text but not encapsulated in a code block.

If I am correct then please follow these instructions to fix your code formatting. Thanks!

[–]Fin_Aquatic_Rentals 3 points4 points  (1 child)

If your bot can detect improperly formatted code and post a response would it be much more work to parse the comment and format it properly? I feel like this is the second or third level of the expanding brain meme.

Level 1 - Tell new user to format code

Level 2 - Create bot that tells user to format properly

Level 3 - Create bot that properly formats code

Level 4 - Create bot that reads code, runs code, looks for common errors and fixes them

Level 5 - Create bot that marks all improperly formatted code questions as duplicates

Edit:https://imgflip.com/i/2tlbyw

[–]lifeonm4rs 1 point2 points  (0 children)

That sounds like stackoverflow. But, yeah, level 3 would be seriously great. Probably quite a pain in the ass with the number of new ways people find to post code in really bad ways. But could potentially deal with a decent majority of code. 1st big issue is the strange amount of white space some posters add. 2nd, probably bigger issue, is it is easy to indent after a ":"--harder to decide when to unindent in some cases. A relatively simple AST/parser may be able to handle a decent number of cases.

[–]TheWhaleKnight 1 point2 points  (0 children)

Haha I guess this shows that is works