Home » Tag Archives: Code Analysis

Tag Archives: Code Analysis

Customize PMD in Eclipse with your own rules

PMD is very nice Java code scanner which helps you avoid potential programming problems. It can be easily extended to your needs, and this post will bring you simple example of custom PMD rules related to JPA’s @Enumerated annotation usage. Before you’ll continue the reading, you should check one of my previous posts – JPA – @Enumerated default attribute. When ...

Read More »

Static Analysis isn’t Development Testing

I constantly get emails from Static Analysis vendors telling me why I need to buy their technology. Recently I’ve been receiving emails explaining how my team can use static analysis tools to do impressive things like “test millions of complex lines of codes [sic] in minutes”. Hold on now, pardner. Running static analysis tools against your code to enforce good ...

Read More »

5+1 Sonar Plugins you must not miss

This post is a revision of the original post, published last year and it covered Sonar version 2.8. Many months has passed and during this period the Sonar Team released four(4) new versions of the ultimate quality platform. The latest version ( 2.12 ) now includes JaCoCo in its core implementation and the existing plugin is now deprecated. Since I ...

Read More »

My Testing and Code Analysis Toolbox

Last week we kicked of a “Testing Skill Group” at LINEAS, a group for exchanging knowledge about testing. One question that came up over and over again in various flavors was: What tools are there for testing and analyzing your code? So here is my personal answer for this, in the approximately order I tend to introduce them into projects: ...

Read More »

Measuring Code Complexity

Lately, development managers have put a lot of interest in measuring code quality. Therefore, things like code reviews and analysis tools have become very popular at identifying “Technical Debt” early. Several tools exist for Java: Sonar, JavaNCSS, Eclipse plugins; as well as other languages: Visual Studio Code Analysis, PHPDepend, among others. What is Technical Debt? From the Sonar site, technical ...

Read More »

Java Tools: Source Code Optimization and Analysis

Below is a list of some tools that can help you examine your Java source code for potential problems: 1. PMD from http://pmd.sourceforge.net/ License: PMD is licensed under a “BSD-style” license PMD scans Java source code and looks for potential problems like: * Possible bugs – empty try/catch/finally/switch statements * Dead code – unused local variables, parameters and private methods ...

Read More »