ObliviousHarmony / vscode-php-codesniffer

A VS Code extension for integrating PHP_CodeSniffer.
https://marketplace.visualstudio.com/items?itemName=obliviousharmony.vscode-php-codesniffer
Other
38 stars 2 forks source link

Fixed Document Formatter Erasing Content #49

Closed ObliviousHarmony closed 2 years ago

ObliviousHarmony commented 2 years ago

All Submissions:

Changes proposed in this Pull Request:

Since the Format.php report almost always returns content, meaningless edits were being given to VS Code. Since these had no impact on the content, these were ignored and did not trigger a document change. Since we cleared the diagnostics as part of formatting, we end up erasing all of the valid problems that weren't fixed.

Closes #47.

How to test the changes in this Pull Request:

  1. Open a file with unfixable problems.
  2. Run "Format Document" or "Format Selection"
  3. With this pull request, all of the diagnostics will remain. Without it, they are erased.