010-68421378
sales@cogitosoft.com
Your location:Home>News Center >Industry News

WHAT′S NEW IN RESHARPER C++

latest update:2018/04/26 Views:1127
WHATS NEW IN RESHARPER C++ ReSharper C++ 2018.1 comes with two major new features: Debug Step Filters which lets you avo...

WHAT′S NEW IN RESHARPER C++

ReSharper C++ 2018.1 comes with two major new features: Debug Step Filters which lets you avoid stepping into specific functions during debugging, and Includes Analyzer which helps you with investigating the dependencies between the header files that affect compilation time. The rest of the highlights include a redesigned Go to File Member dialog, new code inspections, and a command-line tool to perform code cleanup.

 

ReSharper C++ 2018.1

Debug Step Filters

Step Filters is the latest addition to the host of features provided byReSharper C++ for debugging. When you invoke Step Into, the Visual Studio debugger will normally step into all the functions that are called from the current statement. However, some of the functions are either trivial or so well tested, that you don’t want to step into them. This is where Step Filters comes in: with this feature you can specify functions that should always be stepped over by the debugger.

ReSharper C++ comes with a predefined collection of step filters for the standard library, but you can always add new ones:

You can inspect, configure, disable or enable back step filters on the Tools | Debugging | C++ options page, which has a list of all the available step filters.

When you step into a function and decide that you want to step over it in the future, you can use a context action to quickly add this function to the list of step filters. For template functions, there are separate context actions to add either only the current instantiation of the function or all its instantiations.

To learn more, see Step Filters in ReSharper C++.

 

 

Includes Analyzer

Compilation times are one of the biggest problems in large real-world C++ projects. ReSharper C++ 2018.1 introduces the Includes Analyzer, a new code inspection tool which helps you gauge which header files in your project contribute the most in terms of lines of code to the total compilation workload. To use it, invoke one of the ReSharper | Inspect | Analyze Includes in … actions or select Analyze Includes from the context menu in the Solution Explorer.ReSharper C++ will analyze the files in the given scope and give a report in a dedicated tool window.

The report lists files sorted by the number of lines of code they contribute together with their transitively included files. You can then dig into dependencies between the files either with the Includees tree view where child nodes correspond to the files that include the file in the parent node, or the Includerstree view where child nodes are the included files. Using these two views, you should be able to pinpoint the header files that contribute the most and then try to get rid of any unnecessary #include directives.

 

 

Navigation improvements

The Go to File Member dialog has been redesigned. Class members are now grouped by their containing class in the results list. Moreover, with no search, active file members are sorted in the order of their declarations, and the scrolling list with the results accommodates more items. Together these changes improve the usability of the dialog by providing clearer insight into the structure of the current file.

In all Go to dialogs and several other places ReSharper C++ now attempts to shorten symbol names that are excessively long by cutting out the function and template parameters.

When you perform a search using the Recent Files dialog, Go to File search results are also appended to the results list after the Recent File items.

Finally, the option to remember the last search in the Search Everywhere dialog is now on by default. You can revert to the old behavior through the Environment | Search & Navigation | Remember last search setting.

 

 

Command-line code cleanup

ReSharper Command Line Tools, a free standalone collection of tools that can be used from the command line or as a part of the continuous integration process, now lets you perform code cleanup in C++ projects. Run cleanupcode.x86.exe on your solution, and it will automatically reformat your code, remove common redundancies, apply Clang-Tidy fix-its and common code style fixes. This instantly eliminates code style violations in a project or a solution, and ensures a uniform code base.

In related news, bogus errors which were output by the InspectCode tool on x64 projects were fixed in this release. In addition, TeamCity 2018.1 is able to run InspectCode on C++ projects (see TW-48978 for details).

 

 

Code inspections

ReSharper C++ adds the following new built-in inspections:

New inspection (with a corresponding fix and a code cleanup item) that suggests replacing if statements with if constexpr statements when the condition is a compile-time constant expression.

A set of inspections to diagnose usages of deleted functions.

Control flow and usage checking inspections have been updated to work inside lambda bodies.

 

 

More ways to configure inspection severities

In ReSharper С++ 2018.1, .editorconfig files can now be used to set inspection severities for any scope: the entire solution, a project, or even a specific file. Besides this, inspection severity settings can be read from the project’s DotSettings file. It means that different projects can have different sets of enabled/disabled inspections or different inspection severities.

Check the Read settings from EditorConfig and project settings option on theCode Inspection | Settings | General options page to enable this feature.

 

 

Clang-Tidy integration updates

Clang-Tidy integration has received a few enhancements:

Bundled Clang-Tidy has been updated to version 6.0, which brings several new checks.

A new inspection action lets you disable a specific Clang-Tidy check in the current line by its name.

When the Clang-Tidy executable crashes, no system error dialogs will be shown from now on.

 

 

Other improvements

Other changes to ReSharper C++ include the following:

The #include_next preprocessor directive is now supported, for better compatibility with compilers that implement this GNU extension.

Typing assistance in C++ files automatically removes trailing whitespaces onEnter in order to keep your code clean of redundant whitespaces.

If you select an expression and open the Quick Documentation window, it will show various information about the selected expression, such as its type, value, and value category.

The new Tools | Unit Testing | C++ Tests | Use command-line arguments …setting controls whether ReSharper C++ should use the value of theDebugging | Local Windows Debugger | Command Arguments project property when running unit tests.

Performance of the completion pop-up has been improved.

 

Next:dotCover 2018.1: Better continuous testing and more!
Prev:WHAT'S NEW IN DATAGRIP 2018.1

© Copyright 2000-2023  COGITO SOFTWARE CO.,LTD. All rights reserved