Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 VAX 1432: code analysis / VS2005
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Uniwares
Tomato Guru

Portugal
2321 Posts

Posted - Nov 25 2005 :  09:55:02 AM  Show Profile  Reply with Quote
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.

feline
Whole Tomato Software

United Kingdom
18950 Posts

Posted - Nov 28 2005 :  5:48:01 PM  Show Profile  Reply with Quote
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?

zen is the art of being at one with the two'ness
Go to Top of Page

Uniwares
Tomato Guru

Portugal
2321 Posts

Posted - Dec 01 2005 :  6:05:30 PM  Show Profile  Reply with Quote
Team edition for architects. settings are under C++ project configuration. You must enable code analysis under Configuration Properties/C++/Advanced.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18950 Posts

Posted - Dec 04 2005 :  4:29:41 PM  Show Profile  Reply with Quote
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

zen is the art of being at one with the two'ness
Go to Top of Page

Uniwares
Tomato Guru

Portugal
2321 Posts

Posted - Dec 04 2005 :  5:16:19 PM  Show Profile  Reply with Quote
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.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18950 Posts

Posted - Dec 04 2005 :  6:12:53 PM  Show Profile  Reply with Quote
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

zen is the art of being at one with the two'ness
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Dec 08 2005 :  11:50:36 PM  Show Profile  Reply with Quote
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?

Edited by - support on Dec 08 2005 11:55:30 PM
Go to Top of Page

Uniwares
Tomato Guru

Portugal
2321 Posts

Posted - Dec 09 2005 :  6:16:29 PM  Show Profile  Reply with Quote
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.
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Dec 10 2005 :  12:00:30 AM  Show Profile  Reply with Quote
Thank you for the tips.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18950 Posts

Posted - Dec 17 2005 :  2:01:01 PM  Show Profile  Reply with Quote
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.

zen is the art of being at one with the two'ness
Go to Top of Page

Uniwares
Tomato Guru

Portugal
2321 Posts

Posted - Dec 18 2005 :  9:14:22 PM  Show Profile  Reply with Quote
Have a look at the settings of the code analysis; it gives a nice overview of all the things it may find.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18950 Posts

Posted - Dec 19 2005 :  3:48:46 PM  Show Profile  Reply with Quote
*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.

zen is the art of being at one with the two'ness
Go to Top of Page

Uniwares
Tomato Guru

Portugal
2321 Posts

Posted - Dec 20 2005 :  10:26:05 AM  Show Profile  Reply with Quote
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...
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18950 Posts

Posted - Feb 06 2006 :  10:46:43 AM  Show Profile  Reply with Quote
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

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000