Skip to content

Commit

Permalink
Documentation Update for Formatter set up
Browse files Browse the repository at this point in the history
  • Loading branch information
lorriborri authored Jul 11, 2024
1 parent a9efbb4 commit 90cd88c
Show file tree
Hide file tree
Showing 9 changed files with 53 additions and 5 deletions.
2 changes: 0 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,6 @@ This depends on you which kind of IDE you use for development. But we have some

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

Please look into https://github.com/mercedes-benz/sechub/issues/168 for source formatter config files and description for usage.

### Coding conventions

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 number Diff line number Diff line change
@@ -0,0 +1,15 @@
. Download the formatter xml file https://github.com/Daimler/sechub/files/4158667/sechub-eclipse-sourceformatter-setup.zip[here] and unzip it.

. Open Java Formatter page in preferences (Window->Preferences). Then press the import button and select the former unpacked xml file.
+
image::eclipse-java-formatter-import.png[]

. Ensure SecHub is your active profile. Select `SecHub` as active profile, then press apply and close.
+
image::eclipse-java-formatter-activate.png[]

. Before pushing your code please check your java format by executing spotless check.
+
----
./gradlew clean spotlessCheck
----
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
. Download the formatter xml file https://github.com/Daimler/sechub/files/4158667/sechub-eclipse-sourceformatter-setup.zip[here] and unzip it.

. Open Java Formatter page in preferences (File->Settings). Then press the import button and select the former unpacked xml file.
+
image::intelliJ-java-formatter-import.png[]

. Ensure SecHub is your active profile. Select `SecHub` as active profile, then press apply and close.
+
image::intelliJ-java-formatter-activate.png[]

. Before pushing your code please check your java format by executing spotless check.
+
----
./gradlew clean spotlessCheck
----
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ of your choice.
====== Create localhost server certificate
This is automatically done by former gradle call, so not necessary here.

====== Add Sechub Java Code Formatter

include::../shared/configuration/eclipse-java-sechub-formatter-setup.adoc[]

===== Others
====== Import projects
Import as you would normally do in your IDE.
Expand All @@ -67,6 +71,9 @@ just call `./gradlew ensureLocalhostCertificate`

This will generate a self signed server certificate for localhost.

====== Add Sechub Java Code Formatter (IntelliJ)

include::../shared/configuration/intelliJ-java-sechub-formatter-setup.adoc[]

==== Special developer files

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -256,13 +256,18 @@ Issues have labels a good way to start is to look for issues with https://github
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.
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.
** In case, the issue you want to work on does not yet exists, please create an issue.
** In case, the issue you want to work on does not yet exist, please create an issue.
. Create a new branch on your local fork following the naming pattern `feature-<issue-number>-<short-description>`
+
TIP: Example: `feature-36-go-client-supports-env-variable`.
. Implement your changes
. Set Up git configurations as explained here: https://mercedes-benz.github.io/sechub/latest/sechub-techdoc.html#sechub-git-configuration[Configure your git settings]
. Set up your IDE
. Implement your changes +
Please follow our coding conventions: https://mercedes-benz.github.io/sechub/latest/sechub-techdoc.html#section-coding-conventions[Coding conventions]
+
TIP: In case, you have any questions or need clarification ask inside the issues
Expand Down Expand Up @@ -455,6 +460,10 @@ image::eclipse-import-gradle-projects-sechub-selected.png[]
+
image::eclipse-egradle-sechub-imported.png[]
==== Add Sechub Java Code Formatter
include::documents/shared/configuration/eclipse-java-sechub-formatter-setup.adoc[]
==== Switch to `Dark` theme (Optional)
Needs to be done for every new workspace.
Expand All @@ -471,7 +480,7 @@ image::eclipse-dark-theme.png[]
. Press the `Apply and Close` button
== Set up IntelliJ for SecHub
=== Set up IntelliJ for SecHub
Requirements: IntelliJ IDE (Community or Ultimate) is installed.
Expand All @@ -487,6 +496,10 @@ image::intelliJ_javac_compiler.png[]
+
image::intelliJ_switch_to_intelliJ_compiler.png[]
==== Add Sechub Java Code Formatter
include::documents/shared/configuration/intelliJ-java-sechub-formatter-setup.adoc[]
== Run Integration Tests from IDE
=== Run Integration Tests From Eclipse IDE
Expand Down

0 comments on commit 90cd88c

Please sign in to comment.