Skip to content

Latest commit

 

History

History
41 lines (27 loc) · 2.04 KB

CONTRIBUTING.adoc

File metadata and controls

41 lines (27 loc) · 2.04 KB

Code formatting guidelines

The directory src/eclipse has two files for use with code formatting, eclipse-code-formatter.xml for the majority of the code formatting rules and eclipse.importorder to order the import statements.

Eclipse

Import these files by navigating Windows → Preferences and then the menu items Preferences > Java > Code Style > Formatter and Preferences > Java > Code Style > Organize Imports respectively.

IntelliJ IDEA

Install the plugin Eclipse Code Formatter. You can find it by searching in "Browse Repositories", under Settings > Plugins within IDEA (Once installed, you will need to reboot IDEA for it to take effect).

Then navigate to Settings > Other Settings (this might be under Preferences on Mac) and select the Eclipse Code Formatter. Select the eclipse-code-formatter.xml file for the field Eclipse Java Formatter config file and the file eclipse.importorder for the field Import order. Enable the Eclipse code formatter by clicking Use the Eclipse code formatter radio button at the top of the page, then click the OK button.

  • NOTE: If you configure the Eclipse Code Formatter from File > Other Settings > Default Settings, it will set this policy across all of your IDEA projects.

  • IDEA’s "Optimize imports on the fly" option turned on interferes with the Eclipse code formatter import optimization. Consider disabling the option if optimization does not yield the expected results.

Contributing a patch

  1. Submit an issue describing your proposed change

  2. A repository owner will respond to your issue as soon as possible

  3. If your proposed change is accepted, and you haven’t already done so, sign a Contributor License Agreement

  4. Fork the repository, develop and test your code changes

  5. Ensure that your code adheres to the Spring Style Guide

  6. Ensure your code has an appropriate set of unit tests which all pass

  7. Submit a pull request. It will be approved and merged by a committer