CodeRush Ultimate 21.2.5

Released: Dec 15, 2021

21.2.5 버젼 업데이트

기능

File-scoped Namespace Declaration Support for C# 10

  • The following refactorings can now be used in C# projects containing file-scoped namespace declarations:
    • Sync Namespace with Folder Structure.
    • Move File to Folder.
    • Move Type to Namespace.
    • Move Type to File.
    • Declare Partial Class Part.
    • Declare Partial Record Part.
    • Extract Interface.
  • Updated the CodeRush formatting engine to support the new C# 10 namespace declaration style as well as C# 10's new global using directives feature.

Sync Namespace with Folder Structure

  • You can now apply the "Sync Namespace with Folder Structure" action in partial classes and in a copied folder that contains at least one .cs or .vb file. The namespace in copied files will be renamed according to the new files location.

Records and Record Structs Support

  • CodeRush now supports records (for C# 9) and record structs (for C# 10) in the following features:
    • Code Cleanup - You can apply the following code cleanup rules:
      • Remove Unused Types.
      • Apply Visibility Style.
      • Sort Modifiers.
    • Smart Constructor - The Smart Constructor feature now works with positional records.
    • Diagnostics - The Code Issues window can now display the "Unused Type" and "Unused Member" code analysis diagnostics for unused records and record structs.

Caps as a Shortcut Modifier

  • You can now use the Caps Lock key as a shortcut modifier (just like Ctrl, Shift, or Alt) to create shortcut bindings for your favorite CodeRush commands and quickly access a wide range of CodeRush functionality (refactorings, navigation, declarations, and more).
  • This feature also lowers the risk of unintentionally engaging Caps Lock - an accidental tap of the key no longer toggles the Caps Lock state in Microsoft Visual Studio. If you ever do need to toggle Caps Lock on (or off), just quickly tap the Caps key twice.
  • To enable Caps Lock as a modifier: run the Setup Wizard and check the Enable Caps as a Modifier checkbox on the Caps as a Modifier setup page or activate the "Caps as a Modifier" option on the Quick Setup options page.
  • Once you enable "Caps as a Modifier", you can quickly access a number of features that make development faster and easier. For example, you can use Caps+Space to compress to or expand from Implicit/Explicit Declarations, Expression Bodies, Ternary Expressions, Null Coalescing Operations, and Initializers. You can even use Caps+Space to Inline Temporary Variables.
  • To quickly declare a classes, members, and locals, just press Caps+ the First Letter of the desired element to create. For example, press the Caps key along with the letter F to declare a field variable initialized to this parameter.
  • Similarly, Caps+P declares properties, Caps+M declares methods, and Caps+L declares locals (based on an expression entered on a line). Caps+C will declare a class, and Caps+Q will declare constants (consistent with using "q" to create constants in CodeRush templates).
  • The new Caps Lock shortcuts for refactorings and code providers use an enhanced "ExecuteRefactoring" command, which allows you to specify multiple refactorings and code providers (that you want to all bind to a single shortcut), listed in the key binding's Parameters textbox.

Smart Navigation (SmartNav)

  • The new SmartNav feature allows you to quickly navigate between adjacent members, statements, and arguments in C#, Visual Basic, and TypeScript/JavaScript, and also between controls and properties in XAML and XML. To use SmartNav, first enable the "Caps Lock as a Modifier" feature, and use Caps + the Arrow keys.
  • If you add the Shift key to any of the shortcuts (for example, Caps+Shift+Down) you can introduce a smart selection at the landing site. This can be useful for both viewing and changing values for matching properties in XAML.
  • Note that pressing the Shift key is optional after you have created the first selection. If you are using SmartNav and you already have a selection, SmartNav will try to preserve it in the move (so only Caps+arrow key would be needed after a selection was first created with Caps+Shift+arrow key).

The Learning CodeRush Solution

  • This release introduces the "Learning CodeRush Solution" containing interactive lessons to help you learn Caps Lock shortcuts and help you practice new CodeRush features. To open this solution, select the CodeRush | Support | Open Learning CodeRush Solution… menu item or click the big Open Learning CodeRush Solution button on the last page of the Setup Wizard.

New Shortcut Cheat Sheet

  • Following the introduction of Caps as a Modifier and SmartNav, the CodeRush Shortcut Cheat Sheet has been updated.

수정사항

  • Formatting - Classes are incorrectly indented when the C# 10 File Scoped Namespaces feature is used.
  • Formatting - Incorrect formatting when the C# 10 Global Using Directive feature is used.
  • Formatting - The 'Wrap if long or multiline' option incorrectly works in the 'Type Parameters' rule.
  • General - A memory leak occurs when using Jump to Symbol.
  • Options - Checkbox text is not visible on the Editor/C#/Programming Style options page.
  • Options - The template editor's font size is too small if there are no open files.
  • Options - The Training window creates empty items after default colors are changed.
  • Refactorings - "Break Apart Arguments" inserts unnecessary lines and makes code uncompilable.
  • Refactorings - "Extract Interface" creates a sealed interface for a sealed class.
  • Static Code Analysis - The 'Name does not correspond to Naming Conventions' (CRR1000) analyzer does not work.
  • Test Runner - A performance issue occurs when updating tests.
  • Test Runner - Performance issues occur when the layout is switched to flat mode and not all tests are collected.
  • Test Runner - Test Runner crashes if .NET 6 tests run on multi-targeting project layouts.