CodeRush for Roslyn 17.1.6

コードのフォーマット、解析、スタイル設定機能を改善
7月 26, 2017
新バージョン

機能

Code Formatting

  • Implemented new formatting rules related to wrapping code (and aligning subsequent wrapped lines) for the following language elements (when they exceed the specified margin):
    • Ternary Expression.
    • LINQ Expression.
    • Binary Expression.
    • Assignment Expression.
    • Logical Expression.
    • Parameters.
    • Arguments.
    • Array Initializer.
    • Collection Initializer.
    • Object Initializer.
    • Chained Method Calls.
    • Lambda Expression.
    • Expression Body.
  • These formatting options are applied as part of the Format Document rule, which can be optionally part of Code Cleanup. You can specify which rules are applied on the Code Cleanup options page.
  • You can also bind the FormatDocument command to a shortcut and use it to invoke the Format Document separately from Code Cleanup.

Code Analysis

  • Added several new features to Spell Checker. It is now possible to:
    • Check XML comments ( and 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 for CA1704 and CA1709 issues.
  • Added a new toolbar button to toggle the Spell Checker on and off.

Code Style

  • You can now set your preferred order for member modifiers. CodeRush for Roslyn features maintain it when adding or removing modifiers. For instance, you can set public and private modifiers to be placed before static. This feature is available for C# only, because Visual Studio automatically sorts modifiers in Visual Basic.
  • Now synchronizing Code Style settings with Visual Studio's similar code style settings. The following settings are now synchronized between CodeRush and 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 (going back and changing the CodeRush settings will not alter Visual Studio settings).
  • Added a new Attribute list Code Style & Code Cleanup rule, allowing you to combine two or more attributes when they are applied to a single member.

Refactorings and Code Providers

  • improved the ForEach to Linq refactoring so it generates cleaner code in complex cases. The following Linq functions are now supported by the query generator: Where, Select, Cast, Distinct, FirstOrDefault, LastOrDefault, Aggregate, Any, All, and Count.

Move Member to Region

  • Ported the Move Member to Region feature from CodeRush Classic. You can now create regions and move members among them using a simple GUI. Now simply click a member icon, select Move To Region, and choose the target region.

不具合の修正

  • Code Actions - The "Conditional to Switch" code action is not available for a simple if-statement.
  • Code Analysis - False positive of CRR0025 for lambda expressions.
  • Code Issues - 'Can use Declare' code issue false positive in VB.
  • Code Issues - 'Logical OR expression has opposite operands' false positive.
  • Code Issues - 'This conditional's code block does not appear to be reachable' false positive.
  • CodeAnalysis - The "Error List" window displays errors for designer generated files when the "Check designer files" option is disabled.
  • Formatting - Array initializers are formatted incorrectly.
  • Formatting - Lambda expressions are incorrectly indented.
  • General - The closing 'X' mark should be more visible in the About dialog.
  • General - VS2017 is not visible in task switcher (Alt+Tab) when the CodeRush Options dialog is open.
  • IntelliRush - Breaks the Enter key behavior in VB.
  • IntelliRush - Incorrect expansion when calling the Generic method.
  • Member icons - Visibility changing adds redundant curly braces.
  • Navigation - Tab to Next Reference - Can't find references in "*.Designer.cs" files.
  • Organize Members - The number of empty lines between members is reset when adding a region.
  • Organize Members rule incorrectly formats the "base" call for a constructor.
  • Refactorings - Accept the variable name when using declare local.
  • Refactorings - The "Introduce using statement" refactoring works incorrectly when initializing a variable via a property.
  • Refactorings - The "Update XPO Fields Class" provider removes empty lines.
  • Refactorings - The 'ForEach To Linq' refactoring adds a redundant line break in Visual Basic.
  • Refactorings - The 'Move Type to Namespace' refactoring incorrectly updates the Implements clause in VB.
  • Selection Expand works incorrectly on an enum with XML Doc comments.
  • Templates - "Convert to Property with Change Notification" expansion uses an improper trigger for the PropertyChanged event.
  • Templates - Smart Constructor - Adding a default value to an optional parameter should not change a linked value.
  • Templates - The 't?type?' template expands inside string literals.
  • Test Runner - The output text should be monospaced.
  • XPO Fields - A Visual Studio message about editing a file is shown when saving a document.
New code formatting options in CodeRush for Roslyn.

CodeRush(英語版)

コードの視覚化とすばやいデバッグ

ご質問がありますか?

今すぐ DevExpress ライセンススペシャリストとライブ チャット