Roslyn: Need 'fix-all' for naming style violations.

Created on 4 Nov 2016  路  10Comments  路  Source: dotnet/roslyn

It's just too tedious to have to manually fix up every violation one at a time.

Area-IDE Feature Request

Most helpful comment

I would like both options. One to fixup everything. And one to fix that specific violation.

All 10 comments

Clearing milestone - this is not an RC issue.

Tagging @dpoeschl and @kuhlenh have either of you given any thought to this? Should it just be a blanket "fix all my names everywhere", or should it depend on which rule matched, etc?

@Pilchie -- I believe we were thinking of having a "one-click cleanup" button for this (which would fix all formatting and name/style violations).

I would like both options. One to fixup everything. And one to fix that specific violation.

Same! Almost every event handler I've ever written has been camel case. I'd like a way to update an entire solution. :D

I'm still blowing so much time on fixing these and then running into more.

I would love to help but where do I start?

I've had some thoughts about at least a _partial_ fix all implementation, but haven't completed it yet. For example:

  1. If two code elements that need to be renamed are not visible in each other's scopes, it should be possible to rename both of them in a single operation without conflicts.
  2. If two variables in a shared scope have distinct names before and after the fix, and neither of the fixes applied individually has any conflicts, then it should be possible to rename both of them in a single operation without conflicts.
  3. Rules 1 and 2 should hold for any number of identifiers

I'd be happy to see this implemented too.

Was this page helpful?
0 / 5 - 0 ratings