Development Coding Style
Style
Follow the Google style guide with the following exceptions:
- Non static imports are separated into in three blocks (in this order):
- Classes within the PSL project (including utils/experimental).
- Third party classes not part of the Java standard library.
- Java standard library classes.
- Indentation is 4 spaces.
- Soft tabs
- Consecutive blank lines are not allowed.
- Avoid block comments (
/* */
) inside methods. - Don’t use
@author
tags in javadoc comments.
Continuous Integration
PSL uses continuous integration (currently Travis) to run several different processes for each push. The specifics of the CI settings can be found in the .travis.yml configuration file and the .ci directory.
General style and lint checks can be run using the .ci/style-and-lint.sh script:
.ci/style-and-lint.sh
Tests
The tests run in the CI are run through maven using:
mvn integration-test -B
Lint Checks
Lint checks are done using SpotBugs. An exclusion filter is located at .ci/spotbugs-exclude.xml. Documentation on how to write filter statements can be found here. Filters should be written to be specific and as narrow as reasonable.
The lint checks can be run through maven using:
mvn spotbugs:check
Docs
Building PSL also involves building the PSL javadocs. When a release is done (a tag that looks like a version is pushed), the documentation will automatically be pushed to the PSL website. See .ci/deploy-docs.sh for all the details.
Edit This Page