📜 ⬆️ ⬇️

Explanation of limitations of the demo version of PVS-Studio

PVS-Studio Demo
Restrictions have two goals. The first is to show the potential user as soon as possible that the static analyzer can find errors in its code. The second is to encourage communication with us in the mail to help use the tool correctly. I am sure that this relationship is incomprehensible, so I decided to write this little note.

Restrictions


First, a summary of the existing restrictions. First, a person can study only warnings of the highest level of confidence (High). Secondly, only a limited number of transitions to errors are available to it.

Let's now examine these two limitations and the reasons for which it was required to create them. All the stories I tell are based on real events. The created restrictions are not a marketer's notion, but the result of a long communication with potential users and observations of the process of familiarizing people with PVS-Studio.

Much does not mean useful


The most typical wrong pattern: the programmer immediately sets the warning settings to maximum. This is our biggest pain. They include all types of warnings (general, 64-bit, optimizations), all levels of warnings, some even manage to get to the diagnostics, custom-made, and enable them.
')
PVS-Studio Face Palm


Programmers explain their behavior by wanting to see all the capabilities of the analyzer. It is not right. The right goal is to see that the analyzer can be useful to the project. That is, first of all it is necessary to see that the analyzer finds the real errors in the code. Turning everything to the maximum, the person is drowning in warnings. After reviewing 20-30 uninteresting warnings, a person loses interest. Most likely, this familiarity with the tool will end. If we reduce the set of warnings that he can view, then there is a great chance that he will notice real errors. Then the programmer will have a completely different attitude to the tool. He wants to filter out uninteresting warnings, set up the analyzer for himself, learn how to suppress false positives in macros, and so on.

There is one more thing with a lot of warnings. The programmer may be aware that he is looking at both high-priority and low-priority warnings and is ready to view a large number of messages. The trouble is that he quickly loses attention. Roughly speaking, after reviewing 10 uninteresting warnings, he is more likely to miss the eleventh warning, indicating a serious error.

With the restriction of the level of warnings, I think, sorted out. Now let's talk about the number of transitions for errors.

We rush to the rescue


PVS-Studio to the rescue


When the “clicks” end, the program will offer to fill out a small form with contact details, which we use to ask if we can help. After that, additional “clicks” will be highlighted.

What is the point of contact with us? First, we can issue a temporary key for a more complete study of PVS-Studio. By this moment, the programmer has already become familiar with PVS-Studio, found errors in his code, and now other levels of warnings can be opened for him.

Secondly, which is very important, we can help a person master PVS-Studio. You have no idea how there are many ways to use the tool incorrectly. I will give only a couple of examples.

Someone has a "nasty macro" on which the analyzer generates a lot of meaningless warnings. A person spends all “clicks” following these warnings. After that, our question, “Is everything okay?”, Answers in the spirit:

Awful. How to use such an analyzer at all. I was tortured to waste hundreds of warnings with the number Vxxx.

And we help him by talking about how to suppress warnings in macros, or that, for starters, he can simply turn off this diagnostics.

Another person complains that messages related to third-party libraries are interfering.

We suggest that messages related to libraries can be disabled in two mouse clicks. Indeed, it is 2 clicks.

In both cases, it is important that we suggest how to simplify the work. If there was no communication with us, people would continue to suffer and most likely, they decided not to even start discussing the acquisition of a license.

I am experienced


PVS-Studio kills the bug


It remains to say what to do to people who do not consider themselves to be novices in the field of static analysis tools. It's simple. Contact us and we will give you a temporary key to explore the analyzer.

Source: https://habr.com/ru/post/283046/


All Articles