Skip to content

[Feature] Diff output configurable #482

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 13, 2021

Conversation

Jibbarth
Copy link
Collaborator

@Jibbarth Jibbarth commented May 1, 2021

Q A
Bug fix? yes
New feature? yes
Fixed tickets #...

👋

This PR to improve display for diff.

By default, I add 1 line of context around the diff. I also improve the default display by removing some empty lines.

Before:
image

After:
image

But, now, we can configure the diff context around.

In phpinsights.php, add the following line:

<?php

return [
    // ...
    'diff_context' => 3,
]

Output:

image

While testing, I noticed that when configuration file has some invalid options, the output was really ugly:

image

I rework a little this part to improve output when there is an invalid configuration:

image

@Jibbarth Jibbarth force-pushed the feature/diff-context branch from 32fcb32 to ef94781 Compare May 1, 2021 10:20
@Jibbarth
Copy link
Collaborator Author

@50bhan do you want to review this one ?

@Jibbarth Jibbarth added the enhancement New feature or request label May 11, 2021
@50bhan
Copy link
Contributor

50bhan commented May 12, 2021

@Jibbarth LGTM 👍

Thank you for this. The errors on the wrong config options were really annoying 😄

@Jibbarth Jibbarth merged commit dc02c13 into nunomaduro:master May 13, 2021
@Jibbarth Jibbarth deleted the feature/diff-context branch May 13, 2021 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants