Closed tobiasdiez closed 6 months ago
@tobiasdiez -- any interest in contributing this? That'd be welcomed
@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.
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! ]
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.
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.
Never mind, looks like this was already dealt with in https://github.com/ChartBoost/ruff-action/pull/9. I think we can close this issue now.
@tobiasdiez -- did https://github.com/ChartBoost/ruff-action/pull/9 address this, seems OK to close?
Yes! Thanks @WieeRd
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.