Static analysis of Java call graph
You can use the java-callgraph tool suite to create accurate enough static and dynamic callgraphs for Java.
You can use the java-callgraph tool suite to create accurate enough static and dynamic callgraphs for Java.
Update Nov 2018: It would appear that Structure101 (new download page) no longer has an ActionScript variant. Original answer, links outdated: Download Structure101g and select the Actionscript flavor after installing the software. I’ve confirmed that it is able to map out class level and even function call dependencies in Flex/AS3 projects, and generate a visual … Read more
I know that Gimpel’s Lint products (PC-Lint and Flexelint) will identify unreachable code and unused / unreferenced modules. They both fall in the category of static analysis tools. I have no affiliation w/ Gimpel, just a satisfied long-term customer.
It is not redundant in the sense that using it does change things. As one would expect, you cannot extend a final case class, but you can extend a non-final one. Why does wartremover suggest that case classes should be final? Well, because extending them isn’t really a very good idea. Consider this: scala> case … Read more
abi-compliance-checker – a tool for checking backward binary/source-level compatibility of a shared C/C++ library (DSO): A tool for checking backward binary and source-level compatibility of a C/C++ library. The tool checks header files and shared libraries of old and new versions and analyzes changes in API and ABI (ABI=API+compiler ABI) that may break binary and/or … Read more
You’re probably looking for one of these: CHESS Typemock Racer NOTE: This answer is from 2010. As with all recommendations answers, recommendations tend to change over time. There may be other products out there now, CHESS which was a Microsoft Research Labs project may have evolved into a final product or been scrapped altogether. Please … Read more
It’s usually better for your code to describe as accurately as possible what’s going on. You’re getting this warning because the const in const int foo(); is basically meaningless. The API only seems clearer if you don’t know what the const keyword means. Don’t overload meaning like that; static is bad enough as it is, … Read more
“Is never used” should be taken literally: you only define its value in assignments, never use it. This is the same kind of warning you get for local variables: if you only define their values and never use it, what are they for? The static analyzer is thus warning you, because typically variables that are … Read more
You could use a code coverage analysis tool for this and look for unused spots in your code. A popular tool for the gcc toolchain is gcov, together with the graphical frontend lcov (http://ltp.sourceforge.net/coverage/lcov.php). If you use gcc, you can compile with gcov support, which is enabled by the ‘–coverage’ flag. Next, run your application … Read more
You want GCC’s warn_unused_result attribute: #define WARN_UNUSED __attribute__((warn_unused_result)) int WARN_UNUSED f(int z) { return z + (z*2) + z/3 + z*z + 23; } int main() { int i = 7; f(i); ///// <<—– here i disregard the return value return 1; } Trying to compile this code produces: $ gcc test.c test.c: In function … Read more