Contributions documentation
#comment Added contributions' guideline in Readme and exported config/CodeStyle.xml for setup IDE's Code Style rules Affected: README.md MAILAND-599
This commit is contained in:
parent
a9b2561e3c
commit
6fa62b2e70
44
README.md
44
README.md
|
@ -32,6 +32,50 @@ Then, go to the app’s root directory in the command line tool and run:
|
|||
|
||||
## Contributions
|
||||
|
||||
Contributions are appreciated, but must conform to Proton Guidelines.
|
||||
|
||||
#### Branch naming
|
||||
|
||||
Branch names must respect the pattern `type/description-of-the-change`.
|
||||
|
||||
*Type* must be one of the following:
|
||||
|
||||
* `chore` for changes not related to the Kotlin source code, for example a change in the build config
|
||||
* `doc` for changes related to source code documentation, or external document, like the README
|
||||
* `feat` for a new feature for the app
|
||||
* `fix` for fixing a feature that contains a bug
|
||||
* `refactor` for improving one or more unit of code, without impacting the behaviour of the app
|
||||
* `test` for everything related to test ( add a new test suite, add a new test into an already existing test suite or improve/modify the performance or the behaviour of an already existing test )
|
||||
|
||||
_description of change_ must be a concise and meaninful description of what is expected by the change apported; words must be separated by a dash `-`
|
||||
|
||||
The whole name of the branch must be lower case.
|
||||
|
||||
#### Commit message
|
||||
|
||||
The template for a commit message is the following
|
||||
|
||||
```
|
||||
<Title of the commit>
|
||||
|
||||
#comment <Description of the changes>
|
||||
Affected: <Item1, Item2>
|
||||
```
|
||||
|
||||
_Title_ is required and must start with a capital letter.
|
||||
|
||||
`#comment` field is optional if the Title can exhaustively explain the changes, otherwise is required. Body of the comment must start with a capital letter.
|
||||
|
||||
`Affected` is optional but highly appreciated and must be a comma separated list of the elements affected by the changes.
|
||||
|
||||
#### Code style and pattern
|
||||
|
||||
The code must conform the standards defined in the files `config/CodeStyle.xml` and `config/detekt.xml`.
|
||||
|
||||
`CodeStyle.xml` can be imported in the IDE ( _Prefecerenes -> Editor -> Code Style -> Import scheme_ for IntelliJ and Android Studio ).
|
||||
|
||||
Detekt reports can be generated with the command `./gradlew detekt`. Check _Detekt GitHub_ documentation for know how to download and configure the **optional** IDE plugin.
|
||||
|
||||
|
||||
|
||||
Copyright (c) 2020 Proton Technologies AG
|
||||
|
|
|
@ -0,0 +1,133 @@
|
|||
<code_scheme name="Default" version="173">
|
||||
<JetCodeStyleSettings>
|
||||
<option name="PACKAGES_TO_USE_STAR_IMPORTS">
|
||||
<value>
|
||||
<package name="java.util" withSubpackages="false" static="false" />
|
||||
<package name="studio.forface.easygradle.dsl" withSubpackages="true" static="false" />
|
||||
<package name="kotlinx.android.synthetic" withSubpackages="true" static="false" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="NAME_COUNT_TO_USE_STAR_IMPORT" value="2147483647" />
|
||||
<option name="NAME_COUNT_TO_USE_STAR_IMPORT_FOR_MEMBERS" value="2147483647" />
|
||||
</JetCodeStyleSettings>
|
||||
<codeStyleSettings language="XML">
|
||||
<indentOptions>
|
||||
<option name="CONTINUATION_INDENT_SIZE" value="4" />
|
||||
</indentOptions>
|
||||
<arrangement>
|
||||
<rules>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<NAME>xmlns:android</NAME>
|
||||
<XML_ATTRIBUTE />
|
||||
<XML_NAMESPACE>^$</XML_NAMESPACE>
|
||||
</AND>
|
||||
</match>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<NAME>xmlns:.*</NAME>
|
||||
<XML_ATTRIBUTE />
|
||||
<XML_NAMESPACE>^$</XML_NAMESPACE>
|
||||
</AND>
|
||||
</match>
|
||||
<order>BY_NAME</order>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<NAME>.*:id</NAME>
|
||||
<XML_ATTRIBUTE />
|
||||
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
|
||||
</AND>
|
||||
</match>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<NAME>.*:name</NAME>
|
||||
<XML_ATTRIBUTE />
|
||||
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
|
||||
</AND>
|
||||
</match>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<NAME>name</NAME>
|
||||
<XML_ATTRIBUTE />
|
||||
<XML_NAMESPACE>^$</XML_NAMESPACE>
|
||||
</AND>
|
||||
</match>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<NAME>style</NAME>
|
||||
<XML_ATTRIBUTE />
|
||||
<XML_NAMESPACE>^$</XML_NAMESPACE>
|
||||
</AND>
|
||||
</match>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<NAME>.*</NAME>
|
||||
<XML_ATTRIBUTE />
|
||||
<XML_NAMESPACE>^$</XML_NAMESPACE>
|
||||
</AND>
|
||||
</match>
|
||||
<order>BY_NAME</order>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<NAME>.*</NAME>
|
||||
<XML_ATTRIBUTE />
|
||||
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
|
||||
</AND>
|
||||
</match>
|
||||
<order>ANDROID_ATTRIBUTE_ORDER</order>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<NAME>.*</NAME>
|
||||
<XML_ATTRIBUTE />
|
||||
<XML_NAMESPACE>.*</XML_NAMESPACE>
|
||||
</AND>
|
||||
</match>
|
||||
<order>BY_NAME</order>
|
||||
</rule>
|
||||
</section>
|
||||
</rules>
|
||||
</arrangement>
|
||||
</codeStyleSettings>
|
||||
<codeStyleSettings language="kotlin">
|
||||
<option name="RIGHT_MARGIN" value="120" />
|
||||
<option name="ALIGN_MULTILINE_EXTENDS_LIST" value="true" />
|
||||
<option name="WRAP_ON_TYPING" value="0" />
|
||||
<indentOptions>
|
||||
<option name="CONTINUATION_INDENT_SIZE" value="4" />
|
||||
</indentOptions>
|
||||
</codeStyleSettings>
|
||||
</code_scheme>
|
Loading…
Reference in New Issue