Changed all occurenceas of var
To have a consistent code base I changed all usages of var and changed the editorconfig rule to error.
Do you want this things to be on error in the editorconfig?
Thanks @stefannikolei
I'm into this but we need to make sure two things are in place:
- editorconfig changes need to be made upstream in SharedInfrastructure or else they simply get overwritten on build.
- We need to ensure we are enforcing Target-typed
newexpressions so we're not adding noise.
For example:
RowInterval rows = new RowInterval(yMin, yMax); // ❌
RowInterval rows = new(yMin, yMax); // ✔️
The following rule will require updating to error
csharp_style_implicit_object_creation_when_type_is_apparent = true:warning
In addition, we should add a new rule to enforce collection expressions with the same severity.
I tried to do that. I also Affen some Settins vor Rider. These Look good. Some of the editorconfig settings are not supported in rider. Therefore I could not really test those.
Whe this looks good to you I can go forward and fix the stylecop errors. I always get bitten by the no errors in debug mode...
I tried to do that. I also Affen some Settins vor Rider. These Look good. Some of the editorconfig settings are not supported in rider. Therefore I could not really test those.
Whe this looks good to you I can go forward and fix the stylecop errors. I always get bitten by the no errors in debug mode...
I've merged the changes to the infrastructure repo so you should be good to continue
Some build errors are false positives. A bug fix for StyleCop.Analyzer is already implemented but not yet released. https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/3893
@stefannikolei I've introduced a bunch of conflicts here. Do you want me to fix them or would you have time?
Just let it sit until the StyleCopAnalyzers thing is figured out.
Most changes were made by tooling and not by hand.