-
-
Notifications
You must be signed in to change notification settings - Fork 278
Open
Description
Hi,
I would like to contribute to the project and add a few things that I miss.
The first thing I would like to add a setting to RCS0053. The setting will force to put closing bracket on a new line.
It might affect RCS0027 or requires a new formatter.
Examples:
diagnostic
void M(
object x,
object y, object z)
{
}
fix
void M(
object x,
object y,
object z
)
{
}
diagnostic
if (x &&
y &&
z)
{
}
fix
if (
x
&& y
&& z
)
{
}
The second thing I would like to add is a diagnostic and fix to make code structurally honest. What structural honesty means described here
Examples:
diagnostic
Dictionary<string, NewItemType> itemDictionary = state.Where(item => item.Name != null)
.Select(item => new NewItemType()
{
Name = item.Name
})
.ToDictionary(item =>
{
string key = item.Name;
...
return key;
},
item => item,StringComparer.Ordinal);
fix
Dictionary<string, NewItemType> itemDictionary =
state
.Where(item => item.Name != null)
.Select(
item =>
new NewItemType()
{
Name = item.Name
}
)
.ToDictionary(
item =>
{
string key = item.Name;
...
return key;
},
item => item,
StringComparer.Ordinal
);
Please advise.
Reactions are currently unavailable