开发者

NDepend Code Quality Metrics - Custom CQL - Brownfield development

开发者 https://www.devze.com 2022-12-20 07:29 出处:网络
I\'m working on a brown-field project that was initially developed for .NET 1.1, and subsequently was retro-fitted to .NET 2.0, with a smattering of .NET 3.5

I'm working on a brown-field project that was initially developed for .NET 1.1, and subsequently was retro-fitted to .NET 2.0, with a smattering of .NET 3.5

I'm curious what kind of metrics to use to begin finding optimization and modernization inflection points.

Ar开发者_开发百科e there any good CQL queries that anyone has found useful in cleaning up and refactoring 'legacy' .NET code?


NDepend now supports code rule over LINQ query (CQLinq) that is much more more powerful and flexible than CQL (still supported).

What really matters is what kind of refactoring make a code cleaner, according to you. Dozens of new code rules are provided but the real strength is that it has never been easier to write your own code convention and rule.

Here are 5 conventions worth to follow according to me:

  • Types that used to be 100% covered but not anymore
  • Types with disposable instance fields must be disposable
  • Avoid namespaces dependency cycles
  • UI layer shouldn't use directly DB types
  • API Breaking Changes: Methods

I wrote more about my preferences here:

Fighting Fabricated Complexity

Top 5 development practices you should care for

0

精彩评论

暂无评论...
验证码 换一张
取 消