jenkins.io
jenkins.io copied to clipboard
Developer Guide: Document static analysis and annotation best practices.
As a newcomer Jenkins component developer/maintainer, I would like to see code quality best practices documented somewhere. Static analysis is one of the common ways to improve code quality. In the Jenkins core and many plugins we have established best practices about static analysis in Java (e.g. annotating APIs with SpotBugs annotations, concurrency annotations, Find-Sec-Bugs, API compatibility checks, etc.). There are also static analysis flows for JavaScript and other languages used in Jenkins.
I would suggest to create a new page targeting Java/Groovy, and a separate page for JavaScript. Other languages is TBD. What could we include into the documentation?
- Brief documentation of what Jenkins Parent POMs and the Pipeline Library offer for static analysis: SpotBugs, FindSecBugs, Animal Sniffer, etc.
- Recommendations for annotating public and internal APIs (
@CheckForNull, etc.) - // Any other information
CC @StefanSpieker @halkeye who might me interested to contribute to these guidelines
I really like the idea. And this might also be a nice place to discuss the way we want to move forward in respect to code quality.