question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

dotnet format makes no changes, but --check reports encoding issues

See original GitHub issue

After upgrading to the latest release of this package, version 3.2.107702, when I ran dotnet format for the first time it modified the encoding of some files. After that, running dotnet format makes no changes, but when I run dotnet format --check --dry-run it returns a non zero exit code and prints and message about the encoding of almost every file in my project.

MyProject/Whatever.cs(1,1): Fix file encoding.

When I run with or without the check flags, it prints a message saying it formatted every file in my project, which is also new, but nothing has changed, at least that git can detect.

Formatted code file 'Whatever.cs'.

I am using the editorconfig option charset = utf-8, and have observed this issue on MacOS and linux.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
JoeRobichcommented, Feb 13, 2020

@schmitch I just published 3.3.111304 to NuGet. Thanks for using dotnet-format!

0reactions
schmitchcommented, Feb 13, 2020

@JoeRobich will there be a new 3.2 release soon? I accidently installed the latest dotnet-format on our ci servers and needed to downgrade the tool afterwards since we use dotnet-format --check their, which failed because of this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

dotnet format command - .NET CLI
Verifies that no formatting changes would be performed. Terminates with a non zero exit code if any files would have been formatted. --include...
Read more >
Editorconfig setting end_of_line = crlf not respected for " ...
Execute “File -> Save As” and select the pulldown to see the encoding of the file. It reports “UTF-8 without signature”. Changed the...
Read more >
Correctly reading encoded text with the StreamReader in .NET
I think the best solution is to change the encoding type of the original document to be Unicode or UTF-8, rather than ANSI...
Read more >
How to set standard encoding in Visual Studio
Click the "Encoding" drop-down list box, drag the scroll bar to the top, and select "Unicode (UTF-8 with signature) - Codepage 65001". Click...
Read more >
Fix common formatting issues for custom parameters
1. Prepare the custom parameters (also called key/values) you'd like to send to Google Ads. · 2. Append the string to pixel's URL...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found