Mark Miller

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.

17.1.6-Wrapping

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:

17.1.6-wrapping-cleanup

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.

17.1.6-SpellChecker

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.

17.1.6-AttributeList

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.

17.1.6-MoveToRegion

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!

Published Jul 25 2017, 05:22 PM by
Bookmark and Share

Comments

No Comments

About Mark Miller (DevExpress)

Mark Miller is a C# MVP with strong expertise in decoupled design, plug-in architectures, and great UI. Mark is Chief Architect of the IDE Tools division at Developer Express, and is the visionary force behind productivity tools like CodeRush and Refactor!, as well as the DXCore extensibility layer for Visual Studio. Mark is a popular speaker at conferences around the world and has been writing software for over two decades.
LIVE CHAT

Chat is one of the many ways you can contact members of the DevExpress Team.
We are available Monday-Friday between 7:30am and 4:30pm Pacific Time.

If you need additional product information, write to us at info@devexpress.com or call us at +1 (818) 844-3383

FOLLOW US

DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether using WPF, ASP.NET, WinForms, HTML5 or Windows 10, DevExpress tools help you build and deliver your best in the shortest time possible.

Copyright © 1998-2017 Developer Express Inc.
All trademarks or registered trademarks are property of their respective owners