Skip to content

Commit

Permalink
docs: Update Contributing documentation with code style details (#2051)
Browse files Browse the repository at this point in the history
* docs: Update Contributing documentation with code style details

* docs: Review issues
  • Loading branch information
obabichevjb authored Apr 19, 2024
1 parent 324ef14 commit 123bba9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ Currently, Exposed is available for **maven/gradle builds**. Check the [Maven Ce
For more information visit the links below:

- [Documentation](https://jetbrains.github.io/Exposed/home.html) with examples and docs
- [Contributing to Exposed](#contributing)
- [Migration Guide](https://jetbrains.github.io/Exposed/migration-guide.html)
- [Breaking changes](https://jetbrains.github.io/Exposed/breaking-changes.html) and any migration details
- [Slack Channel](https://kotlinlang.slack.com/messages/exposed/)
Expand Down
16 changes: 13 additions & 3 deletions documentation-website/Writerside/topics/Contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ Contributions are made using Github [pull requests](https://help.github.com/en/a
7. If the contribution requires updates to documentation (be it updating existing contents or creating new one), please
file a new ticket on [YouTrack](https://youtrack.jetbrains.com/issues/EXPOSED).
8. Make sure any code contributed is covered by tests and no existing tests are broken. We use Docker containers to run tests.
9. Finally, make sure to run the `apiCheck` Gradle task. If it's not successful, run the `apiDump` Gradle task. Further information can be
9. Execute the `detekt` task in Gradle to perform code style validation.
10. Finally, make sure to run the `apiCheck` Gradle task. If it's not successful, run the `apiDump` Gradle task. Further information can be
found [here](https://github.com/Kotlin/binary-compatibility-validator).

#### Style Guides
Expand All @@ -68,6 +69,14 @@ A few things to remember:
* Every public API (including functions, classes, objects and so on) should be documented,
every parameter, property, return types, and exceptions should be described properly.

Test functions:

* Begin each test function name with the word `test`.
* Employ camelCase for test function names, such as `testInsertEmojisWithInvalidLength`.
* Refrain from using names enclosed in backticks for test functions, because `KDocs` cannot reference function names that contain spaces.
* In the definition of test functions, use a block body instead of an assignment operator.
For example, do write `fun testMyTest() { withDb{} }`, and avoid writing `fun testMyTest() = withDb{}`.

#### Commit messages

* Commit messages should be written in English.
Expand All @@ -82,7 +91,8 @@ A few things to remember:
There are multiple ways in which you can contribute to Exposed docs:

- Create an issue in [YouTrack](https://youtrack.jetbrains.com/issues/EXPOSED).
- Submit a pull request with proposed changes.
- Submit a pull request containing your proposed changes.
Ensure that these modifications are applied directly within the `documentation-website` directory.

### Community Support

Expand All @@ -99,4 +109,4 @@ Before submitting an issue or feature request, please search YouTrack's existing
When submitting an issue or feature request, please provide as much detail as possible, including a clear and concise description of the problem or
desired functionality, steps to reproduce the issue, and any relevant code snippets or error messages.

Thank you for your cooperation and for helping to improve Exposed.
Thank you for your cooperation and for helping to improve Exposed.

0 comments on commit 123bba9

Please sign in to comment.