Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In SA1412 (StoreFilesAsUtf8), file encodings are detected as part of the diagnostic. This change updates the reported diagnostics to propagate the name of the detected encoding so it doesn't have to be reevaluated as part of the code fix.
This change is not a perfect fix for #1169, but it improves upon the situation slightly. In order to fix all closed files, you can open a closed file which reported SA1412 and use the Fix All action before the IDE has the chance to recalculate diagnostics for the file. The encoding used for the code fix will be the one used by the analyzer while the file was closed, which will result in fixing all other closed files.