Skip to content

UX: better gitlab reporting - more user-friendly description field#9141

Merged
keradus merged 6 commits intoPHP-CS-Fixer:masterfrom
a-h-abid:feature/description-for-gitlab-reporter
Oct 18, 2025
Merged

UX: better gitlab reporting - more user-friendly description field#9141
keradus merged 6 commits intoPHP-CS-Fixer:masterfrom
a-h-abid:feature/description-for-gitlab-reporter

Conversation

@a-h-abid
Copy link
Copy Markdown
Contributor

The GitLab reporter now outputs the description for each fixer. This will make it better understand the issue in the code-quality panel.

Also remove the about part from description, didn't provided anything useful.

private function registerFixers()
{
$fixerFactory = new FixerFactory();
$fixerFactory->registerBuiltInFixers();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about custom ones?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point mentioned. I'll add the custom ones.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm OK to have it added as separated PR

$report[] = [
'check_name' => 'PHP-CS-Fixer.'.$fixerName,
'description' => 'PHP-CS-Fixer.'.$fixerName.' by '.$about,
'description' => $description,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do not remove the about part

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I will add about part.

How will the description field look like finally? Like this: ??

'description' => 'PHP-CS-Fixer.' . $description . ' by ' . $about,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

try out what it will produce. description is a sentence (or even multiple ones), this proposal will not look good.

maybe sprintf("%.% by %: %", 'PHP-CS-Fixer', $fixerName, $about, $description) ?
or even "%.% by %:\n%" if gitlab allows multi-line ?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, i rethinked it

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member

@keradus keradus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tests missing

@kubawerlos kubawerlos added kind/feature tests required PR does not have tests and it's a blocker for further processing labels Oct 17, 2025
@keradus keradus changed the title feat: Add Fixer description to Gitlab reporter UX: better gitlab reporting - more user-friendly description field Oct 18, 2025
@keradus keradus removed the tests required PR does not have tests and it's a blocker for further processing label Oct 18, 2025
# Conflicts:
#	src/Console/Report/FixReport/GitlabReporter.php
@keradus keradus enabled auto-merge (squash) October 18, 2025 18:43
@coveralls
Copy link
Copy Markdown

Coverage Status

coverage: 94.149% (-0.003%) from 94.152%
when pulling d67c030 on a-h-abid:feature/description-for-gitlab-reporter
into c7b8f8a on PHP-CS-Fixer:master.

@keradus keradus merged commit 141f70d into PHP-CS-Fixer:master Oct 18, 2025
32 checks passed
@keradus
Copy link
Copy Markdown
Member

keradus commented Oct 18, 2025

extended with #9149 and #9152

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants