MLH-Fellowship / pyre-check

Performant type-checking for python.
https://pyre-check.org/
MIT License
3 stars 1 forks source link

[Fall 2021] Step 3: Add support for --output=sarif to pyre #50

Closed r0rshark closed 3 years ago

r0rshark commented 3 years ago

https://github.com/facebook/pyre-check/pull/427 added support for surfacing type errors inline on github through a script that takes the output of pyre --output=json and converts it into SARIF (https://github.com/microsoft/sarif-tutorials), the file format GitHub understands. Ideally there should be an easier way for projects to set up the integration by just running pyre --output=sarif. This task is about adding that support to pyre.

References: GitHub CI setup and script generating SARIF format: https://github.com/facebook/pyre-check/pull/427
Pyre printing logic: https://github.com/MLH-Fellowship/pyre-check/blob/master/client/error.py#L244

abishekvashok commented 3 years ago

I got this :)

0xedward commented 3 years ago

Still working out Github Marketplace set up internally for this. We should be able to land @abishekvashok's PR after that

abishekvashok commented 3 years ago

@0xedward I am sorry, but I saw the other issue now and was wondering as to why we need a repo for this? I am asking cause I believe we need a repo for the pysa action but are we creating an action for pyre as well? (In addition to pysa?)

I guess this issue was intended for pyre so that we could have sarif output natively rather than use a script for the GitHub actions in the pyre check repository.

0xedward commented 3 years ago

@abishekvashok Oh, sorry, just saw this now!

I am asking cause I believe we need a repo for the pysa action but are we creating an action for pyre as well?

Yep, that's the plan! :)

I guess this issue was intended for pyre so that we could have sarif output natively rather than use a script for the GitHub actions in the pyre check repository.

Ah, that's right! I commented about the Github action for Pyre here, since that was the original goal to add --output=sarif to Pyre, but we can create a separate issue for the Pyre github action.

I'll check to see what is going on with the PR and if there's anything blocking it

abishekvashok commented 3 years ago

Hey @0xedward it's okay - I figured it out from yesterday's 1:1, it's an old comment.