SourceCode

joined 5 years ago
MODERATOR OF
 

Sometimes, tired of endless code review and debugging, you start wondering if there are ways to make your life easier. After some googling or merely by accident, you stumble upon the phrase, "static analysis". Let's find out what it is and how it can be used in your project.

 

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.

 

Do you like GitLab and don't like bugs? Do you want to improve the quality of your source code? Then you've come to the right place. Today we will tell you how to configure the PVS-Studio C# analyzer for checking merge requests. Enjoy the reading and have a nice unicorn mood.

 

One of the most relevant scenarios for using the PVS-Studio analyzer is its integration into CI systems. Even though a project analysis by PVS-Studio can already be embedded with just a few commands into almost any continuous integration system, we continue to make this process even more convenient. PVS-Studio now supports converting the analyzer output to the TeamCity format-TeamCity Inspections Type. Let's see how it works.

 

2019 was a very busy year in terms of conferences. Our team could leave for whole weeks on business trips. As you know, the conference is perfect time to share knowledge. In addition to giving talks and telling many interesting things at our booth, we also learned a lot from communicating with conference participants and speakers. So at the Joker 2019 conference in fall, a talk from Dalia Abo Sheasha "Migrating beyond Java 8" inspired us to implement a new diagnostic rule that allows us to detect incompatibilities in the Java SE API between different versions of Java. This is what we will talk about.

 

The American company Electronic Arts Inc (EA) has opened the source code of the games Command & Conquer: Tiberian Dawn and Command & Conquer: Red Alert publicly available. Several dozen errors were detected in the source code using the PVS-Studio analyzer, so, please, welcome the continuation of found defects review.

 

When developing the PVS-Studio static analyzer, we try to develop it in various directions. Thus, our team is working on plugins for the IDE (Visual Studio, Rider), improving integration with CI, and so on. Increasing the efficiency of project analysis under Unity is also one of our priority goals. We believe that static analysis will allow programmers using this game engine to improve the quality of their source code and simplify work on any projects. Therefore, we would like to increase the popularity of PVS-Studio among companies that develop under Unity. One of the first steps in implementing this idea was to write annotations for the methods defined in the engine. This allows a developer to control the correctness of the code related to calls of annotated methods.

 

In this UE4 tutorial, we will look over the general process of static analysis of C++ code and then get specific in how this is done.

 

It is easy to try a static code analyzer. But it requires skills to introduce it in the development of an old large project. If the approach is incorrect, the analyzer can add work, slow down development, and demotivate the team. Let's briefly discuss how to properly integrate static analysis into the development process and start using it as part of CI/CD.

 

PVS-Studio is a well-known static code analyzer that allows you to find a lot of tricky errors hidden in the source code. It is now possible to analyze C# projects under Linux and macOS. The tool can also be integrated into the cross-platform IDE from JetBrains - Rider. This article will help you to get acquainted with these features using the example of checking the open source RavenDB project.

 

This article coincides with the beta testing start of PVS-Studio C# for Linux, as well as the plugin for Rider. For such a wonderful reason, we checked the source code of the Nethermind product using these tools. This article will cover some distinguished and, in some cases, funny errors.

 

Static code analysis is a way of debugging that automatically examines source code before it compiles or is run. It does this by comparing the code code to a set of rules or standards. It is a way of automating code reviews and can be used in conjuncture with peer reviews.

Yuri Minaev is working in the PVS-Studio company as one of developers of the C++ static analyzer. His primary responsibility is to keep low-level stuff in order and add new features to the core module. It’s been almost 2 years since he joined the team after about 12 years of IT experience. Apart from that, he periodically gives talks at various conferences – mainly on topics related to static analysis and C++.

PVS-Studio is cross platform, working on Windows, Linux and MacOS 64-bit environments. It can analyze code designed for 32-bit and 64-bit systems as well as embedded ARM platforms. It generates reports that help developers to find and fix bugs before they become a problem.

Keeping a codebase clean and detecting problems before they occur will make your life better as a developer. When you can avoid getting nailed by simple problems, you can think about your software at a higher level, vastly improving your effectiveness as a software developer. It’s not just about avoiding bugs, although that’s important, but about what you can do with the time, money, and attention you save.

view more: ‹ prev next ›