Skip to content

helpful error message if parser crashes (e.g. due to syntax changes from future python version) #304

Open
@jakkdl

Description

@jakkdl

Trying to run the linter on py<3.11 on code using except* crashes noisily with a SyntaxError. While fairly easy to figure out what went wrong we could wrap ast.parse in a try: except SyntaxError and print a somewhat more helpful message, and continue analyzing the other files.
And ofc if a file straight up has syntax errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureuser-facing improvement not directly related to a rule

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions