Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 VAX 1432: code analysis / VS2005

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
Uniwares Posted - Nov 25 2005 : 09:55:02 AM
When code analysis is enabled and one of the analysis errors is double clicked, VS2005 changes the background of the affected lines of code and all enhanced syntax coloring is gone.
13   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Feb 06 2006 : 10:46:43 AM
apologies for the long delay here, this got lost in my list of things to come back and check up on *oops*

i can get the code analysis module to report the expected types of warnings on C# code, but double clicking on the warning messages is not having any effect on VA's syntax highlighting.

however google is now finding some useful hits on the question of C++ code analysis now. last time i looked it did not find anything useful. adding the following dangerous function to a managed C++ application and running code analysis does report an error, on dereferencing a null pointer:

int get_counter()
{
    int *pCount = 0;
    static int static_counter = 0;
    return static_counter++ + *pCount;
}


i still have no idea why the other warnings that are turned on are not being triggered *sigh*

i get the following effect after double clicking on the warning message:



interestingly enough even with VA disabled the syntax highlighting for "int" is removed in the highlighted block, so it looks like the effect extends to the IDE as well.

case=983
Uniwares Posted - Dec 20 2005 : 10:26:05 AM
I am successfuly getting CA warnings for my code here. Although no warnings of relevance, it seems to work. Not sure why its not for you...
feline Posted - Dec 19 2005 : 3:48:46 PM
*ah* i missed that completely. now that i have had a look at it i am starting to get frustrated with this. i have turned on code analysis for C/C++ in my new managed (CLR) console project. i have made a new managed project since the wording in the analysis settings suggest it only applies to managed C/C++.

in my code i have the function:

int get_counter()
{
    static int static_counter = 0;
    return static_counter++;
}


which should report a warning due to CA1707, identifiers should not contain underscores.

in my main i have declared the unused variables:


    int nUnused = 3;
    int nWhatAboutme = 4;


which should generate a warning about being unused, and i am also expecting a warning about using the "n" prefix on my variable's.

i know i am running code analysis since i am using the menu item:
build -> project only -> run code analysis on Only <project name>

but all it will give me is that the resulting exe should be signed.

i will play around some more with this and see if i can find some setting i am overlooking. so far my experience is a long way from what you are describing. this is all very strange.
Uniwares Posted - Dec 18 2005 : 9:14:22 PM
Have a look at the settings of the code analysis; it gives a nice overview of all the things it may find.
feline Posted - Dec 17 2005 : 2:01:01 PM
i have a standalone machine with an evaluation copy of VS2005 team edition installed. i have created a simple win32 application and turned on C/C++ code analysis, but so far i am not getting any warning from the code analysis.

what sort of things does it pick up on? based on my experience with C# i expected to get warnings about no comments on functions, and other such basic things, but that is not happening.
support Posted - Dec 10 2005 : 12:00:30 AM
Thank you for the tips.
Uniwares Posted - Dec 09 2005 : 6:16:29 PM
Actually running it without all the additional stuff. Through the MSDN subscription you can download the (it seems) final version of the VS2005 Team Edition for Architects (180 days trial), which is as far as I understand just the "complete" Visual Studio without the addons like the Team Server.
And as such I am running it "standalone" just fine. The next shipment of the MSDN will most probably include it already on DVD.

Anyway, not really a big deal I think since the code analysis result is most probably something rather seldom used.
support Posted - Dec 08 2005 : 11:50:36 PM
Unfortunately, we don't have Team Edition installed at the moment. We haven't been eager to test it much since, as we understand, MS is still issuing CTP builds of it. If that wasn't enough, we read Microsoft recommends team edition be tested with team edition server and sql server via their version of vmware. We've seen instructions somewhere how to run 2 or 3 of their virtual clients at the same time in order to emulate several systems.

Are you running a complicated setup? Or is there a simple way?
feline Posted - Dec 04 2005 : 6:12:53 PM
i know what you mean. at the same time, the customers who can afford Team Edition are people we probably don't want to upset to much
Uniwares Posted - Dec 04 2005 : 5:16:19 PM
quote:
Originally posted by feline

i get the feeling all of these versions of VS2005 are going to be an irritation.


Looking at the prices of the Team Edition, I get the feeling there wont be too many around to worry about.
feline Posted - Dec 04 2005 : 4:29:41 PM
i will email support about this, and see if they have access to a copy of team system, this is the only version of the compiler with the code analysis. i get the feeling all of these versions of VS2005 are going to be an irritation.

http://msdn.microsoft.com/vstudio/products/compare/default.aspx
Uniwares Posted - Dec 01 2005 : 6:05:30 PM
Team edition for architects. settings are under C++ project configuration. You must enable code analysis under Configuration Properties/C++/Advanced.
feline Posted - Nov 28 2005 : 5:48:01 PM
which version of VS2005 are you using? after a fair bit of hunting through the menus and help in VS2005 beta 2, with both a C++ and a C# project i cannot find any sign of anything called "code analysis".

how are you triggering this?

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000