Skip to content

Writing summaries to file via option#344

Merged
taylorotwell merged 5 commits into
laravel:mainfrom
Onekone:main
Mar 28, 2025
Merged

Writing summaries to file via option#344
taylorotwell merged 5 commits into
laravel:mainfrom
Onekone:main

Conversation

@Onekone

@Onekone Onekone commented Feb 17, 2025

Copy link
Copy Markdown
Contributor

While using Pint in CI pipelines and Gitlab interface is neat feature*, fact that you have to dump it into file that's not quite human readable (and therefore cannot be read from CI pipeline logs and on non-Ultimate Gitlab instances), is a bit less so

Following PR adds ability to write summaries to a file, potentially in a different format from one used to write the summary to CLI

For example:

$ ./vendor/bin/pint --output-format=gitlab --output-to-file=./codequality.json --test

Outputs result of a scan in Pint's default elaborate printer, while also writing to a file using GitlabReporter

New options are:

  • --output-to-file= - additionally write summary into this file. Using this option requires specifying either --output-format or --format

  • --output-format= - accepts same values as --format, and if not defined, falls back to --format. If neither is defined, file isn't written into

* In theory, it's Gitlab Ultimate feature. We over here using Community version, which does not quite display Code Quality reports in Gitlab interface

@taylorotwell taylorotwell marked this pull request as draft February 19, 2025 20:46
@Onekone Onekone marked this pull request as ready for review March 24, 2025 06:41
@taylorotwell taylorotwell merged commit d436b88 into laravel:main Mar 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants