dotnet / dotnet/roslyn

The codefix offering other candidates for wrongly-written identifiers should consider permutations of camelCaseParts

Open
#80,902 0 comments 0 reactions 0 assignees View on GitHub
Area-IDE
Dominant language
C#
Stars
20.7k
Forks
4.3k
PR merge metrics
PR metrics pending

Description

Today I ran into the issue that i wanted to check the `IsParameterModified()` method of a custom type, but had misremembered its name and thus typed `obj.ParameterIsModified()` instead.
which got squiggled, and so i thought that my memory was playing tricks on me and i hadn't written that thing yet and hit ctrl-dot to create that method.
when I F12ed into the file, then, to write the implementation, i saw (because the file wasn't too big) that the `IsParameterModified()` method was already there, so i just deleted that new method stub and fixed the identifier.

I think if the Ctrl-Dot experience that facilitates fixing mistyped identifiers by doing a fuzzy search would offer methods that fit permutations of the camelCaseParts of the word, it would reduce quite a lot of hassle, potentially.

I was asked, over on discord, to file this idea so it can be considered - it didn't match any other issue template, so please excuse me if i chose the wrong one.

Thank you :-)

Contributor guide

Open the contributing guide

Research direction

Start by tracing the Ctrl-Dot codefix flow that performs fuzzy searches for wrongly written identifiers, using the IsParameterModified and ParameterIsModified example as the motivating case. Determine where camelCaseParts are generated and candidates are ranked; done means the experience can surface methods matching permutations without disrupting existing suggestions, with focused coverage for this example.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.