Java Plugin


 Roadmap

Java Ecosystem

5 plugins in ecosystem

Java PLUGIN


One way to rule them all

(the rules...)

3 ways to write checks


  • ASTNode

  • BytecodeVisitor (~10 checks)

  • AST (aka Strongly Typed AST)

goodbye ASTNode









Remaining challenge : Access to tokens from AST
Fail late on grammar modification 

 Bytecode VISITOR


  • Problem : 
    Specific rule writing for rules based on bytecode

  • Solution :
    Hide complexity and let AST access this information

  • Challenge : 
    Get same level of information in AST

Rules that rocks

Improve Existing rules


  • Rewrite rules  : Depth Inheritance Tree

  • Improve rules relying on some assumptions on types

Write new rules



Semantic analysis opens a new world of rules

(but Evgeny will tell you more about it... )

What's Missing ?


and what are we gonna do about it in the upcoming months...

Method resolution


 class A {
   //overloading
   void method(int a) {
   }
   void method(double a) {
   }
   void calls() {
     method(1);
     method(5.0);
   }

 }

Type of expressions


 
class B {
  private void method() {
  }
  static B create(){
   return new B();
  }
  void calls() {
   create().method(); //What is the type of create()
  }
}

Generics


class A {

 List<A> list = Lists.newArrayList(new A());

 private void method() {
 }
 void calls() {
   list.get(0).method(); //What is the type of list.get(0) ?     }

}

PMD and Checkstyle


  • Continue rewriting rules
  • Improve those rules along the way
  • Fully deprecate them

X-Source Navigation


Using SonarQube API to navigate between files



And after that ?

Buzz Lightyear Everywhere Meme - finding bugs find bugs Everywhere

Deprecate findbugs


  • Release cycle is slow
  • Low visibility on the project
  • Rely on our tools to provide valuable rules




Questions ?

Java Plugin Roadmap

By Nicolas PERU

Java Plugin Roadmap

The roadmap of the java sonar plugin per June 2014

  • 1,258