dotnet / dotnet/roslynator

Implicitly constructed arguments

Open
#1,644 0 comments 0 reactions 0 assignees View on GitHub
Area-Analyzers Feature Request
Dominant language
C#
Stars
3.5k
Forks
294
Avg merge
2h 30m
Merged PRs (30d)
4

Description

```cs
var thing1 = new MyType ("foo", new ArgThing("bar"));
```
can be refactored to with RCS1250
```cs
MyType thing1 = new("foo", new ArgThing("bar"));
```

But I want to take mine further to:
```cs
MyType thing1 = new("foo", new("bar"));
MyType thing2 = FactoryMethod("foo", new("bar"));
```

Can these be added to roslynator for arguments?

Contributor guide

Open the contributing guide

Research direction

The issue names no files or tests; start by examining the existing RCS1250 implementation and how it handles constructor arguments. Determine the scope for implicit argument construction in the assignment and factory-call examples, then add coverage showing both forms are recognized correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.