Archive

Archive for the ‘CodeRush’ Category

CodeRush Code Issues overall list

February 11th, 2011 Comments off

Here is the list of code issues shipped in the latest official version of CodeRush Pro. All issues are categorized by their type. Read more…

CodeRush Code Issues technology overview

February 11th, 2011 Comments off

CodeRush Code Issues technology (also known as Code Analysis) is essentially background static analyzer of the source code. The code is analyzed during code writing and/or reading without compiling or executing the program.

One of the most prominent uses of a static analyzer is for code defect detection. While you’re working in the source code, it will point out the code errors even before it’s compiled, and other specifics that can help improve the overall quality of the source code. This can help you improve your coding practices, and learn new language technics. Static-analysis techniques can also detect buffer overflows, security vulnerabilities, memory leaks, timing anomalies (such as race conditions, deadlocks), dead or unused source code segments, and other common programming mistakes.

Read more…

Code Issues – Redundant Destructor

February 10th, 2011 Comments off

Cause:

Destructors are invoked automatically, and used to destroy instances of classes. The developer has no control over when the destructor is called, because this is determined by the garbage collector. Redundant destructor is a an empty destructor without any code inside, that can be safely removed.

Read more…

Code Issues – Catch block is empty

February 10th, 2011 Comments off

Cause:

This code issue shows a warning when the catch block is empty. Usually empty catch block is a bad idea, because you are silently swallowing an error condition and then continuing an execution of the program, or the program may simply fail for an unknown reason.

In general, when an exception occurs, it can be thrown up to the caller, or it can be caught in a catch block. When catching an exception, it is recommended to inform the user about the problem, or log it for a future review.

Read more…

Working with regions using CodeRush

February 6th, 2011 Comments off

If you heavily use region directives in CSharp, Visual Basic, or C++, the following CodeRush features may help you to make it easier to work with them:

Creating regions:

Read more…

Coding Helpers – Auto Declare

February 4th, 2011 Comments off

Auto Declare allows you to quickly declare a variable (field, local or parameter) based on its type. To apply Auto Declare, type the class name and press the Ctrl+A shortcut. The variable will be declared with an appropriate name, and an action hint will be shown:

CodeRush Auto Declare

Read more…

Coding Helpers – Move to Region

February 3rd, 2011 Comments off

The Move to Region (also known as Member MoverCodeRush feature extends the Member drop down menu with a menu item that allows you to move the active member to a region according to your preference:

CodeRush Member Icons and Move to Region preview

Read more…

Clipboard Tools – Smart Cut and Smart Copy

February 2nd, 2011 Comments off

These CodeRush clipboard features allow you to take an identifier or a block of code, and put it into clipboard without selecting it in advance. Just place the editor text caret at the identifier or at the start or end of a code block and press the copy key (Ctrl+C or Ctrl+Insert) or the cut key (Ctrl+X or Shift+Delete). This makes it easy to use cut and copy operations to move, duplicate or delete contiguous blocks of code, like methods, properties, conditional statements, loops, try/catch/finally blocks, comments, etc without selecting it first.

Read more…