Примеры использования Diagnostic rules на Английском языке и их переводы на Русский язык
{-}
-
Official
-
Colloquial
The analyzer has 4 types of diagnostic rules.
Offer new diagnostic rules we could implement.
To do this, we add exceptions to the diagnostic rules, i.e.
It's nice to see new diagnostic rules show real results right after we add them to the tool.
That's why the only real way out is to constantly create new diagnostic rules.
We are also ready to implement diagnostic rules relevant to your project.
We are constantly working on its improvement, modifying andadding new diagnostic rules.
In addition, we regularly add new diagnostic rules into PVS-Studio.
When creating diagnostic rules like the V3033, we were debating how relevant they are.
These are not the only suspicious fragments found by the diagnostic rules V3022 and V3063.
The same diagnostic rules may be implemented by independent teams in different tools in a very similar way.
But the most interesting thing is to see how new diagnostic rules work and what errors they can find.
Three new diagnostic rules connected with the use of exceptions inside parallel regions have been added.
After creating the profile(or if you have an existing profile),we should add diagnostic rules to it.
We regularly add new diagnostic rules to enable the search of new bug patterns in applications written in C/C.
Since the first time we checked VirtualBox,we have added more than 50 new diagnostic rules.
We intend to significantly enlarge the base of diagnostic rules soon if we have enough health and luck.
All in all, PVS-Studio generates 574 first-level warnings referring to general analysis diagnostic rules.
We have added new diagnostic rules during this time that helped us to detect new suspicious code fragments.
To get a clearer idea of what they are about and how to fix them,I recommend referring to the documentation on the diagnostic rules.
Every new analyzer's version usually contains new diagnostic rules, which means that you can detect more errors.
Disabling those diagnostic rules that are not relevant to your project, you simplify the further work with the output of the analyzer.
It was done at the same time as PVS-Studio 4.00 was released,which for the first time included diagnostic rules for general analysis.
This time is growing more and more, because new diagnostic rules are appearing- and it is quite convenient for us to write them using STL.
PVS-Studio analyzer is continuously improving, and the C-code analysis moduleis developing most actively: ninety new diagnostic rules were added in 2016.
The sphere of static analysis is actively developing;new diagnostic rules and standards appear regulary, while some rules become obsolete.
Usually, I like starting with a classic error, that is made both in C and C++ projects- an error a== a, which gets detected by V501 and V3001 diagnostic rules.
The reason is that the diagnostic rules were created according to all those articles that do not take into account the peculiarities of the C++ language or processing large data arrays, that exceed 2 GB.
I will also appreciate if you, the readers, will send me samples of interesting errors you found in your own code or somebody else's code,for which we could implement diagnostic rules.
When developing new diagnostic rules, as well as when you change the internal mechanisms of the analyzer, it is always necessary to understand the way these changes affected the quality of analysis.