Skip to content

Conversation

@T-Gro
Copy link
Member

@T-Gro T-Gro commented Apr 13, 2023

The following fixes are now available in bulk document/project/solution mode.
The selection was done subjectively my thinking which kind of diagnostical errors can easily accumulate over a codebase (e.g. after a refactoring, or when updating language version) and where the benefit of a bulk fix exists.

There is no guarantee that other codefixes wouldnt benefit from bulk mode massively as well - if you think of any, let me know and such can be added later as well.

  • Add "new" when creating IDisposable types
  • Changing .[] indexer into dot-less []
  • Removing superflous "_" capture for union case with no data
  • Removing unused binding
  • Renaming unused binding with _
  • Prefixing unused binding with _
  • Renaming parameter names in .fs files to match signature files
  • Name simplification (if namespace/module is open, reducing the FQ path) => the analyzer itself is not working to its full potential now, I am addressing this in a separate PR.

Telemetry reporting in it's previous form would not work for the bulk operation.
The codefixers have explicit telemetry reporting, on the level of 1 event per document in bulk operatios (as opposed to 1 event per each occurrence normally)

@T-Gro T-Gro requested a review from a team as a code owner April 13, 2023 16:42
@T-Gro
Copy link
Member Author

T-Gro commented Apr 13, 2023

/run fantomas

@github-actions
Copy link
Contributor

@psfinaki
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@T-Gro T-Gro merged commit 93c135e into dotnet:main Apr 18, 2023
@T-Gro T-Gro deleted the 14967-bulk-codefixes-are-broken branch April 18, 2023 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants