Static Analysis Tool needed... (PC-Lint?)
-
Hello, I need a tool for preforming a static code analysis on VC 7.1 projects. As far I know, PC-Lint does it.* Does somebody had good/bad experience with this tool?
- How it integrates with VC 7.1 (to Visual Studio C++ .NET 2003)?
I would like to get some feedback before I spend my own money on this tool. I guess LintProject[^] is a helper tool for PC-Lint and VC projects. (Thanks Anna)-- **Ricky Marek** (_AKA: rbid_)
-- "Things are only impossible until they are not" --- Jean-Luc Picard My articles
- How it integrates with VC 7.1 (to Visual Studio C++ .NET 2003)?
-
Hello, I need a tool for preforming a static code analysis on VC 7.1 projects. As far I know, PC-Lint does it.* Does somebody had good/bad experience with this tool?
- How it integrates with VC 7.1 (to Visual Studio C++ .NET 2003)?
I would like to get some feedback before I spend my own money on this tool. I guess LintProject[^] is a helper tool for PC-Lint and VC projects. (Thanks Anna)-- **Ricky Marek** (_AKA: rbid_)
-- "Things are only impossible until they are not" --- Jean-Luc Picard My articles
rbid wrote: Does somebody had good/bad experience with this tool? An increasing amount, which shouldn't come as a surprise! Most of that experience has been good, but it can be a pig to set up and tune until you get the hang of it. Once you do, PC-Lint can be an absolutely invaluable tool - I've found some very subtle bugs buried in production code after investigating Lint warnings, and in fact on more than one occasion I've been able to tell our testers how to make a previously undiscovered bug surface in a given version of the product - just by looking at the warning and under what conditions it could cause a failure. rbid wrote: How it integrates with VC 7.1 (to Visual Studio C++ .NET 2003)? PC-Lint is a command line tool, and out of the box its integration with the IDE is limited to placing macros on the "Tools" menu which direct analysis results to the Output Window. Once there, you can double click on a warning to jump to the corresponding code as normal. The installation includes fairly detailed PDF and text files describing the warnings produced, but these aren't integrated into the IDE. Configuration is via text files (conventionally
std.lnt
andoptions.lnt
) which define your platform, include folders and warning policy. Personally, I found that level of integration OK, but "could be better". In fact, making it easier to use PC-Lint on our own code is one of the motivations we have for designing our own add-in (Visual Lint[^]) to address the problem. As well as the Output Window integration you'd expect, we're also implementing background analysis, reports (similar to LintProject) and warning help (my favourite feature - a tool window[^] which shows a description for each warning as you cycle through those in the Output Window). We're at a fairly advanced stage of development now, so if you'd be interested in acting as a tester please let us know. Once we finish implementing another of the displays and have a better means of configuring include path - How it integrates with VC 7.1 (to Visual Studio C++ .NET 2003)?
-
Hello, I need a tool for preforming a static code analysis on VC 7.1 projects. As far I know, PC-Lint does it.* Does somebody had good/bad experience with this tool?
- How it integrates with VC 7.1 (to Visual Studio C++ .NET 2003)?
I would like to get some feedback before I spend my own money on this tool. I guess LintProject[^] is a helper tool for PC-Lint and VC projects. (Thanks Anna)-- **Ricky Marek** (_AKA: rbid_)
-- "Things are only impossible until they are not" --- Jean-Luc Picard My articles
Visual Studio 2005 will also include static analysis tools built-in, like FxCop and PREfast - a tool that we use, among others, for static analysis. See http://blogs.msdn.com/codeanalysis[^] for details. You can also download FxCop today from http://gotdotnet.com/team/fxcop/[^]. I know it's for managed code, but I mention it anyway. :) PREfast - or whatever marketing will call it - is for native code, both C/C++ and MIDL. This posting is provided "AS IS" with no warranties, and confers no rights. Software Design Engineer Developer Division Sustained Engineering Microsoft [My Articles] [My Blog]
- How it integrates with VC 7.1 (to Visual Studio C++ .NET 2003)?
-
Visual Studio 2005 will also include static analysis tools built-in, like FxCop and PREfast - a tool that we use, among others, for static analysis. See http://blogs.msdn.com/codeanalysis[^] for details. You can also download FxCop today from http://gotdotnet.com/team/fxcop/[^]. I know it's for managed code, but I mention it anyway. :) PREfast - or whatever marketing will call it - is for native code, both C/C++ and MIDL. This posting is provided "AS IS" with no warranties, and confers no rights. Software Design Engineer Developer Division Sustained Engineering Microsoft [My Articles] [My Blog]
There are movies illustrating the new functionality here:
Interestingly, looking at PREfast (for example) it seems that the integration is at build time and enabled by a project setting. I would certainly be interested to see how its coverage compares with PC-Lint! Would I be right in thinking these features are only available in VS2005 Team Developer Edition, and not in Professional/Enterprise? Even if that proves to be the case, its good to see MS addressing this area. :cool: On a far simpler note, I rather hope VS2005 defaults to warning level 4 instead of 3 as in VS2003. I've met so many developers who didn't even bother checking when starting a new project, and as a result they never screened their code for problems. That's bad, and it makes the job of those of us who do care that little bit harder. Anna :rose: Riverblade Ltd - Software Consultancy Services Anna's Place | Tears and Laughter "Be yourself - not what others think you should be" - Marcia Graesch "Anna's just a sexy-looking lesbian tart" - A friend, trying to wind me up. It didn't work.
-
There are movies illustrating the new functionality here:
Interestingly, looking at PREfast (for example) it seems that the integration is at build time and enabled by a project setting. I would certainly be interested to see how its coverage compares with PC-Lint! Would I be right in thinking these features are only available in VS2005 Team Developer Edition, and not in Professional/Enterprise? Even if that proves to be the case, its good to see MS addressing this area. :cool: On a far simpler note, I rather hope VS2005 defaults to warning level 4 instead of 3 as in VS2003. I've met so many developers who didn't even bother checking when starting a new project, and as a result they never screened their code for problems. That's bad, and it makes the job of those of us who do care that little bit harder. Anna :rose: Riverblade Ltd - Software Consultancy Services Anna's Place | Tears and Laughter "Be yourself - not what others think you should be" - Marcia Graesch "Anna's just a sexy-looking lesbian tart" - A friend, trying to wind me up. It didn't work.
Prefast is available in the DDK (should have that if you've got MSDN Professional or above). It replaces the CL command, analysing C/C++ code before passing it onto the real compiler. I wouldn't like to say how the two tools compare...MS (strangely enough) reckon that PreFast has detected a lot of bugs in their code & in device driver code... Stuart Dootson 'Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p'
-
Prefast is available in the DDK (should have that if you've got MSDN Professional or above). It replaces the CL command, analysing C/C++ code before passing it onto the real compiler. I wouldn't like to say how the two tools compare...MS (strangely enough) reckon that PreFast has detected a lot of bugs in their code & in device driver code... Stuart Dootson 'Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p'
That's useful to know. :cool: I'm not surprised they've found bugs using it - the alternative approach (Lint) in its raw form is not easy to set up, and on a large codebase it can be very hard to use it effectively without a concerted effort. That's something we're specifically trying to address, but of course we'll certainly look at other approaches to see what they offer! Anna :rose: Riverblade Ltd - Software Consultancy Services Anna's Place | Tears and Laughter "Be yourself - not what others think you should be" - Marcia Graesch "Anna's just a sexy-looking lesbian tart" - A friend, trying to wind me up. It didn't work.