code-analysis

Best tool for detect and report third party software licenses at your code.

Hi. Does anybody know good tools for analyze and detecting third party code (or pieces of code) at own projects? For example, I use some code from Sun (CDDL) in my project and had copyrights, but other developers can get licensed code and put it into the project without copyrights and license information. What I want it's a tool that cat...

NDepend Count, Average, etc.. reporting... aggregates. Possible? clean work arounds?

We have a huge code base, where methods with too many local variables alone returns 226 methods. I don't want this huge table being dumped into the xml output to clutter it up, and I'd like the top 10 if possible, but what I really want is the count so we can do trending and executive summaries. Is there a clean/efficient/scalable non-ha...

How can I get the syntax tree from a coderef in Perl?

I'd like to inspect and manipulate code of arbitrary Perl procedures (got by coderefs) in Perl. Is there a tool/module/library for that? Something similar to B::Concise, except that B::Concise prints the code on output, but I'd like to inspect it programmatically. I'd like to use it like this. Given a coderef F, which is called eg. with...

Doing .NET 4.0 static code analysis (FxCop) with VS 2010 Professional

I have VS 2010 Professional (which, unlike Premium, does not include access to Code Analysis configuration within the IDE), and a C# 4 solution containing many-dozen projects. I want to do static code analysis as part of solution compilation. The possible ways I have identified with the help of SO and Google are: Edit every .csproj in...

Using Python code coverage tool for understanding and pruning back source code of a large library

My project targets a low-cost and low-resource embedded device. I am dependent on a relatively large and sprawling Python code base, of which my use of its APIs is quite specific. I am keen to prune the code of this library back to its bare minimum, by executing my test suite within a coverage tools like Ned Batchelder's coverage or fi...

How to get rid of CA2000 warning when ownership is transferred?

The following code generates two CA2000 warnings (among others, but that's not the point). public sealed class Item: IDisposable { public void Dispose() {} } public sealed class ItemContainer { public void Add(Item item) { } } public sealed class Test: IDisposable { private ICollection<Item> itemCollection; pri...

C Language Data Structure Visualisation

Are there any C-language static analysers out there that create graphical diagrams of the data structures in a body of C code? I'm thinking along the lines of the data displays in the DDD (Data Display Debugger) but that work from static analysis of the source code. Any diagram notation welcome (UML etc.) and it can run on any platform...

Visual Studio Code Analysis - Issue explanation Help not available

Previously, when running a Code Analysis on my project, I thought the context men used to show a link to a MS web page that explains the issue in more detail. I don't see that now and I am not sure if I am doing something differently or if I am confusing this tool with another. Does anyone know if this type of information is normally av...

TFS 2010 change history on individual code sections.

Some time ago I recall seeing an early release video demonstration of a tool that allowed one to (from within Visual Studio) inspect the history of a section of code. For example, right click on a method and choose 'view history', and see when that method has changed. Can anyone recall what product this may have been? ...

Assembly Binding Redirection and Code Analysys

I'm using DotNetOpenAuth (which references System.Web.Mvc version 1.0.0.0) in a Mvc 3.0.0.0 project in Visual Studio 2010. I'm using assembly binding redirection as follows:- <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3...

Tool to find all instances of a class

I'm working on a C++ project where modules are meant to be combined in a small group to serve a specific purpose (in some sort of processing pipeline). Sometimes it's hard to know the impact of any change, because we intuitively don't even know all the places where one of our module is being used. I know I can do Search in Files to fin...