Hints, warnings, and errors
Zomis opened this issue · comments
Simon Forsberg commented
Add a way for analysis to show hints, warnings and errors to the user
Errors include:
- Infinite loops (halting problem is unsolvable, but try to detect some basic things)
- Unbalanced brackets
- Code does not produce expected output
Warnings include:
- Each of the possible issues in Program Validation according to standards #12
- Detect if any Brainfuck characters are used within comments, such as writing
This program is awesome.
which includes the BF command.
- Input unused. When you feed more input to the BF program than the program reads.
Hints include:
-
+>+++<++>--<->+>
performs change [2 2] and can be written as++>++>
- While loop always performed X times, consider expanding it (only show this if it would save characters + performance)
- Memory cell(s) unused
- Dead code
Many of these things are already available through some analysis, they just need to be converted to some kind of hint/warning/error object.
Related:
Simon Forsberg commented
Use red, orange, and blue background colors in code for errors, warnings, hints respectively.