-
-
Notifications
You must be signed in to change notification settings - Fork 99
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
Errors for invalid formatting use weird characters for spacing #947
Comments
CSharpier uses the following so that you can visually see the whitespace when code isn't formatted private static string? MakeWhiteSpaceVisible(string? value)
{
return value?.Replace(' ', '·').Replace('\t', '→');
} The goal is to make it obvious if the reason it failed the check is due to whitespace differences. A failure due to extra whitespace like below isn't obvious if you can't see it. public class ClassName
{
····private string field1;
····
····private string field2;
} Where are you seeing this output? CSharpier is writing on stdout using UTF8 encoding. |
I'm seeing this both in GH Actions, as well as locally in Rider's integrated terminal. Here's the link to the actions job where you can see it: https://github.com/Tyrrrz/YoutubeExplode/actions/runs/6026195051/job/16349413554 May be relevant, |
A bit related but slightly off-topic, may I suggest displaying the space indicator characters only for indentation (i.e. before the first non-whitespace character)? It gets a bit noisy when it's in the middle of the line (e.g. |
CSharpier appears to use
┬╖┬╖┬╖┬╖┬╖┬╖┬╖┬╖
characters to space out the code snippets in the terminal:It makes the error quite hard to parse visually, and I don't think this is the intended behavior. Any idea why this may be happening?
The text was updated successfully, but these errors were encountered: