Click here to Skip to main content
15,891,253 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralAn interesting exit Molotov Pin
Kent Sharkey23-Oct-19 14:15
staffKent Sharkey23-Oct-19 14:15 
GeneralRe: An interesting exit Molotov Pin
RossMW23-Oct-19 15:54
professionalRossMW23-Oct-19 15:54 
GeneralRe: An interesting exit Molotov Pin
abmv23-Oct-19 17:40
professionalabmv23-Oct-19 17:40 
GeneralRe: An interesting exit Molotov Pin
RossMW23-Oct-19 19:08
professionalRossMW23-Oct-19 19:08 
GeneralRe: An interesting exit Molotov Pin
Kornfeld Eliyahu Peter23-Oct-19 20:13
professionalKornfeld Eliyahu Peter23-Oct-19 20:13 
GeneralRe: An interesting exit Molotov Pin
CodeWraith23-Oct-19 23:57
CodeWraith23-Oct-19 23:57 
GeneralRe: An interesting exit Molotov Pin
BillWoodruff26-Oct-19 22:59
professionalBillWoodruff26-Oct-19 22:59 
GeneralCode analysis sucks PinPopular
Dean Roddey23-Oct-19 10:45
Dean Roddey23-Oct-19 10:45 
So, since code analysis is included in Visual Studio these days, I figured I'd give it a try. It kicks out endless errors and warngings, every single one of which so far is either wrong or I would have to write far worse code just to make it understandable to the analysis tool in order to make it shut up.

The biggest single one so far is that it doesn't recognize that I'm doing a null check or some other check and calling a method that will throw the right exception or that I'm using an assert. I'm not template crazy like most folks these days, but my collections and various other things are templated. I try to keep as much code out of line as possible, and things like throwing exceptions are one of those. But that means it complains about every single place where that happens because it doesn't understand I'm dealing with the problem already.

Given that this already causes many hundreds of issues in headers that will be seen basically everywhere directly or indirectly, and I'm not about to hack my code up with hundreds of suppressions before I even really get started, that pretty much makes it useless for me.

When you write code to work around lackings in the code analyzer, and make your code more complex and less readable just to make it shut up, that's really letting the tail wag the dog. As I understand it, this is hardly specific to the VS analyzer either.
Explorans limites defectum

GeneralRe: Code analysis sucks Pin
Greg Utas23-Oct-19 11:16
professionalGreg Utas23-Oct-19 11:16 
GeneralRe: Code analysis sucks Pin
Dean Roddey23-Oct-19 11:54
Dean Roddey23-Oct-19 11:54 
GeneralRe: Code analysis sucks Pin
Stuart Dootson24-Oct-19 0:00
professionalStuart Dootson24-Oct-19 0:00 
GeneralRe: Code analysis sucks Pin
Super Lloyd23-Oct-19 15:29
Super Lloyd23-Oct-19 15:29 
GeneralRe: Code analysis sucks Pin
Sander Rossel23-Oct-19 22:55
professionalSander Rossel23-Oct-19 22:55 
GeneralRe: Code analysis sucks Pin
BryanFazekas24-Oct-19 0:41
BryanFazekas24-Oct-19 0:41 
GeneralRe: Code analysis sucks Pin
#realJSOP24-Oct-19 0:58
mve#realJSOP24-Oct-19 0:58 
GeneralRe: Code analysis sucks Pin
johannesnestler24-Oct-19 1:23
johannesnestler24-Oct-19 1:23 
GeneralRe: Code analysis sucks Pin
Dean Roddey24-Oct-19 6:26
Dean Roddey24-Oct-19 6:26 
GeneralPerhaps ... Re: Code analysis sucks Pin
Davie2124024-Oct-19 4:38
Davie2124024-Oct-19 4:38 
GeneralRe: Perhaps ... Re: Code analysis sucks Pin
Dean Roddey24-Oct-19 6:24
Dean Roddey24-Oct-19 6:24 
GeneralRe: Perhaps ... Re: Code analysis sucks Pin
Davie2124024-Oct-19 7:26
Davie2124024-Oct-19 7:26 
GeneralRe: Code analysis sucks Pin
Steve Naidamast24-Oct-19 7:36
professionalSteve Naidamast24-Oct-19 7:36 
GeneralRe: Code analysis sucks Pin
Dean Roddey24-Oct-19 15:54
Dean Roddey24-Oct-19 15:54 
QuestionHow do you know when the TOTD is a Dad joke? PinPopular
littleGreenDude23-Oct-19 6:56
littleGreenDude23-Oct-19 6:56 
GeneralThought of the Day Pin
OriginalGriff23-Oct-19 4:51
mveOriginalGriff23-Oct-19 4:51 
GeneralRe: Thought of the Day Pin
musefan23-Oct-19 5:02
musefan23-Oct-19 5:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.