|
Why not give PVS-Studio a try ? Built for Visual Studio and running as an extension, it gives very good insight into code. Also, open source projects can get a free licence.
modified 14-May-20 9:27am.
|
|
|
|
|
I did try PVS-Studio, and here[^] is a post about what I changed as a result of its findings. It provides a one-week free trial, after which you have to pay. I didn't see anything for open-source projects, and an email inquiring about pricing has gone unanswered.
Trying out Deep Code led to these[^] changes.
And there's one that I wrote: A Static Analysis Tool for C++[^].
I'm now going through Coverity's findings. The majority of them flag destructors for calling things that can throw. I don't know whether I'll fix these, because I catch the ensuing SIGABRT and prevent the program from exiting. However, this has occasionally led to a SIGABRT loop, which is worse than exiting. So I also have code that checks the stack for a destructor or delete operator before throwing. But a non-throwing version of a few things could be an improvement.
Coverity is good at analyzing execution paths, so besides these destructor things it tells you stuff like
- You already checked this for
nullptr , so why are you checking it again? - You're checking this for
nullptr now, so why didn't you bother when you first used it? - You're using an array index that could be out of bounds because it was returned by so-and-so function.
Naturally there are false positives, but I'd rather see them than not. A common one is that my parser will get the pointer from a unique_ptr , which then assigns ownership to another unique_ptr , after which I access the object through the original pointer. This gets flagged.
|
|
|
|
|
Message Closed
modified 14-May-20 9:26am.
|
|
|
|
|
|
and I was complaining about it to my wife.
Her reply.
"It's not that bad - keep your chin up!"
"No - the other chin..."
If you can't laugh at yourself - ask me and I will do it for you.
|
|
|
|
|
I managed to lose weight despite my wife going all out on her kitchen abilities. Pies, cakes, pizza, lasagne... almost every day.
I just don't eat the junk food I eat when going to work and it works.
GCS d--(d+) s-/++ a C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++* Weapons extension: ma- k++ F+2 X
|
|
|
|
|
My granddaughter asked me when I was going to get a training bra...I was not amused!
When you talk, you are only repeating what you already know.
But if you listen, you may learn something new.
--Dalai Lama
JaxCoder.com
|
|
|
|
|
because you're already an expert?
pestilence [ pes-tl-uh ns ] noun
1. a deadly or virulent epidemic disease. especially bubonic plague.
2. something that is considered harmful, destructive, or evil.
Synonyms: pest, plague, CCP
|
|
|
|
|
No I have not taken the test yet!
When you talk, you are only repeating what you already know.
But if you listen, you may learn something new.
--Dalai Lama
JaxCoder.com
|
|
|
|
|
you need a cert for that !
Wow!
(are there, like, authorities checking??)
pestilence [ pes-tl-uh ns ] noun
1. a deadly or virulent epidemic disease. especially bubonic plague.
2. something that is considered harmful, destructive, or evil.
Synonyms: pest, plague, CCP
|
|
|
|
|
lopatir wrote: (are there, like, authorities checking??)
Tag police...same ones that check for the tags on mattresses and such!
When you talk, you are only repeating what you already know.
But if you listen, you may learn something new.
--Dalai Lama
JaxCoder.com
|
|
|
|
|
Ever since lock-down, when I sit around the house, I sit arrrrrouuuuund the house.
|
|
|
|
|
DRHuff wrote: I am a little depressed
Pfft, you're not a little anything.
|
|
|
|
|
Regardless of your nationality, when you're in the bathroom, European…
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
modified 12-May-20 15:51pm.
|
|
|
|
|
|
or Europoopan?
When you talk, you are only repeating what you already know.
But if you listen, you may learn something new.
--Dalai Lama
JaxCoder.com
|
|
|
|
|
If the bathroom is in the pub, it might be American.
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
But when I needed to go I was Russian!
If you can't laugh at yourself - ask me and I will do it for you.
|
|
|
|
|
Reminds me of a book I once read. It's named Yellow Rivers by I.P. Freely.
Social Media - A platform that makes it easier for the crazies to find each other.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
He got his inspiration from Rusty Springs by I.P. NIghtly
|
|
|
|
|
Another attempt two-ply your puns in the lounge? Probably planning the posts at night and then sharing them bidet.
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
Shouldn't that be,
OriginalGriff wrote: Regardless of your nationality, when urine the bathroom, European…
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
shouldn't stand for that, unless Uruguay
pestilence [ pes-tl-uh ns ] noun
1. a deadly or virulent epidemic disease. especially bubonic plague.
2. something that is considered harmful, destructive, or evil.
Synonyms: pest, plague, CCP
|
|
|
|
|
I'm creating a new ASP.NET Core 3.1 Razor Pages application with individual user authentication using an in-app store (so SQL Server, as opposed to (Azure) AD).
The cool part is that Microsoft gives you a complete out-of-the-box register, login and profile solution, complete with 2FA and external authentication (OAuth 2.0).
It's all hidden inside some package so it doesn't clutter your solution either, although you have the option to scaffold each page individually if you like.
Really great, kudos to Microsoft, except...
IT'S ALL IN ELEPHANTING ENGLISH!
I've searched for a way to localize the default pages, but I can't find a proper solution.
When I scaffold the pages they have hard-coded strings in the HTML as well as the C# code.
Also, you really can't beat logic like this (if some string that the user is going to read starts with "Error"):
var statusMessageClass = Model.StartsWith("Error") ? "danger" : "success"; I've scaffolded all pages and I'm replacing all hard-coded strings with resource file references
It's quite a lot, so it keeps me off the streets and working for my money.
Still better than doing it all myself, but if you're going to offer this as one of the biggest companies on the planet, at least think about such stuff
|
|
|
|
|
Don't they teach you in the Netherlands that the planet begins at Maine and ends at California?
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|