What to use for finding as many syntax errors as possible.

Thomas Passin list1 at tompassin.net
Sun Oct 9 12:59:09 EDT 2022


https://stackoverflow.com/questions/4284313/how-can-i-check-the-syntax-of-python-script-without-executing-it

People seemed especially enthusiastic about the one-liner from jmd_dk.

On 10/9/2022 12:17 PM, Peter J. Holzer wrote:
> On 2022-10-09 12:09:17 +0200, Antoon Pardon wrote:
>> I would like a tool that tries to find as many syntax errors as possible in
>> a python file. I know there is the risk of false positives when a tool tries
>> to recover from a syntax error and proceeds but I would prefer that over the
>> current python strategy of quiting after the first syntax error. I just want
>> a tool for syntax errors. No style enforcements. Any recommandations?
> 
> There seems to have been increased interest in good error recovery over
> the last years. I thought I had bookmarked a bunch of projects, but the
> only one I can find right now is Lezer
> (https://marijnhaverbeke.nl/blog/lezer.html) which is part of the
> CodeMirror (https://codemirror.net/) editor. Python is listed as a
> currently supported language, so you might want to check that out.
> 
> Disclaimer: I haven't used CodeMirror, so I can't say anything about
> its quality. The blog entry about Lezer was interesting, though.
> 
>          hp
> 
> 



More information about the Python-list mailing list