Error Prone is a powerful tool for detecting and preventing bugs and anti-patterns in Java codebases. As a compiler plugin, it is capable of automatically suggesting and applying fixes at scale.
For years, Picnic has leveraged the capabilities of Error Prone to streamline our development process through large-scale automated refactorings across our entire Java codebase. This approach not only resolves bugs once and for all, but also leads to a more consistent and high-quality codebase.
In this talk, we will provide a comprehensive demonstration of Error Prone's capabilities, as well as offer practical guidance on how to set up the tool for your own development team. Additionally, we will share our own experiences and learnings from Picnic's journey of using Error Prone, including the process of creating and enabling our own set of custom rules from our open-sourced Error Prone Support repository.
8. 8 • 23-Feb-23
Tools
Google/google-java-format
Reformats Java source code to comply
with Google Java Style.
checkstyle/checkstyle
Helps programmers write Java code
that adheres to a coding standard.
spotbugs/spotbugs
A tool for static analysis to look
for bugs in Java code.
SonarSource/sonarqube
Continuous Inspection.
9. 9 • 23-Feb-23
Picnic and its processes
1
Introduce Error Prone
2
Using Error Prone in practice!
3
Error Prone @ Picnic
4
Agenda
18. 18 • 23-Feb-23
Error Prone as superpower
What would that look like?
https://github.com/rickie/guava/
19. 19 • 23-Feb-23
Picnic and its processes
1
Introduce Error Prone
2
Using Error Prone in practice!
3
Error Prone @ Picnic
4
Agenda
20. 20 • 23-Feb-23
Roadmap to Enable Error Prone
Level 1:
Disable everything
Level 2:
Selectively turn on a
few ERROR checks
Level 3:
Turn on all default
ERROR checks
22. 22 • 23-Feb-23
Roadmap to Enable Error Prone
Level 1:
Disable everything
Level 2:
Selectively turn on a
few ERROR checks
Level 3:
Turn on all default
ERROR checks
23. 23 • 23-Feb-23
Picnic and its processes
1
Introduce Error Prone
2
Using Error Prone in practice!
3
Error Prone @ Picnic
4
Agenda
27. 27 • 23-Feb-23
Picnic’s Error Prone Support
Run Refaster rules from classpath
Test support for Refaster rules
Improved reporting on Refaster rules
Documentation website
https://error-prone.picnic.tech
35. 35 • 23-Feb-23
Unsure about next steps?
Feel free to reach out!
- https://errorprone.info
- https://error-prone.picnic.tech
Special thanks to:
Stephan Schroevers - stephan.schroevers@teampicnic.com
https://github.com/Stephan202
Contact details:
Rick Ossendrijver - rick.ossendrijver@teampicnic.com
https://github.com/rickie