Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Update Contributing documentation with code style details #2051

Merged
merged 2 commits into from
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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](https://jetbrains.github.io/Exposed/contributing.html)
obabichevjb marked this conversation as resolved.
Show resolved Hide resolved
- [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
13 changes: 11 additions & 2 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 Down Expand Up @@ -99,4 +108,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.
Loading