Pull to refresh
583
22
Андрей Карпов @Andrey2008

Директор по маркетингу

Send message

Обидно за мнения про статические анализаторы кода

Reading time2 min
Views11K
Инструменты статического анализа кода ушли далеко вперёд. Это вовсе не те "линтеры", которые активно применялись 20 лет тому назад. Однако многие по-прежнему относятся к ним как к очень простым инструментам. Обидно. Обидно как за методологию анализа кода в целом, так и за инструмент PVS-Studio.


Читать дальше →
Total votes 67: ↑56 and ↓11+45
Comments90

Upsetting Opinions about Static Analyzers

Reading time2 min
Views1.3K
Static analysis tools have advanced far over the time they've been around. They no longer resemble the "linters" that were in active use 20 years ago. But some programmers still view them as extremely primitive tools. And that's very sad. It hurts to see the static analysis methodology in general and our PVS-Studio analyzer in particular treated that way.

Read more →
Total votes 3: ↑3 and ↓0+3
Comments0

Почему важно проводить статический анализ открытых библиотек, которые вы добавляете в свой проект

Reading time8 min
Views2.5K
PVS-Studio and Awesome header-only C++ libraries

Современные приложения строятся из сторонних библиотек как из кирпичиков. Это нормально и единственный вариант завершить проект за разумное время, потратив разумный бюджет. Тем не менее брать все кирпичи без разбора может оказаться не такой уж хорошей идеей. Если есть несколько вариантов, то полезно уделить время анализу открытых библиотек с целью выбрать наиболее качественную.
Читать дальше →
Total votes 14: ↑12 and ↓2+10
Comments2

Why it is important to apply static analysis for open libraries that you add to your project

Reading time7 min
Views827
PVS-Studio and Awesome header-only C++ libraries

Modern applications are built from third-party libraries like a wall from bricks. Their usage is the only option to complete the project in a reasonable time, spending a sensible budget, so it's a usual practice. However, taking all the bricks indiscriminately may not be such a good idea. If there are several options, it is useful to take time to analyze open libraries in order to choose the best one.
Read more →
Total votes 1: ↑0 and ↓1-1
Comments1

Почему обзоры кода — это хорошо, но недостаточно

Reading time3 min
Views2.6K
image1.png

Обзоры кода однозначно нужны и полезны. Это возможность передать знания, обучение, контроль выполнения задачи, улучшение качества и оформления кода, исправление ошибок. Причем можно замечать высокоуровневые ошибки, связанные с используемой архитектурой и алгоритмами. В общем всё хорошо, но люди быстро устают. Поэтому статический анализ великолепно дополняет обзоры и помогает выявлять разнообразнейшие неприметные на глаз ошибки и опечатки. Рассмотрим хороший пример на эту тему.
Читать дальше →
Total votes 11: ↑9 and ↓2+7
Comments11

Why code reviews are good, but not enough

Reading time3 min
Views902
image1.png

Code reviews are definitely necessary and useful. It's a way to impart knowledge, educate, control a task, improve code quality and formatting, fix bugs. Moreover, you can notice high-level errors related to the architecture and algorithms used. So it's a must-have practice, except that people get tired quickly. Therefore, static analysis perfectly complements reviews and helps to detect a variety of inconspicuous errors and typos. Let's look at a decent example on this topic.
Read more →
Rating0
Comments0

Статический анализ кода коллекции библиотек PMDK от Intel и ошибки, которые не ошибки

Reading time14 min
Views2.1K
PVS-Studio, PMDK

Нам предложили проверить с помощью анализатора PVS-Studio коллекцию открытых библиотек PMDK, предназначенную для разработки и отладки приложений с поддержкой энергонезависимой памяти. Собственно, почему бы и нет. Тем более это небольшой проект на языке C и C++ с общим размером кодовой базы около 170 KLOC, если не считать комментарии. А значит, обзор результатов анализа не займёт много сил и времени. Let's go.
Читать дальше →
Total votes 9: ↑8 and ↓1+7
Comments4

Static code analysis of the PMDK library collection by Intel and errors that are not actual errors

Reading time14 min
Views763
PVS-Studio, PMDK

We were asked to check a collection of open source PMDK libraries for developing and debugging applications with NVRAM support by PVS-Studio. Well, why not? Moreover, this is a small project in C and C++ with a total code base size of about 170 KLOC without comments. Which means, the results review won't take much energy and time. Let's go.
Read more →
Total votes 2: ↑2 and ↓0+2
Comments1

Как внедрить статический анализатор кода в legacy проект и не демотивировать команду

Reading time9 min
Views4.8K

PVS-Studio охраняет сон программиста

Попробовать статический анализатор кода легко. А вот, чтобы внедрить его, особенно в разработку большого старого проекта, потребуется умение. При неправильном подходе анализатор может добавить работы, замедлить разработку и демотивировать команду. Давайте кратко поговорим, как правильно подойти к интеграции статического анализа в процесс разработки и начать его использовать как часть CI/CD.
Читать дальше →
Total votes 16: ↑15 and ↓1+14
Comments5

How to introduce a static code analyzer in a legacy project and not to discourage the team

Reading time8 min
Views1.6K


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.
Read more →
Total votes 1: ↑1 and ↓0+1
Comments0

Проверка компилятора GCC 10 с помощью PVS-Studio

Reading time9 min
Views8.8K

PVS-Studio vs GCC 10

Компилятор GCC написан с обильным использованием макросов. Очередная проверка кода GCC с помощью PVS-Studio вновь подтверждает мнение нашей команды, что макросы – это плохо. В таком коде тяжело разбираться не только статическому анализатору, но и программисту. Конечно, разработчики GCC уже привыкли к проекту и хорошо разбираются в нём. Но со стороны очень сложно что-то понять. Собственно, из-за макросов и не удалось полноценно выполнить проверку кода. Тем не менее, анализатор PVS-Studio, как всегда, показал, что может находить ошибки даже в компиляторах.
Читать дальше →
Total votes 37: ↑34 and ↓3+31
Comments27

Checking the GCC 10 Compiler with PVS-Studio

Reading time9 min
Views1.6K

PVS-Studo vs GCC 10

The GCC compiler is written with copious use of macros. Another check of the GCC code using PVS-Studio once again confirms the opinion of our team that macros are evil in the flesh. Not only does the static analyzer struggle with reviewing such code, but also a developer. GCC developers are certainly used to the project and are well versed in it. Nonetheless, it is very difficult to understand something on the third hand. Actually, due to macros, it was not possible to fully perform code checking. However, the PVS-Studio analyzer, as always, showed that it can find errors even in compilers.
Read more →
Total votes 4: ↑3 and ↓1+2
Comments1

Начало коллекционирования ошибок в функциях копирования

Reading time4 min
Views5.3K

memcpy

Уже несколько раз замечал, что программисты допускают ошибки в простых функциях копирования данных. Эта тема потребует в будущем ещё много времени для изучения и подбора материала, чтобы написать основательную статью. Но захотелось поделиться парой примеров, недавно замеченных мною.
Читать дальше →
Total votes 17: ↑13 and ↓4+9
Comments24

Starting My Collection of Bugs Found in Copy Functions

Reading time4 min
Views752

memcpy

I've already noticed a few times before that programmers seem to tend to make mistakes in simple copy functions. Writing a profound article on this topic is going to take quite a while since I'll have to do some thorough research and sample collecting, but for now I'd like to share a couple of examples I stumbled upon recently.
Read more →
Rating0
Comments0

Глубина кроличьей норы или собеседование по C++ в компании PVS-Studio

Reading time4 min
Views22K

Собеседование по C++ в компании PVS-Studio

Авторы: Андрей Карпов, khandeliants Филипп Хандельянц.

Хочется поделиться интересной ситуацией, когда вопрос, используемый нами на собеседовании, оказался сложнее, чем задумывал его автор. С языком C++ и компиляторами надо всегда быть начеку. Не заскучаешь.
Читать дальше →
Total votes 59: ↑54 and ↓5+49
Comments208

How Deep the Rabbit Hole Goes, or C++ Job Interviews at PVS-Studio

Reading time4 min
Views1.7K

Job Interviews at PVS-Studio

Authors: Andrey Karpov, khandeliants Phillip Khandeliants.
Here's an interesting story about how one of the questions we ask at job interviews turned out to reach even deeper than intended by its author. You've always got to watch your step with C++ and C++ compilers – there's never a risk of getting bored.
Read more →
Rating0
Comments0

Исследуем качество кода операционной системы Zephyr

Reading time14 min
Views3.7K

PVS-Studio и Zephyr

Недавно мы рассказывали, что анализатор кода PVS-Studio начал интегрироваться с PlatformIO. Естественно, при этом команда разработчиков PVS-Studio общалась с командой PlatformIO и те предложили ради интереса проверить код операционной системы реального времени Zephyr. Почему бы и нет, подумали мы, и вот перед вами статья о таком исследовании.
Читать дальше →
Total votes 11: ↑11 and ↓0+11
Comments2

Checking the Code of Zephyr Operating System

Reading time13 min
Views1.9K

PVS-Studio and Zephyr

Some time ago we announced PVS-Studio's new feature that enabled it to integrate into PlatformIO. Naturally, our team kept in touch with the PlatformIO team while working on that feature, and they suggested that we check the real-time operating system Zephyr to see if we could find any interesting bugs in its code. We thought it was a good idea, and so here's this article about the check results.
Read more →
Total votes 4: ↑3 and ↓1+2
Comments0

Is static code analysis possible without false positives?

Reading time3 min
Views955

Today at one of the forums, when discussing the PVS-Studio static analyzer, the following question was asked:

Tell me, do you have the mode that guarantees the absence of false positives? Let there be fewer tests in this mode, but no false positives at all. The fact is that when I was looking for the analyzer for projects and was going to make the analysis part of CI/CD, all the tested commercial analyzers were rejected right because of having such warnings. In addition, the C++ team was weak and I couldn't spend my time digging into each warning. By the way, at that point the budget could go very far, the price was no object at all.

This question can be answered both yes and no. Let's try to figure it out.
Read more →
Total votes 3: ↑3 and ↓0+3
Comments4

Ноль, один, два, Фредди заберёт тебя

Reading time23 min
Views8.5K

Рисунок 1

Перед вами продолжение серии статей, которую можно озаглавить «ужасы для программистов». В этот раз речь пойдёт о типовом паттерне опечаток, связанном с использованием чисел 0, 1, 2. Неважно, пишете вы на C, C++, C# или Java. Если вы используете константы 0, 1, 2, или если эти числа содержатся в именах переменных, то, скорее всего, Фредди заглянет к вам ночью в гости. Читайте и не говорите потом, что вас не предупреждали.
Читать дальше →
Total votes 21: ↑19 and ↓2+17
Comments13

Information

Rating
265-th
Works in
Date of birth
Registered
Activity

Specialization

Specialist
C++
C
Software development