static-analysis

What problems are easy to spot in a dependency graph?

What are the things I should be looking for when I produce a dependency graph? Or to put it another way, what are the characteristics of a good looking graph vs a bad one? Edit: The context here is my first look at my assemblies in NDepend. ...

Best way in MySQL or Rails to get AVG per day within a specific date range

Hey guys, I'm trying to make a graph in Rails, for example the avg sales amount per day for each day in a given date range Say I have a products_sold model which has a "sales_price" float attribute. But if a specific day has no sales (e.g none in the model/db), I want to return simply 0. What's the best way in MySQL/Rails to get this ...

Explain System.Diagnostics.CodeAnalysis.SuppressMessage

Hello I have this kind of code in some applications (from microsoft) [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly", MessageId = "CounterClockwise", Scope = "member", Target = "ScePhotoViewer.PhotoDisplayControl.#RotatePhotoCounterClockwiseComma...

Free static code scanner for C/C++/C#

Hi! Does anyone know an open-source and/or free code-scanner for automated code analysis in C#, C or C++? I know for Java there's some brilliant stuff like FindBugs (Eclipse integrated), PMD, or Hammurapi. Is there anything similar for the C-languages? wishi ...

Determine property calls between two classes in .Net

Given two .Net types, type A and type B, how could one determine all property calls to type A (including sub classes of type A) made from type B? ...

Any Static Code Analysis Tools for Stored Procedures?

Are there any static code analysis tools for stored procedures written particularly in PL/SQL and T-SQL? ...

Are there any static code analysis tools for Delphi/Pascal?

Are there any static code analysis tools for Delphi/Pascal? I have seen plenty of options for C++ and .NET, but nothing for Delphi/Pascal. Ideally something that could be integrated into a continuous integration system. ...

Are there any JavaScript static analysis tools?

I'm used to having my compiler complain when I do something stupid like a typo on a variable name but JavaScript has a habit of letting this pass. Are there any static analysis tools for JavaScript? Preferably a free one (either beer or speech) because I'm a tightarse. ...

Static Actionscript code analysis?

I want to see class, function and variable/property, dependencies visually, like NDepend, but for ActionScript 2 or AS3 code. Any programs or ideas? Use Doxygen in some way? FlexUnit? ...

Anybody written a tool for static analysis of an ASP.NET MVC application?

Has anyone written a tool to do static analysis of an ASP.NET MVC application? Disclaimer: I'm not sure what I want really is static analysis - it just was the closest term I could come up with. What I'd like is to get a tabulated list of all my controllers, my actions, show whether they respond to GET or POST, what their cache setting...

Is this really a buffer overflow?

The static analysis tool we use is flagging C code similar to the following as a critical buffer overflow. #define size 64 char buf [size + 1] = ""; memset (buf, 0, size + 1); The tool's error message is: Buffer Overflow (Array Index Out of Bounds): The array 'buf' size is 1. Array 'buf' may use the 0..64 index. Is this legitimat...

Code linting for Objective C

Are there any code linting tools for ObjectiveC? ...

Is there a need for a "use strict" Python compiler?

There exist static analysis tools for Python, but compile time checks tend to be diametrically opposed to the run-time binding philosophy that Python embraces. It's possible to wrap the standard Python interpreter with a static analysis tool to enforce some "use strict"-like constraints, but we don't see any widespread adoption of such a...

Are C++ static code analyis tools worth it?

Our management has recently been talking to some people selling C++ static analysis tools. Of course the sales people say they will find tons of bugs, but I'm skeptical. How do such tools work in the real world? Do they find real bugs? Do they help more junior programmers learn? Are they worth the trouble? ...

Find code that depends on .NET 3.5 SP1

Is there a way to run some sort of code analysis to find code which will compile with .NET 3.5 SP1 but not 3.5 RTM? FxCop works for assemblies introduced with SP1, but for code that simply calls new methods and properties it does not detect that usage. ...

How can I make splint ignore where I declare my variables?

Hi Do you know how can I make splint ignore where I declare my variables? I know that the old school c tells you to declare variables right at the beginning in every function, but since I am a bad person I like to declare things close to where I use them. A good example is to put int i; right before the for(i=0;...). Let's take a v...

Deprecate other methods/types

To prevent using some members (or type) there is a way to mark them as obsolete (and sometimes in the future remove them completly). But is there a way to deprecate members (or types) of the compiled third-party assemblies? Or, at least, to make sure (or to issue a warning) when they are used? ...

splint and test coverage analysis?

Hello C people. I'm looking for a static analysis tool with the maturity of splint that also produces test coverage analysis of the code. For instance, all non-static functions in libfoo.c should be present in libfoo.h, by that token all functions in libfoo.h should have unit tests. Of course, such behavior would need some kind of gran...

Gimpel's PC-lint and Flexelint; Anyone used them?

So I've read a few magazine articles and the website for Gimpel's PC-lint and Flexelint C/C++ compiler. It's really expensive (at least for me), but it seems like it might have some merit to warrant the cost. So I'm wondering if anyone else has used/bought them and can provide their opinions? ...

Static-code analyzer: unmanged C++ Visual Studio 2008

I develop commercial unmanaged C++ app on Visual Studio 2008, and I want to add a static-code analysis tool. Any recommendations? I think it would be real nice if the tool can be integrated into MSVC. I'm thinking about PC-Lint + Visual Lint However, I have been taking a hard look at Coverity, Understand, and Klockwork as well. Pri...