I started my adventure with Sonar ;)
Sonar with it's default configuration has PMD UnnecessaryLocalBeforeReturn error set on major level.
List<Todo> filtered = em.createQuery(query).getResultList();
return filtered;
It means for me that I should change this code above in one line.
It's really interesting for me because I recommend my colleagues to make this "unnecessary" local before return.
I think it ease debugging. When I set up breakpoint on return line, I'm sure that when I get there this value will be ready and I don't have to make selection over my statement or do "Step over Expression".
Beside I believe it has positive impact on reducing return points in methods.
My question is: Are there some kind of explanations/discussions why errors from projects such as Checkstyle, PMD, FindBugs, etc. were acknowledged as errors?