Another hero of the week is: #cppcheck

There were loads of minor flaws in my code base, but in between it detected some real stupid bugs coming from copy&paste and other quick&dirty workarounds.

Running cppcheck from time to time is not enough, so it should be part of every CI pipeline execution.

I knew it for years ... but it took long to realize it 😓

On MSVC, an enum by default is signed.
so an anonymous class enum like

enum { foo, bar, baz
} mFoo : 2;

Is not going to be that useful. #MSVC knows about it but only tells you on /Wall, not /W4.

Maybe #cppcheck could at least gain a check for it ?

#GCC and #clang seems to do the right thing

#cpp

I registered for #KDE #akademy andhave acquired plane tickets. So I'll be there. And I hope to see all of you fine people there.

Now I just need to book a hotel and prepare my talk about #cppcheck code analyzer in KDE continuous integration.

I think this is around my 10th in person Akademy.

Наблюдая за публикациями и выступлениями Андрея Карпова из PVS-Studio постоянно ловил себя на фейспалме. Особенно, когда этот человек бегал по LinkedIn и набивался в друзья ко всем подряд.

И вот никогда не сомневался, что в своём падении такой человек может пойти дальше. Нисколько не останавливаясь и не тормозя пробить «дно-днище» не одно и не два сразу.

В чём лишний раз и убедился полистав его очередной опус — аж целую книжку: «Вредные советы для C++ программистов»

Давненько не доводилось видеть столь убогой работы в плане вёрстки и типографики. Настоящая колхозная самодеятельность 21-го века.

За суть и содержимое не подскажу, чувство гадливости напрочь отшибает любое желание погружаться в контент.

Спасибо, Андрей, что про продолжаешь радовать и тешить нас! Настоящий со-учредитель и успешный бизнесмен ИТ-сектора, стоящий на страже качества и надёжности АИС!

P.S. Мы как пользовались #ClangTidy да #CppCheck так и продолжим, не потому что #PVSStudio плохой продукт, а из-за того, кто и как его пиарит, кто за ним стоит (в твоём лице).

#книги #C++ ++ #программирование #programming

Akkoma

CppCon 2024 SESSION ANNOUNCEMENT: Building Cppcheck - What We Learned from 17 Years of Development by Daniel Marjamäki

https://cppcon2024.sched.com/event/1gZdy/building-cppcheck-what-we-learned-from-17-years-of-development

Register now: https://cppcon.org/registration/

#cpp #cplusplus #coding #cppcheck

CppCon 2024: Building Cppcheck - What We Learned from...

View more about this event at CppCon 2024

CppCon 2024 SESSION ANNOUNCEMENT: Building Cppcheck - What We Learned from 17 Years of Development by Daniel Marjamäki

https://cppcon2024.sched.com/event/1gZdy/building-cppcheck-what-we-learned-from-17-years-of-development

Register now: https://cppcon.org/registration/

#cpp #cplusplus #coding #cppcheck

CppCon 2024: Building Cppcheck - What We Learned from...

View more about this event at CppCon 2024

Wow, #cppcheck actually found a real issue for a change: I was calling a virtual method from a destructor (this is #Cpp code). And of course, after staring at it for a minute, I realized I don't need that method to be virtual at all :)

(I intended this toot to be snarky and to say that it's the first time cppcheck found anything of importance, but I double-checked and it turns out it found me a different issue back in 2016. Considering I didn't pay a dime for this tool, the ROI is great.)

A small contribution to static analysis tool #Cppcheck from Codethink engineer Michael Drake: https://github.com/danmar/cppcheck/pull/4757

#OpenSource #Testing #StaticAnalysis #UpstreamFirst

dump: Fix concurrency problem with dump files by tlsa · Pull Request #4757 · danmar/cppcheck

This adds the process ID for the cppcheck process to the filenames of the .dump and .ctu-info files that the process generates. So lib/cppcheck.cpp.dump becomes lib/cppcheck.cpp.<PID>.dump For exam...

GitHub
Does anyone know very large, non-synthetic and free #cpp files?
We're trying to benchmark a static code analyzer. :)
#cppcheck