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.
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.
Some files within spring-cloud-azure make use of [Project Lombok](https://howtodoinjava.com/automation/lombok-eclipse-installation-examples/#lombok-eclipse) - this must be installed within Eclipse, otherwise the IDE will flag certain uses of the library as compilation errors.
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 FormatterfromFile > 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.
-
Submit an issue describing your proposed change
-
A repository owner will respond to your issue as soon as possible
-
If your proposed change is accepted, and you haven’t already done so, sign a Contributor License Agreement
-
Fork the repository, develop and test your code changes
-
Ensure that your code adheres to the Spring Style Guide
-
Ensure your code has an appropriate set of unit tests which all pass
-
If no-one else is using your branch, please rebase it against the current master (or other target branch in the main project).
-
Submit a pull request. It will be approved and merged by a committer
None of these is essential for a pull request, but they will all help. They can also be added after the original pull request but before a merge.
-
Make sure all new
.javafiles to have a simple Javadoc class comment with at least an@authortag identifying you, and preferably at least a paragraph on what the class is for. -
Add the ASF license header comment to all new
.javafiles (copy from existing files in the project). -
Add yourself as an
@authorto the .java files that you modify substantially (more than cosmetic changes). -
Add some Javadocs and, if you change the namespace, some XSD doc elements.
-
When writing a commit message please follow these conventions, if you are fixing an existing issue please add
Fixes gh-XXXXat the end of the commit message (where XXXX is the issue number).