Archive

Author Archive

Creating a command line tool for source code metrics analysis

August 10th, 2011 Comments off

Recently, we have created a console application that parses an entire solution and shows summary information about declared types and the number of members in each type. Let’s tweak it a bit, so it provides more meaningful and useful information, such as a report of Maintenance Complexity (MC) code metric for a solution source code.

Read more…

Navigation between files – Open Files tool window

August 5th, 2011 Comments off

The Open Files CodeRush tool window lists files that are currently opened inside the Visual Studio IDE. The window allows you to quickly switch between files via a single mouse click. This window is similar to the Ctrl+Tab Visual Studio built-in window but has a few advanced options. This is what it looks like:

CodeRush Open Files default view

Read more…

DXCore Services – Synchronization

July 29th, 2011 Comments off

The Synchronization DXCore service provides methods for synchronizing thread code on Visual Studio’s foreground thread. The service is used by the CodeRush Code Issues technology for example.

Read more…

Refactorings and code providers for working with interface declarations

July 29th, 2011 Comments off

Refactor! Pro has many refactorings that are divided into several categories for clarity. One of the categories is Interfaces, where you can see the list of refactorings and code providers that are specific to interface declarations. The category is not as large as others at the moment, however, you might find these refactorings useful.

Read more…

Code Providers – Add to Interface

July 29th, 2011 Comments off

The Add to Interface code provider adds the active member declaration to the specified interface that is implemented by the current type. You can choose the target interface via the sub menu inside the Refactor! popup menu:

Read more…

Refactorings for C++: moving methods to source file and back to the header

July 29th, 2011 Comments off

There are two refactorings specific to the C++ language:

  • Move Method to Source File
  • Move Method to Header

Read more…

Code Issues – Complex Member

July 27th, 2011 Comments off

The Complex Member code issue of the smell type highlights complex members. A complex member is a member that may have too much code inside. The issue is based on a calculation of the Maintenance Complexity code metric. Maintenance complexity is a measure the structural complexity of a node (and its children), and represents how easy or challenging a method will be to understand and maintain. Scores closer to zero are simple. Small methods usually score below 150, while large/complex methods will exceed 500.

Read more…

Code Issues fixes and suppression

July 25th, 2011 2 comments

Code Issues can be easily fixed with the corresponding code fixes. The code fixes are operations that allow you to automatically fix the issue by changing the source code, so the issue is no longer valid for the block of code in question. The code fixes are refactoring or code providers assigned to the code issues as fixes.

There are several ways to fix an issue:

  1. Code Fix hint
  2. Zoom Window
  3. Manually apply a fix

Read more…