Xavalon / XamlStyler

Visual Studio extension to help format your XAML source code
Apache License 2.0
1.21k stars 130 forks source link

Format on Save touches files without changes #395

Open grochocki opened 2 years ago

grochocki commented 2 years ago

Describe the bug

I noticed some things

  • this also happens in VS 2019 when you hit Ctrl+Shift+S to save the whole solution
  • but only after activating the first XAML file (having a XAML file open already when loading the solution but not activating it isn't enough)
  • saving will "modify" all unchanged, unopened XAML files
  • saving will "unmodify" the active XAML file
  • saving will not change an opened XAML file, no matter if currently "modified" or not according to the UI
  • the byte content of the "modified" and "unmodified" files match
  • their SHA256 hashes (using PowerShell's Get-FileHash) match
  • using "git status" says "no modifications"

Expected behavior No file changes, and no git modified files.

Additional context Reported in #289 and fixed in XamlStyler.Console in #379