ReSharper Ultimate 2020.1

Null許容型参照の取り扱い方を改善
4月 17, 2020
新バージョン

機能

ReSharper

Dataflow analysis of integer values in C#

  • This version of ReSharper introduces a new type of C# code analysis to track the usage of integer values in your application. This new type of analysis tracks how the values of all int local variables vary, and it verifies the correctness of all common operations on such variables to detect useless or possibly erroneous pieces of code. Namely, it warns you about:
    • Relational/equality operators always giving true or false results.
    • Heuristically unreachable switch cases checking int values.
    • Meaningless arithmetic operations, such as multiplication by 1, addition of 0, etc.
    • Possible int overflows.
    • Possible division by 0.
  • To improve the precision of analysis, this release also added two new JetBrains.Annotations attributes to use with type members and parameters of the int type: [NonNegativeValue] and [ValueRange(from, to)]. These attributes specify how the values of the particular int members can vary in runtime.

C# support

  • This release continues to add more and more support for C# 8 language features. It's refactored a lot under the hood in C# language support to prepare code analysis and other features, such as refactorings and ReSharper Build, to support nullable reference types (NRT). In ReSharper 2020.1, code analysis reports compilation warnings related to nullable reference types and provides quick-fixes for most of them.
  • There are also several new inspections and quick-fixes:
    • To detect redundant type parameter constraints with respect to nullable reference types.
    • To detect and use async overloads of methods when available instead of sync overloads.
    • To use the nameof expression instead of using the typeof(SomeType).Name construction to get the name of the current type.

Performance news

  • This release has tons of changes to the architecture of ReSharper that bring us closer and closer to the goal of running all the core ReSharper features out of the Visual Studio process. All these modifications took place under the hood, so you won’t notice any changes in the UI/UX in the ReSharper 2020.1 release build.

Navigation updates

  • This update brings several small but useful features to Navigation, and they benefit both those who primarily use the mouse and those who primarily use the keyboard to interact with ReSharper:
    • You can now middle-click (click your mouse’s scroll button) to Go to Declaration.
    • Pressing Ctrl+Enter in the result list of Go to File highlights the file in the Solution Explorer window.
    • You can now use a full path in Go To File / Go To Everything to find files.

Improved XAML support

  • v2020.1 makes a lot of improvements and fixes to XAML support that cover WPF, Xamarin.Forms, UWP, and Avalonia XAMLs. It provides much better support for data context inference and symbol resolution in bindings:
    • When d:BindingContext is used
    • In Picker.ItemDisplay in Xamarin.Forms
    • RelativeSource binding in Xamarin.Forms
    • Template binding for the ScrollViewer control
    • When ItemsSource is used as a nested element
  • In TreeView.ItemContainerStyle
    • In UWP projects this release adds support for:
    • Conditional XAML markup
    • CustomResource binding
  • Additional fixes include support for:
    • Using the Uniform Resource Name (URN) in a definition of a custom XML namespaces schema
    • Putting a slash symbol in a resource name
    • x:Static directives for Avalonia

Updates to Unit Testing

  • Starting with ReSharper 2020.1, you can export and import any of your Unit Test Sessions. This allows you to share them with your team, between your computers, or between branches when you change something in the code and want to run/cover the same set of unit tests for both branches.
  • Also, Unit Test Sessions that have already been created are preserved after upgrading to a new major ReSharper version, which is handy if you don’t want to lose opened and locked sessions.

Comments in Localization Manager

  • There are new rows on the grid for Comments. You can now leave a comment (or edit an existing one) for any value that comes from resource files right inside the grid. You can also export and import these comments. If you don’t use comments, or if you don’t need them right now, you can hide them by clicking the “Show/Hide comments” icon.
  • Apart from that, this release implements several performance fixes that make the grid faster to load and filter, eliminate some UI freezes, and make scrolling smoother.
  • It’s also worth mentioning that there are quite a few UX improvements:
    • Improved support for right-to-left languages
    • More precise navigation to specific rows from the text editor and refactoring dialogs
    • Enhanced code completion and validation in the dialogs

Code formatting

  • Code formatting brings new settings for C# Code Styles that cover the trailing comma. They can be found under ReSharper | Options | Code Editing | C# | Code Style | Trailing comma, and they are also compatible with the StyleCop SA1413 inspection except in a very few corner cases.

ReSharper C++

C++20

  • Using enum - ReSharper C++ 2020.1 adds support for using enum declarations, which let you bring specific enumerators from a scoped enumeration into the local scope. A new refactoring, Introduce Using Enum, is available to help you add using enum declarations to existing code.
  • C++20's Concepts - For C++20's Concepts, ReSharper C++ supports the new syntax for constrained type placeholders and abbreviated function templates. Improved error messages about unsatisfied constraints help you understand what went wrong during template substitution.
  • Template syntax for lambdas - ReSharper C++ also suggests a quick-fix for using template syntax for lambdas when doing so helps you avoid errors or unify your use of lambdas and functions.

Unreal Engine

  • ReSharper C++ 2020.1 improves the Rename refactoring in Unreal Engine projects. Now it updates the corresponding *.generated.h include directive and related files with the A, F, E, T, S, and U prefixes.
  • When ReSharper C++ detects an Unreal Engine project, it tweaks the default settings to stop suggesting Use auto to better align with the Unreal Engine guidelines. Also, ReSharper C++ 2020.1 includes updated naming rules for console variables and log categories. You can now navigate to namespaces that contain an enumeration in the Unreal Engine style from Search Everywhere/Go to.
  • Finally, ReSharper C++ now also supports USF files with virtual file paths and SpatialOS GDK.

HLSL (Experimental)

  • ReSharper C++ 2020.1 now provides initial support for HLSL, the High-Level Shading Language. ReSharper C++ highlights HLSL code according to your default color scheme and displays inlay hints and tooltips for code elements with type information and documentation. You can also search for and quickly navigate to structs, functions, or parameters in your entire solution, referenced files, and standard libraries. And to perfect the HLSL experience, ReSharper C++ offers you smart code completion, auto-inserting matching delimiters, and more.

Code analysis

  • Several new inspections are available for the following issues, with corresponding quick-fixes that help you resolve them:
    • Unused lambda capture.
    • Lambda can be rewritten to use explicit template parameters.
    • Functional-style cast used instead of a C++ cast.
    • reinterpret_cast used instead of a static_cast when casting to void*.
  • Two more features help you adopt the C++17 maybe_unused attribute:
    • A quick-fix to add [[maybe_unused]] to an unused parameter or variable.
    • A context action to replace UNREFERENCED_PARAMETER and Q_UNUSED annotations with [[maybe_unused]].
  • The bundled Clang-Tidy binary has been updated to Clang 10, adding more than 70 new checks and compiler diagnostics from the latest LLVM release.

Code completion

  • The completion list now suggests label names, standard C++ attributes, the new std::forward postfix template, and arguments for calls to a base function. Additionally, ReSharper C++ now provides code completion in macro bodies.

Coding assistance

  • Two well-known features from ReSharper for .NET have finally come to ReSharper C++:
    • Rearrange Code quickly moves code elements around, expands or shrinks the current scope, and more.
    • Complete Statement inserts the required syntax elements to finish the current statement and puts the caret in the right place.
  • With improved typing assistance, you can now select any piece of code and type a parenthesis, brace, bracket, or quote to surround the selection with the corresponding characters. The code readability helpers - parameter name hints and type hints - are now available in dependent code.
  • The new Document edit action, bound to Ctrl+/ by default, lets you quickly generate a documentation comment for the nearby code element instead of using the context action.

Enum refactorings

  • ReSharper C++ 2020.1 introduces two new refactorings to help you upgrade your enum usage:
    • Convert to Scoped Enum converts a C-style enumeration declaration into a C++11 scoped enumeration.
    • Introduce Using Enum adds a C++20 using enum declaration and shortens enumerator references to make your code easier to read.

Navigation

  • Code navigation features have been extended to be even handier:
    • Go to Declaration is available on identifiers inside comments.
    • Search Everywhere/Go to includes two new filter categories: concepts and namespaces. Type “/” in the search box to see all the available filters.
    • You can now middle-click (click your mouse’s scroll button) to Go to Declaration.
  • In the File Structure window, the icons now have indicators for class member accessibility, inheritance, and virtual/static/pure specifiers.

Sorting of include directives

  • ReSharper C++ 2019.3 allowed you to sort #include directives, rearrange existing groups, and create new ones separated by blank lines. ReSharper C++ 2020.1 adds two new settings to make this action even more configurable:
    • Case-sensitive sort.
    • Group headers by directory.
  • And it's now possible to import the sorting settings from a .clang-format file if Read code style from .clang-format style is checked on the ReSharper | Options | Code Editing | General Formatter Settings page.

Other changes

  • ReSharper C++ 2020.1 comes with several other noteworthy changes:
    • Generate dialogs provide an option to mark the generated getters and constructors with the C++17 [[nodiscard]] attribute.
    • Generate mock functions support the MOCK_METHOD macro introduced in GTest 1.10.
    • The new setting Use named pipes to communicate with child processes allows you to fix unit tests that are misbehaving because of security software.

dotTrace

Next Important Call

  • Now, you can navigate through Call Tree using the Next Important Call action. Press Ctrl+Shift+Right and dotTrace will navigate you to a node that is most relevant for further analysis (for example, a node with high own execution time).

dotPeek

Support for Nullable Reference Types

  • This release brings better support for C# language features:
    • Support for nullable reference types (NRT) has come to the decompiler. Please note that this only works in declarations, not in the bodies of methods.
    • Added support for decompiling the default members of interfaces and Auto-Implemented Property Field-Targeted attributes.
    • Improved support for decompiling tuple component names.
C# support

ReSharper Ultimate(英語版)

.NET開発の生産性が格段に向上

ご質問がありますか?

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