Skip to content

Commit 90cd88c

Browse files
authored
Documentation Update for Formatter set up
1 parent a9efbb4 commit 90cd88c

9 files changed

+53
-5
lines changed

CONTRIBUTING.md

-2
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,6 @@ This depends on you which kind of IDE you use for development. But we have some
9595

9696
Please check our [development-setup documentation](https://mercedes-benz.github.io/sechub/latest/sechub-techdoc.html#development-setup) for details.
9797

98-
Please look into https://github.com/mercedes-benz/sechub/issues/168 for source formatter config files and description for usage.
99-
10098
### Coding conventions
10199

102100
Please look at our [coding-conventions documentation](https://mercedes-benz.github.io/sechub/latest/sechub-techdoc.html#section-coding-conventions) for details.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
. Download the formatter xml file https://github.com/Daimler/sechub/files/4158667/sechub-eclipse-sourceformatter-setup.zip[here] and unzip it.
2+
3+
. Open Java Formatter page in preferences (Window->Preferences). Then press the import button and select the former unpacked xml file.
4+
+
5+
image::eclipse-java-formatter-import.png[]
6+
7+
. Ensure SecHub is your active profile. Select `SecHub` as active profile, then press apply and close.
8+
+
9+
image::eclipse-java-formatter-activate.png[]
10+
11+
. Before pushing your code please check your java format by executing spotless check.
12+
+
13+
----
14+
./gradlew clean spotlessCheck
15+
----
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
. Download the formatter xml file https://github.com/Daimler/sechub/files/4158667/sechub-eclipse-sourceformatter-setup.zip[here] and unzip it.
2+
3+
. Open Java Formatter page in preferences (File->Settings). Then press the import button and select the former unpacked xml file.
4+
+
5+
image::intelliJ-java-formatter-import.png[]
6+
7+
. Ensure SecHub is your active profile. Select `SecHub` as active profile, then press apply and close.
8+
+
9+
image::intelliJ-java-formatter-activate.png[]
10+
11+
. Before pushing your code please check your java format by executing spotless check.
12+
+
13+
----
14+
./gradlew clean spotlessCheck
15+
----

sechub-doc/src/docs/asciidoc/documents/techdoc/01_development.adoc

+7
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ of your choice.
5757
====== Create localhost server certificate
5858
This is automatically done by former gradle call, so not necessary here.
5959

60+
====== Add Sechub Java Code Formatter
61+
62+
include::../shared/configuration/eclipse-java-sechub-formatter-setup.adoc[]
63+
6064
===== Others
6165
====== Import projects
6266
Import as you would normally do in your IDE.
@@ -67,6 +71,9 @@ just call `./gradlew ensureLocalhostCertificate`
6771

6872
This will generate a self signed server certificate for localhost.
6973

74+
====== Add Sechub Java Code Formatter (IntelliJ)
75+
76+
include::../shared/configuration/intelliJ-java-sechub-formatter-setup.adoc[]
7077

7178
==== Special developer files
7279

Loading
Loading
Loading
Loading

sechub-doc/src/docs/asciidoc/sechub-developer-quickstart-guide.adoc

+16-3
Original file line numberDiff line numberDiff line change
@@ -256,13 +256,18 @@ Issues have labels a good way to start is to look for issues with https://github
256256
Issues with labels https://github.com/mercedes-benz/sechub/labels/beginner[`beginner`], https://github.com/mercedes-benz/sechub/labels/intermediate[`intermediate`], https://github.com/mercedes-benz/sechub/labels/advanced[`advanced`] indicate the level of difficulty.
257257
However, not all issues are labeled. In addition, if you like an issue just comment on it, so that we can assign you to it.
258258
259-
** In case, the issue you want to work on does not yet exists, please create an issue.
259+
** In case, the issue you want to work on does not yet exist, please create an issue.
260260
261261
. Create a new branch on your local fork following the naming pattern `feature-<issue-number>-<short-description>`
262262
+
263263
TIP: Example: `feature-36-go-client-supports-env-variable`.
264264
265-
. Implement your changes
265+
. Set Up git configurations as explained here: https://mercedes-benz.github.io/sechub/latest/sechub-techdoc.html#sechub-git-configuration[Configure your git settings]
266+
267+
. Set up your IDE
268+
269+
. Implement your changes +
270+
Please follow our coding conventions: https://mercedes-benz.github.io/sechub/latest/sechub-techdoc.html#section-coding-conventions[Coding conventions]
266271
+
267272
TIP: In case, you have any questions or need clarification ask inside the issues
268273
@@ -455,6 +460,10 @@ image::eclipse-import-gradle-projects-sechub-selected.png[]
455460
+
456461
image::eclipse-egradle-sechub-imported.png[]
457462
463+
==== Add Sechub Java Code Formatter
464+
465+
include::documents/shared/configuration/eclipse-java-sechub-formatter-setup.adoc[]
466+
458467
==== Switch to `Dark` theme (Optional)
459468
460469
Needs to be done for every new workspace.
@@ -471,7 +480,7 @@ image::eclipse-dark-theme.png[]
471480
472481
. Press the `Apply and Close` button
473482
474-
== Set up IntelliJ for SecHub
483+
=== Set up IntelliJ for SecHub
475484
476485
Requirements: IntelliJ IDE (Community or Ultimate) is installed.
477486
@@ -487,6 +496,10 @@ image::intelliJ_javac_compiler.png[]
487496
+
488497
image::intelliJ_switch_to_intelliJ_compiler.png[]
489498
499+
==== Add Sechub Java Code Formatter
500+
501+
include::documents/shared/configuration/intelliJ-java-sechub-formatter-setup.adoc[]
502+
490503
== Run Integration Tests from IDE
491504
492505
=== Run Integration Tests From Eclipse IDE

0 commit comments

Comments
 (0)