diff --git a/README.md b/README.md index 11876542ff51ef921c9cee30e63d8cb741f3517e..552d98aae3a500aa584f179aab074a6d26165052 100644 --- a/README.md +++ b/README.md @@ -119,4 +119,33 @@ The project does not uses modules yet. Add '--add-opens' statements manually whe ## Setting up IntelliJ Idea 1. Under "IntelliJ IDEA" -> "Preferences" -> "Languages and Frameworks" -> Javascript, set the - language version to ECMAScript 6. \ No newline at end of file + language version to ECMAScript 6. + +## Coding Style + +openBIS source code uses a particular style preset that guarantees all code is formatted uniformly. + +To make use of the preset go to File/Settings or IntelliJIDEA/Preferences depending on your OS. + +Then import the XML file under 'docs/CISD_Conventions_IntelliJ_V2.xml'. See images below. + + + + + + +## Git Hooks + +openBIS source code commit messages use a particular formatting. + +This formatting guarantees that there is a User Story behind it. + +To ensure commits follow the formatting 'Git Hooks' are provided. + +Just copy them from the root folder of this repo run the next command: +```` +%/> cp ./docs/hooks/* ./.git/hooks/ +%/> git add README.md +%/> git commit -m "Test incorrectly formatted message" +Aborting commit. Your commit message is missing an issue number ('SSDM-XXXXX:') +```` \ No newline at end of file diff --git a/docs/codestyle/CISD_Conventions_Eclipse_V2.xml b/docs/codestyle/SIS_Conventions_Eclipse_V3.xml similarity index 99% rename from docs/codestyle/CISD_Conventions_Eclipse_V2.xml rename to docs/codestyle/SIS_Conventions_Eclipse_V3.xml index 970407607e2eeb528e6bdbd366d796b09e66e056..e5b96759015a73db876f96129ca0aa66d9aed081 100644 --- a/docs/codestyle/CISD_Conventions_Eclipse_V2.xml +++ b/docs/codestyle/SIS_Conventions_Eclipse_V3.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <profiles version="21"> - <profile kind="CodeFormatterProfile" name="CISD Conventions V2" version="21"> + <profile kind="CodeFormatterProfile" name="SIS Conventions V3" version="21"> <setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="space"/> <setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="false"/> <setting id="org.eclipse.jdt.core.formatter.indentation.size" value="4"/> diff --git a/docs/codestyle/CISD_Conventions_IntelliJ_V2.xml b/docs/codestyle/SIS_Conventions_IntelliJ_V3.xml similarity index 97% rename from docs/codestyle/CISD_Conventions_IntelliJ_V2.xml rename to docs/codestyle/SIS_Conventions_IntelliJ_V3.xml index 2d251e3189b41da182e320f69be511f95b0a5f06..8973b64af4b610bfdb3a7d99f026ad0e9ba464e0 100644 --- a/docs/codestyle/CISD_Conventions_IntelliJ_V2.xml +++ b/docs/codestyle/SIS_Conventions_IntelliJ_V3.xml @@ -1,4 +1,4 @@ -<code_scheme name="CISD Conventions V2" version="173"> +<code_scheme name="SIS Conventions V3" version="173"> <option name="RIGHT_MARGIN" value="100" /> <JavaCodeStyleSettings> <option name="SPACE_AFTER_CLOSING_ANGLE_BRACKET_IN_TYPE_ARGUMENT" value="true" /> diff --git a/docs/readme/intellij-codestyle-config-1.png b/docs/readme/intellij-codestyle-config-1.png new file mode 100644 index 0000000000000000000000000000000000000000..031b7700443046850c21f2a92f8570139e34c4ef Binary files /dev/null and b/docs/readme/intellij-codestyle-config-1.png differ diff --git a/docs/readme/intellij-codestyle-config-2.png b/docs/readme/intellij-codestyle-config-2.png new file mode 100644 index 0000000000000000000000000000000000000000..bbeeb8852a4afbeeec7374efae326ef48a6c0f33 Binary files /dev/null and b/docs/readme/intellij-codestyle-config-2.png differ diff --git a/docs/readme/intellij-codestyle-config-3.png b/docs/readme/intellij-codestyle-config-3.png new file mode 100644 index 0000000000000000000000000000000000000000..5f79742671fd90a98aab66eaa2fc2a605eca680a Binary files /dev/null and b/docs/readme/intellij-codestyle-config-3.png differ diff --git a/docs/readme/intellij-codestyle-config-4.png b/docs/readme/intellij-codestyle-config-4.png new file mode 100644 index 0000000000000000000000000000000000000000..6c432bc5b6b59f3147a0e93a6af51635bda25865 Binary files /dev/null and b/docs/readme/intellij-codestyle-config-4.png differ