I’m working on a new Android project which I inherited. Well, I forked it because I didn’t feel welcomed to contribute to the project and I see a lot of places where improvements are needed.
First, I need to improve the codebase. Previous developers didn’t care about any Java coding guidelines from Oracle, Google, CERT or even Android. Some of the problems I have to solve now are:
- inconsistent style
- catch (Exception e){}
- catch(Throwable e){}
- ArrayList<Object> list = new ArrayList<String>()
- complex methods – if {switch {for {if {else {}}}}
- new Thread().start()
To quickly start clean-up and identify those problems, different static code analysis tools can be used; one of them is SonarQube.