RaspberryPiFoundation / editor-ui

Code Editor web component
https://editor-static.raspberrypi.org
Apache License 2.0
36 stars 9 forks source link

I want linting for Python code to help me spot check my work #123

Open AnnaKahnRaspPi opened 2 years ago

AnnaKahnRaspPi commented 2 years ago

User story: As a user I want to be able to be able to easily read my code, and check my code for programmatic and stylistic errors So that I can spot any issues, correct them and learn how to improve my code

This issue is to check the requirements against the 3 potential plugs (PyFlakes, PiLint, Pyright (the one used by new Microbit Python Editor) we could use, agree as a Team (yay) which we think fits the needs of our learners the best, and then set it up as a POC that we can demo and refine as needed (the latter under separate tickets as needed).

Proof of Concept may need breaking down if Team deem this too large for 1 ticket.

Key documents:

patch0 commented 2 years ago

CM6 can support a language server:

https://github.com/FurqanSoftware/codemirror-languageserver/

create-issue-branch[bot] commented 2 years ago

Branch issues/123-investigate_in-editor_linting created!

tracygardner commented 2 years ago

When considering linting we should also consider the support that we already have from CodeMirror for matching quotes and brackets. We will draw attention to this in our projects as it's really helpful for debugging basic syntax errors. Any linting related to these issues should integrate nicely with this existing feature. Is anything else like this we can pick up from CodeMirror (indentation markers already covered elsewhere.)