stoplightio / spectral

A flexible JSON/YAML linter for creating automated style guides, with baked in support for OpenAPI v3.1, v3.0, and v2.0 as well as AsyncAPI v2.x.
https://stoplight.io/spectral
Apache License 2.0
2.43k stars 235 forks source link

feat(formatters): add GitHub Actions formatter #2508

Closed siketyan closed 1 year ago

siketyan commented 1 year ago

This pull requests add a built-in formatter for annotating errors in GitHub Actions.

Spectral already have spectral-action for running Spectral and annotating errors in the workflow. The action creates a new check entry to annotate, but sometimes the annotation is incorrectly attached to another job due to GitHub's bug. To avoid that, it would be great if the Spectral CLI support formatting errors to GitHub Actions format ^1 as a built-in formatter, as same as TeamCity formatter does.

Checklist

Does this PR introduce a breaking change?

Screenshots

N/A

Additional context

N/A

P0lip commented 1 year ago

I'll try to take a look at it this week!

P0lip commented 1 year ago

Could you merge the latest develop branch? it's out of sync with the base branch

siketyan commented 1 year ago

@P0lip merged, sorry for the delay; I was in the dream 💤