belav / csharpier

CSharpier is an opinionated code formatter for c#.
https://csharpier.com
MIT License
1.22k stars 81 forks source link

Extensions should show information when file can't be formatted because it doesn't compile. #1225

Open belav opened 1 month ago

belav commented 1 month ago

When formatting a file that has a compilation error, there is no information logged indicating why it doesn't get formatted. I believe CSharpier doesn't yet return the necessary information. The log shows the same information as if it was actually formatted.


2024-04-12 11:03:43,034 [  50934]   INFO - #c.i.c.CSharpierLogger - Formatting started for C:/projects/beacon/Beacon/GitHelper.cs using CSharpier 0.28.0
2024-04-12 11:03:43,089 [  50989]   INFO - #c.i.c.CSharpierLogger - Formatted in 54ms