####Table of Contents
This guide should give any developer a quick reference of useful commands and guidelines which are used in this module.
This document is work in progress 👷
Contributions are welcome!
The build tool used is Maven
We use http://code.mycila.com/license-maven-plugin/ which makes sure that every java, xml, txt file has a correct OpenMRS license header. The license header content is taken from license-header.txt the formatting depends on the file type (java, xml, txt).
This plugin is automatically run on mvn clean package/install
and fails on
travis CI if a file misses or doesnt have a correct license header.
Add or update license header
mvn license:format
Check for wrong or missing license header
mvn license:check
We use https://github.com/velo/maven-formatter-plugin as source code formatter.
This plugin is automatically run on mvn clean package/install
(not on travis
CI) and formats java, javascript files only. JSPs and xmls have to be formatted
by you, so please configure your IDE formatter correctly.
Refer to formatter guide on how to configure your IDE.
Format source code
mvn formatter:format
We have some rules about what we think is code with style
You can find the rules about java code in the checkstyle.xml
.
This file is imported into codacy which we use to publicly display things we need to work on.
Check source code for style
If you want to check your changes locally, execute:
mvn checkstyle:checkstyle
This will generate html reports into
api/target/site/checkstyle.html
omod/target/site/checkstyle.html
to come
Please read the corresponding docker guide.