Giter Site home page Giter Site logo

action-pyright's Introduction

action-pyright's People

Contributors

chadsr avatar dependabot[bot] avatar gersmann avatar github-actions[bot] avatar haya14busa avatar jkostolansky avatar jordemort avatar jsoref avatar megos avatar mgrachev avatar mihailpozarski avatar p-siriphanthong avatar renovate-bot avatar shogo82148 avatar tagoro9 avatar yokinist avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

action-pyright's Issues

pyright installation installs all node dependencies

The action runs npm install pyright here (or similar when specific pyright version is specified). This means all node dependencies are installed as well if package.json exists in the repo as well. I don't think it's necessary and it slows down the check significantly.

It might be better to use npx/npm exec to install and run directly in one command.

Add some tests

It'd be nice to have some unit tests for pyright_to_rdjson.py

Action does not respect the reviewdog error level

The action produces error comments even when level: warning is set:

- name: pyright
  uses: jordemort/action-pyright@v1
  with:
    github_token: ${{ secrets.github_token }}
    reporter: github-pr-check
    level: warning
    filter_mode: diff_context
    lib: true

It would be great if the highest error level is reduced to the level specified in the action config.

Comments are off by 1 line

It seems like comments are generally off by 1 line, e.g.
image

This affects all test comments I have generated.

Action not catching obvious errors, and moving on

Hello!

I'm not even sure where to begin with this bug report.

I believe I have either misunderstood how to set up this action, or it will not catch obvious errors.

I noticed it during this run, where the Type Coverage step passed successfully, however there were numerous type errors relating to return type were completely missed.
My action specification at the time looked like this, which should have inherited from the pyproject.toml file outlined here.

I have managed to manually install node, and run pyright in an actual to verify that it will actually return these results, this can be viewed here in the "Run Pyright" step.

Could you please let me know if this is an issue with you, or me? I very much like and appreciate the features you offer.

pyright_to_rdjson.py - KeyError: 'rule'

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 

Fails with 'Broken pipe'

Setup this action using a default config of:

    - uses: jordemort/action-pyright@v1
      with:
        github_token: ${{ secrets.GITHUB_TOKEN }} # You need this
        reporter: github-pr-review

This gives me this output when running the action:

  Traceback (most recent call last):
    File "/home/runner/work/_actions/jordemort/action-pyright/v1/pyright_to_rdjson.py", line 52, in <module>
      print(pyright_to_rdjson(sys.stdin))
  BrokenPipeError: [Errno 32] Broken pipe
  Error: Process completed with exit code 1.

Do you have any clue as to what could be going on here?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.