Skip to content

pyright_to_rdjson.py - KeyError: 'rule' #13

@chadsr

Description

@chadsr

Hi, I was hoping to test out this action, but there seems to be an issue in pyright_to_rdjson.py regarding a KeyError. I'm guessing the output format from pyright has changed slightly?

I may find the time in the next week or so to look into it, but if you already know how to solve it, some help/input would be appreciated!

Example stacktrace:

  Searching for source files
  Found 10 source files
  Traceback (most recent call last):
    File "/home/runner/work/_actions/jordemort/action-pyright/v1/pyright_to_rdjson.py", line 44, in <module>
      print(pyright_to_rdjson(sys.stdin))
    File "/home/runner/work/_actions/jordemort/action-pyright/v1/pyright_to_rdjson.py", line 22, in pyright_to_rdjson
      "message": f"{d['message']} ({d['rule']})",
  KeyError: 'rule'
  reviewdog: parse error: failed to unmarshal rdjson (DiagnosticResult): proto: syntax error (line 1:1): unexpected token 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions