Skip to content
pk11 edited this page Apr 25, 2012 · 8 revisions

Contributor Guidelines

Implementation-wise, the following things should be avoided as much as possible:

  • public mutable state
  • global state
  • implicit conversions
  • threadLocal
  • locks
  • casting Also, be careful with introducing new, heavy external dependencies.

API design

  • java APIs should go to framework/play/src/main/java, package structure is play.myapipackage.xxxx
  • scala APIs should go to framework/play/src/main/scala, where the package structure is play.api.myapipackage
  • java and scala APIs should be implemented the following way:
  • features are forever, always think about whether a new feature really belongs to the core framework or it should be implemented as a plugin
  • if you are in doubt, ask on the mailing list
  • Play is a Java and Scala framework, make sure your changes are working for both API-s

Testing and documentation

  • each and every public facing method and class need to have a corresponding scaladoc or javadoc with examples, description etc.
  • each feature requires either a functional test (framework/integrationtest) or a spec (/play/src/test)
  • run Play's integration test suite framework/runtests before pushing. If a test fails, fix it, do not ignore it.

source format

  • run scalariform-format before commit

git commits

  • prefer rebase
  • bigger changesets

Clone this wiki locally