abp icon indicating copy to clipboard operation
abp copied to clipboard

Fixed inconsistent modifier orders in solution

Open beriniwlew opened this issue 3 years ago • 5 comments

beriniwlew avatar Aug 07 '22 09:08 beriniwlew

@maliming we have .editorconfig file. Also, we are using Rider/Resharp that suggest the modifier sorting. Can you try to understand why we have inconsistent usage. Beyond this PR/issue, I also remember that the editor is suggesting to change already true sortings.

hikalkan avatar Aug 07 '22 15:08 hikalkan

Codecov Report

:exclamation: No coverage uploaded for pull request base (dev@6dbf808). Click here to learn what that means. The diff coverage is 81.42%.

@@          Coverage Diff           @@
##             dev   #13591   +/-   ##
======================================
  Coverage       ?   50.08%           
======================================
  Files          ?     3247           
  Lines          ?    97414           
  Branches       ?        0           
======================================
  Hits           ?    48792           
  Misses         ?    48622           
  Partials       ?        0           
Impacted Files Coverage Δ
...tCore/MultiTenancy/FormTenantResolveContributor.cs 75.00% <ø> (ø)
...e/MultiTenancy/HttpTenantResolveContributorBase.cs 63.63% <ø> (ø)
...pNetCore/Mvc/UI/Bundling/Styles/CssRelativePath.cs 0.00% <0.00%> (ø)
...ndling/TagHelpers/AbpBundleItemTagHelperService.cs 0.00% <ø> (ø)
...I/Bundling/TagHelpers/AbpBundleTagHelperService.cs 0.00% <ø> (ø)
...I/Bundling/TagHelpers/AbpTagHelperScriptService.cs 0.00% <ø> (ø)
...UI/Bundling/TagHelpers/AbpTagHelperStyleService.cs 0.00% <ø> (ø)
...ding/MvcUiObjectExtensionPropertyInfoExtensions.cs 0.00% <0.00%> (ø)
...Microsoft/AspNetCore/Http/AbpFormFileExtensions.cs 0.00% <ø> (ø)
...bjectExtending/CachedObjectExtensionsDtoService.cs 18.42% <ø> (ø)
... and 131 more

:mega: Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

codecov[bot] avatar Aug 07 '22 15:08 codecov[bot]

this PR go against rider suggestions Rider/Resharp suggests:

  • override async Task<T> not async override Task<T>
  • public sealed class not sealed public class
  • static async Task not async static Task
  • static readonly not readonly static

rqx110 avatar Aug 08 '22 00:08 rqx110

this PR go against rider suggestions Rider/Resharp suggests:

  • override async Task<T> not async override Task<T>
  • public sealed class not sealed public class
  • static async Task not async static Task
  • static readonly not readonly static

I agree, we should modify .editorconfig#L123.

Exported from Rider:

csharp_preferred_modifier_order = public, private, protected, internal, new, static, abstract, virtual, sealed, readonly, override, extern, unsafe, volatile, async, required:suggestion

roc916 avatar Aug 08 '22 02:08 roc916

This is default Microsoft's order: public, private, protected, internal, static, extern, new, virtual, abstract, sealed, override, readonly, unsafe, volatile, async https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0036#csharp_preferred_modifier_order

enisn avatar Aug 09 '22 07:08 enisn

Do you want me to close this PR? I might not have time to work on this. Perhaps we should create a new issue for it.

beriniwlew avatar Sep 07 '22 22:09 beriniwlew