From b479fa242815ee1c786ca5c1156c8128cc8a1ba6 Mon Sep 17 00:00:00 2001 From: Oleg Babichev Date: Wed, 17 Apr 2024 15:27:36 +0200 Subject: [PATCH 1/2] docs: Update Contributing documentation with code style details --- README.md | 1 + .../Writerside/topics/Contributing.md | 13 +++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0b8df0ead3..5a2d828366 100644 --- a/README.md +++ b/README.md @@ -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) - [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/) diff --git a/documentation-website/Writerside/topics/Contributing.md b/documentation-website/Writerside/topics/Contributing.md index 0f61a2466e..3c637ed117 100644 --- a/documentation-website/Writerside/topics/Contributing.md +++ b/documentation-website/Writerside/topics/Contributing.md @@ -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 @@ -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. @@ -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. \ No newline at end of file +Thank you for your cooperation and for helping to improve Exposed. From 83e1f1bf1682766fc6fe2839a9c45c4546296429 Mon Sep 17 00:00:00 2001 From: Oleg Babichev Date: Thu, 18 Apr 2024 09:05:54 +0200 Subject: [PATCH 2/2] docs: Review issues --- README.md | 2 +- documentation-website/Writerside/topics/Contributing.md | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5a2d828366..5725170896 100644 --- a/README.md +++ b/README.md @@ -194,7 +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) +- [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/) diff --git a/documentation-website/Writerside/topics/Contributing.md b/documentation-website/Writerside/topics/Contributing.md index 3c637ed117..515e4528a5 100644 --- a/documentation-website/Writerside/topics/Contributing.md +++ b/documentation-website/Writerside/topics/Contributing.md @@ -91,7 +91,8 @@ Test functions: 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