Java Code is formatted using the Google Java Style Guide with minimal customizations.
- Open settings -> Editor -> Code Style
- Click the Gear icon next to the Scheme name
- Select Import Scheme -> Eclipse XML Profile
- Select the eclipse-java-google-style.xml file in the root of the repository
-
Add the following to your
settings.json
."java.format.settings.profile": "GoogleStyle", "java.format.settings.url": "eclipse-java-google-style.xml"
-
Allow method parameters to be on new lines
<setting id="org.eclipse.jdt.core.formatter.join_wrapped_lines" value="false"/>
Example:
return new PatientCommand.AddPatient( request.patient(), request.patientLocalId(), request.ssn(), request.dateOfBirth(), request.birthGender(), request.currentGender(), request.deceased(), request.deceasedTime(), request.maritalStatus(), request.ethnicity(), request.asOf(), request.comments(), request.createdBy(), request.createdAt());
-
Increase max line length to 120
<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="120"/>
Typescript formatting is handled by the Prettier plugin.