-
Dec 6th, 2014, 06:08 PM
#1
Thread Starter
Frenzied Member
Any tool or setting in VS that prevent/alert on cross thread operations?
Hi!
I am doing code review of some of my customers developers code, and found that two of them are producing code (VB.NET and C# windows forms) with a lot of potentially dangerous calls to the UI from worker threads. Usually the debugger will throw an exception, but I checked, and these guys have turned off all exceptions for System.Threading (because they got annoying errors when debugging, they told me when I asked them) and hence, this code was released to the customer.
Now, I would love to find some setting or tool that will alert us if code like this is being checked in. Do you know of any tool or setting in VS 2012 that will react to these kinds of errors?
I have just recently set up a Team City buildserver, so in the long run, some tool that would catch errors like this would be great, I simply do not have time to check every single commit by these guys.
Any help is greatly appreciated.
/Henrik
-
Dec 6th, 2014, 07:22 PM
#2
Re: Any tool or setting in VS that prevent/alert on cross thread operations?
I know of no such tool, but I'd have to say: Good luck.
That's a rough situation you described. You are kind of relying on code written by people who want to ignore problems rather than fix them. That's just nasty.
My usual boring signature: Nothing
-
Dec 9th, 2014, 08:49 AM
#3
Re: Any tool or setting in VS that prevent/alert on cross thread operations?
This is a coding 'violation', so there should be a tool to detect such issues - I don't know if FxCop can detect the CheckForIllegalCrossThreadedCalls setting in code - It rips apart a lot of my code, though, for less 'criminal' coding...
Microsoft FxCop uses the 'introspection' analysis engine. I do not know of any others or how to incorporate one, but it might be a start: if you can run your own analysis on the source, you could detect the unwanted coding. How to do that? I am not sure, but may be a point of research.
"Ok, my response to that is pending a Google search" - Bucky Katt.
"There are two types of people in the world: Those who can extrapolate from incomplete data sets." - Unk.
"Before you can 'think outside the box' you need to understand where the box is."
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|