Skip to content

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

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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