-
-
Notifications
You must be signed in to change notification settings - Fork 129
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
XamlStyler.Console changes file without... changes #289
Comments
Thanks for the bug report! Have you tried running this with the passive flag (-p)? Could you share the exact command you are running? |
When I use the -p flag, then no files are written, but that's off course because of the fact that passive means you just check without modifications. |
Ah, gotcha -- yea, we should not be writing anything on format if there are no changes. |
@stefandevo @grochocki could it be that xstyler changes line endings in a file? For example, the original file could be using LF but after running xstyler it changes to CRLF, which git considers to be different. |
I noticed some things
|
I find the behaviour on Ctrl+Shift+S problematic. XAML Styler formats then all the files in the solution, not those that need saving. Is there a way to work around that? |
It'd also be handy if XAML Styler Console returned a status code where This would help with CI validation of style enforcement by knowing if XAML Styler actually performed any work or not easily without having to check file statuses after the fact. |
…will be unchanged. Modifies the log message to add an "(unmodified)" next to "Finished Processing" message to distinguish any files modified or not.
Describe the bug
When I run the XamlStyler.Console dotnet tool on a folder, it processes all files, makes no change, because everything is OK, but changes the file in such a way that git adds modified file but without changes.
To Reproduce
Run the tool on a folder that is already formatted correctly.
Expected behavior
No file changes, and no git modified files.
The text was updated successfully, but these errors were encountered: