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), Arazzo v1.0, as well as AsyncAPI v2.x.
https://stoplight.io/spectral
Apache License 2.0
2.48k stars 233 forks source link

Gitlab code quality support #2283

Closed lhimstedt closed 3 weeks ago

lhimstedt commented 2 years ago

User story. As a developer, I can export the results to a Gitlab code quality report to see a summary of my code quality in the MR widget and the pipeline.

Is your feature request related to a problem? Currently, there is only a format enum for JUnit. That's cool because you can see the results in Gitlab, but I prefer linting results in the code quality section. The linting results are more about the quality, not in all cases about functionality.

Describe the solution you'd like It would be cool to have another output format in the CodeClimate JSON format.

lhimstedt commented 2 years ago

I found no related issue, maybe there was a discussion about this. Would be cool to get some other perspectives about this.

mnaumanali94 commented 2 years ago

This would be a very nice addition. Would you be interested in creating a PR for this? 🙏🏼

wtrocki commented 1 year ago

I have done some investigation on how this can be done and it looks there is no easy way to actually get number of results. Results in recent versions have been changed to only contain certain serverity level. By default info level severity is not logged so we would never get any information about how many rules have run in the format interface.

astec-dsa commented 1 year ago

Would be nice to get this feature.

smsalisbury commented 1 month ago

The PR linked above will resolve this issue.

stoplight-bot commented 2 weeks ago

:tada: This issue has been resolved in version 1.4.0 :tada:

The release is available on @stoplight/spectral-formatters-1.4.0

Your semantic-release bot :package::rocket: