dodona-edu / dodona

🧑‍💻 Learn to code for secondary and higher education
https://dodona.be
MIT License
71 stars 23 forks source link

Client-side processing of annotations sometimes eats code #4920

Closed chvp closed 1 year ago

chvp commented 1 year ago

See e.g. https://dodona.be/nl/submissions/14682928/. On line 19 there is an else. This can also be seen in the raw HTML returned from the server. This else is however not visible in the code view and also can't be found with "Inspect element".

chvp commented 1 year ago

Did some more investigating. An error happens when an annotation's starting column is past the end of the line (which happens with a missing :, because it is expected after the else).

pdawyndt commented 1 year ago

Current fix seems to have an unwanted side effect. Missing semicolons that used to be indicates with an anchor after the last character on the line are now indicates by underlining the entire line. This conflicts with how it was intended by the linter and how the linting messages are displayed in most editors, and it gives much more clutter in displaying code with lots of missing semicolons.

image

Example: submission

chvp commented 1 year ago

This was done by design (see the first line of the description of the fixing PR). There's no concept of "past the end of the line" in our code view, so I opted to let it signify "there's a problem on this line".