I use .editorconfig
file to define code style rules in my .Net 5 solution. Is it possible to define required class members order in the .editorconfig
? For example, public members should appear before private, non-static members should appear before static and methods before properties.
Is there way to define required class members order in the .editorconfig file?
Asked Answered
I understand that this doesn't directly answer your question since you requested the ability to configure this in .editorconfig
, but you could consider using StyleCop Analyzers, specifically Rule SA1202.
Sadly, it appears that this very helpful library has gone a little stale, with no official release in almost 3 years, as of the time of writing. I would love to see its capabilities merged into .NET Roslyn analyzers, with full .editorconfig
support for configuring rules.
© 2022 - 2024 — McMap. All rights reserved.