CodeRush for Roslyn, Version 17.1.6, is Available

This month’s release of CodeRush for Roslyn adds new code formatting options, expands the capabilities of the source code spell checker, improves the ForEach to Linq refactoring, and ports over a useful organizational feature from CodeRush Classic.

New Code Wrapping Rules

New formatting rules let you specify exactly how you would like to align code when it needs to wrap across multiple lines. Just specify the right margin column, and then decide what to wrap and how those wrapped lines will line up.


Check out the before & after previews in the screenshot above to get a sense of how cool this is.

This is a great feature, and an easy way to improve the code readability. You can create custom wrapping rules for a wide range of expressions and initializers.

Formatting options are applied through the Format Document rule, which can be included as part of CodeRush’s Code Cleanup feature. You can specify which rules to apply on the Code Cleanup options page:


Spell Checker

The CodeRush Spell Checker gets an update. In this release we can now:

  • Check XML comments (<c> and <code> tags are ignored).
  • Check File Names.
  • Exclude ToString() expressions.
  • Properly handle Microsoft.Naming suppressions. The Spell Checker now ignores words suppressed using the SuppressMessage attribute.

We have also added a new toolbar button to toggle the Spell Checker on and off.


Code Style

Now you can set your preferred order for member modifiers keywords (“static”, “public”, “virtual”, etc.). CodeRush for Roslyn features will maintain this order when adding or removing modifiers. For instance, you can set public and private modifiers to be placed before the static modifier. This feature is available for C# only, as Visual Studio automatically sorts modifiers in Visual Basic.

We are also synchronizing the following Code Style settings with similar code style settings found in Visual Studio:

  • Local Declaration Style
  • Built-in Type Names
  • this/Me Qualifier Usage

If you change any of these settings in Visual Studio, the corresponding settings in CodeRush will be updated to match your changes. If you subsequently change the CodeRush settings, that will not alter the Visual Studio settings.

And we have added the new Attribute List Code Style & Code Cleanup rule, allowing you to combine two or more attributes when they are applied to a single member.


See the before & after previews in the screenshot above to see an example.

Improved Refactoring

We have improved the ForEach to Linq refactoring so it generates cleaner code in more complex cases. The following Linq functions are now nicely supported by the query generator:

  • Aggregate
  • All
  • Any
  • Cast
  • Count
  • Distinct
  • FirstOrDefault
  • LastOrDefault
  • Select
  • Where

Move Member to Region

We have ported the Move Member to Region feature from CodeRush Classic. You can now create regions and move members to them easily. Simply click a member icon, select Move To Region and choose the target region.


Thanks For Your Support!

You can always download CodeRush for Roslyn from the Visual Studio Marketplace.

If you’re already using CodeRush for Roslyn and enjoying it, please share a review with other Visual Studio developers!

Free DevExpress Products - Get Your Copy Today

The following free DevExpress product offers remain available. Should you have any questions about the free offers below, please submit a ticket via the DevExpress Support Center at your convenience. We'll be happy to follow-up.
No Comments

Please login or register to post comments.