Product News

ReSharper C++ 2020.2: Unreal Engine Project Model, Improved C++/CLI Support, and More

ReSharper C++ 2020.2 is released!

ReSharper C++ 2020.2: Unreal Engine Project Model, Improved C++/CLI Support, and More

by Elvira Mustafina

From the article:

  • Unreal Engine: support for the Unreal Engine project model, better conformance to the Unreal Engine coding standard, and new inspections.
  • C++/CLI: improved interoperability between C++/CLI and C#, extended navigation and search features, and inspections for C++/CLI-specific keywords.
  • Code analysis: preview for Clang-Tidy fixes, improved support for constexpr functions, and highlighting for misspelled preprocessor directives.
  • Code completion: auto-generated lambda argument for std::function, and import completion can now add forward class declarations.
  • Navigation and search: Go to declaration for unresolved identifiers, hidden preprocessor directives in File Structure, and faster Find Usages.
  • Code style and formatting: new settings for multiline ternary, single-line style comments, and sorting of include directives.
  • File templates: new Source file and Header file templates.

CLion 2020.2 release: Makefile projects, C++20, enhanced static analysis, and doctest support

CLion 2020.2 is released!

CLion 2020.2: Makefile Projects, C++20, Enhanced Code analysis, Doctest, and Other Unit Testing Support Improvements

by Anastasia Kazakova

From the article:

CLion 2020.2 covers a wider variety of C and C++ projects and makes modern C++ coding easier. Here are the highlights:

  • Project models
    • Initial support for Makefile projects
    • CMake upgrade to 3.17
  • C++20 standard compliance
    • Code completion for C++20 keywords
    • Code completion in designated initializers
    • Support for the explicit(bool) construct in name hints, navigation, and refactorings
    • Range-based for loops with the init statement are now supported
  • Code analysis
    • A new inspection to constrain a function's result
    • Dangling pointer check
    • A more accurate Simplify inspection
    • Check for a loop condition that is never updated
    • New Inspection Widget and new Problems View
  • Support for Doctest, and improved integration with Catch2 and Google Test 1.10
  • Automatic creation of code coverage profiles
  • PlatformIO plugin enhancements
  • VCS:
    • Git installed in WSL2
    • A more helpful GitHub Pull Requests View
  • Performance improvements

DeepEnds 3.5: Make public members private

workflow.pngCycleRouter Ltd has released version 3.5 of their DeepEnds dependency analysis tool. A highlight:

Report and/or automatically rewrite public members that should be private

From the release announcement:

DeepEnds includes other dependency analysis tools to analyse coupling and cohesion, delete redundant code and

identify classes to extracted from C code. It parses C++, C# and Visual Basic source code.

The software is free to use until the end of August and will now install successfully via NuGet.

PVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agents

Static code analysis is most effective when changing a project, as errors are always more difficult to fix in the future than at an early stage. We continue expanding the options for using PVS-Studio in continuous development systems. This time, we'll show you how to configure pull request analysis using self-hosted agents in Microsoft Azure DevOps, using the example of the Minetest game.

PVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agents

by Alexey Govorov

From the article:

The result is a build system based on MSBuild for C++, with Chocolatey for installing PVS-Studio, CMake, and Git. Vcpkg is built for convenient management of the libraries that the project depends on. Also, we have to download the latest version of the Azure Pipelines Agent. To initialize the agent from the ENTRYPOINT Docker file, the PowerShell script 'entrypoint.ps1' is called, to which you need to add the URL of the project's "organization", the token of the agent pool, and the PVS-Studio license parameters....


 

 

Initial Support For C++20 Ranges--Casey Carter

Ready to try them?

Initial Support For C++20 Ranges

by Casey Carter

From the article:

We are happy to announce that Visual Studio 2019 version 16.6 contains the first user-visible pieces of C++20 Ranges support. We’ve been working on support machinery for a few releases now, but in this release the tip of the iceberg has finally broken the surface of the water and there are now some tools available for users. The Ranges implementation critically depends on C++ Concepts, and as such is usable with both MSVC and Clang in their C++20 Preview modes but not yet well-supported by IntelliSense. (Don’t worry, we’ll have proper IntelliSense support soon.)...

C++20 Features and Fixes in VS 2019 16.1 through 16.6--Stephan T. Lavavej

Did you get up to date?

C++20 Features and Fixes in VS 2019 16.1 through 16.6

by Stephan T. Lavavej

From the article:

We’ve been busy implementing C++20 features in MSVC’s compiler and Standard Library, and migrating the latter to microsoft/STL on GitHub – in fact, we’ve been so busy that we haven’t posted a C++ toolset changelog since the VS 2019 16.0 toolset changelog. So, here are the compiler features and STL features/fixes that have shipped for production use in the last year.

As a reminder, the /std:c++17 and /std:c++latest compiler options are necessary to use C++17 and C++20 features...

PVS-Studio is now in Compiler Explorer!

Now you can quickly and easily analyze the code for errors right on the godbolt.org site (Compiler Explorer). This feature opens up a large number of new possibilities – from quenching curiosity about the analyzer's abilities to being able to quickly share check results with a friend. Caution – GIFs!

PVS-Studio is now in Compiler Explorer

by George Gribkov

From the article:

If you want to see the output of your program, you can open the execution window by clicking "Add new... - > Execution only" in the code editor (not in the compiler window). In the gif below, you can see the output of the lab work taken from our page about free usage of PVS-Studio by students and teachers.

SonarQube / SonarCloud Improved Analysis -- Alexandre Gigleux

With recent releases SonarQube and SonarCloud offer expanded compiler support and additional security-related rules.

Improved C/C++ analysis

By Alexandre Gigleux

From the article:

There are tons of C/C++ compilers out there and we always get many requests by many users about additional compilers support. We listened and added the support of 10+ compilers to allow more developers to benefit from our C/C++ rules.

We want to help C/C++ developers to deliver code in production without vulnerabilities and more precisely we want to avoid buffer overflow to be exploited by hackers. This is why we implemented 4 rules looking at APIs that could be badly used and that open the door to buffer overflow attacks

 

ModernCppStarter & PVS-Studio Static Code Analyzer

One of the ways to improve software quality is to check source code with static analysis tools. This section explains how to use the PVS-Studio analyzer to check projects built on ModernCppStarter. We provide a free license for open-source projects.

ModernCppStarter & PVS-Studio Static Code Analyzer

by PVS-Studio Team

From the article:

plog-converter will convert the report into the errorfile format (similar to GCC's messages), which can be conveniently viewed in a terminal window and the IDE. You can also have the report converted to an HTML file by using the -t fullhtml flag. Use the flags -a and -d to filter diagnostics. Run the plog-converter --help command to view the full list of available options.