Closed bkoelman closed 6 years ago
Sure. I think the Framework Guidelines are the best fit.
Would be nice if we can also remove one...
Another one, which is new in C# 7.3 (released recently):
Prefer:
(DateTime StartTime, TimeSpan Duration) tuple1 = GetTimeRange();
(DateTime StartTime, TimeSpan Duration) tuple2 = GetTimeRange();
if (tuple1 == tuple2) ...
rather than:
if (tuple1.StartTime == tuple2.StartTime && tuple1.Duration == tuple2.Duration) ...
Would be nice if we can also remove one...
How about merging these with AV2201?
If I had to pick one to remove, it would be AV2215. AssemblyInfo is not so relevant anymore since we have NuGet. Assembly version info is usually auto-filled by cibuild tools these days. And AssemblyInfo is auto-generated when using the new project file format (PackageVersion, PackageAuthor etc).
Another candidate to remove could be AV2205:
- Use Pascal casing in resource keys.
Can be moved to/near the casing table of AV1702
- Provide descriptive identifiers rather than short ones. Keep them concise where possible, but don't sacrifice readability.
- Use only alphanumeric characters in naming resources.
I haven't been working with localized applications in the last years, but these apply to most identifiers I would say.
How about merging these with AV2201?
That one is only about type aliases, so it needs something else.
If I had to pick one to remove, it would be AV2215.
Agreed
Another candidate to remove could be AV2205:
Agreed
How about this for a new rule? AV1526 or AV2201: Prefer language syntax over explicit calls to underlying implementations
Prefer:
rather than:
Prefer:
rather than:
Prefer:
rather than:
Prefer:
rather than: