Skip to content
This repository has been archived by the owner on Oct 9, 2024. It is now read-only.

Add problem matcher #7

Closed
tobiasdiez opened this issue Oct 23, 2023 · 8 comments
Closed

Add problem matcher #7

tobiasdiez opened this issue Oct 23, 2023 · 8 comments

Comments

@tobiasdiez
Copy link

tobiasdiez commented Oct 23, 2023

With problem matchers, errors are directly shown in the diff. Would be nice if the action could integrate them directly.

See https://github.com/home-assistant/core/blob/dev/.github/workflows/matchers/ruff.json and the slightly improved https://github.com/sagemath/sage/blob/fd04e63981e1377a5cd7d3d54a48dff543d637c0/.github/workflows/ruff-problem-matcher.json for an example.

@brucearctor
Copy link
Contributor

@tobiasdiez -- any interest in contributing this? That'd be welcomed

@tobiasdiez
Copy link
Author

@brucearctor Interest yes, but I don't have the time right now to read into how github actions work/are developed. But let me know if you want me to help with implementing/testing the actual problem matchers.

@brucearctor
Copy link
Contributor

Cool -- this isn't something I can prioritize as work anytime soon... But, seems quite interesting, so perhaps something for me on night/weekend [ though also, contributions/collaborations welcomed from anyone! ]

@WieeRd
Copy link

WieeRd commented Jan 11, 2024

There is no need for a problem matcher!

Ruff already provides --output-format option/flag, which can be set to "github".
This will produce an output compatible with GitHub's workflow command for creating annotations.

name: Ruff
on: [push, pull_request]
jobs:
  ruff:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: chartboost/ruff-action@v1
        with:
          args: check --output-format github

This is all I've got in my workflow, and it does show annotations in the CI run details tab.

@WieeRd
Copy link

WieeRd commented Jan 11, 2024

I think it makes sense for this to be the default behavior if args: input is not given.
I'll return with a PR shortly after.

@WieeRd
Copy link

WieeRd commented Jan 11, 2024

Never mind, looks like this was already dealt with in #9.
I think we can close this issue now.

@brucearctor
Copy link
Contributor

@tobiasdiez -- did #9 address this, seems OK to close?

@tobiasdiez
Copy link
Author

Yes! Thanks @WieeRd

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants