Skip to content
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

Improvements to visible whitespace in console output. #953

Closed
belav opened this issue Sep 2, 2023 · 2 comments · Fixed by #954
Closed

Improvements to visible whitespace in console output. #953

belav opened this issue Sep 2, 2023 · 2 comments · Fixed by #954
Labels
Milestone

Comments

@belav
Copy link
Owner

belav commented Sep 2, 2023

When whitespace is made visible in the --check format, it can get noisy.

Can it be changed to only show the whitespace at the beginning and end of the line?

Maybe only show the first couple of differences?

Maybe it is possible to use colors, and make the whitespace character blend into the background more?

@belav belav added this to the 0.26.0 milestone Sep 2, 2023
@belav
Copy link
Owner Author

belav commented Sep 2, 2023

Expanding on the first couple of differences idea - on the line that has the first difference, make whitespace visible from that point until the end of that line, but not visible in any other lines.

@belav
Copy link
Owner Author

belav commented Sep 2, 2023

After testing this out, it didn't really make sense to have whitespace visible except in two cases.

An otherwise empty line has whitespace

----------------------------- Expected: Around Line 4 -----------------------------
    private string field1;

    private string field2;
----------------------------- Actual: Around Line 4 -----------------------------
    private string field1;
····
    private string field2;

A line has extra whitespace at the end.

----------------------------- Expected: Around Line 3 -----------------------------
{
    private string field1;
}
----------------------------- Actual: Around Line 3 -----------------------------
{
    private string field1;····
}

If there is extra whitespace between words, it is obvious without making the whitespace visible.

----------------------------- Expected: Around Line 1 -----------------------------
public class ClassName { }
----------------------------- Actual: Around Line 1 -----------------------------
public class ClassName  { }

@belav belav added type:enhancement New feature or request area:formatting labels Sep 2, 2023
shocklateboy92 added a commit that referenced this issue Sep 3, 2023
…visible (#954)

closes #953

Co-authored-by: Lasath Fernando <devel@lasath.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant