Contributing to Exposed
We're delighted that you're considering contributing to Exposed!
There are multiple ways you can contribute:
Issues and Feature Requests
Documentation
Code
Community Support
This project and the corresponding community is governed by the JetBrains Open Source and Community Code of Conduct. Independently of how you'd like to contribute, please make sure you read and comply with it.
Issues and Feature Requests
If you encounter a bug or have an idea for a new feature, please submit it to us through YouTrack, our issue tracker. While issues are visible publicly, either creating a new issue or commenting on an existing one does require logging in to YouTrack.
Before submitting an issue or feature request, search YouTrack's existing issues to avoid reporting duplicates.
When submitting an issue or feature request, 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.
Documentation
There are multiple ways in which you can contribute to Exposed documentation:
Create an issue in YouTrack.
Submit a pull request containing your proposed changes. Ensure that these modifications are applied directly within the
documentation-websitedirectory only, not to files in thedocsfolder.
Code
Pull Requests
Contributions are made using GitHub pull requests:
Fork the Exposed repository, because imitation is the sincerest form of flattery.
Clone your fork to your local machine.
Create a new branch for your changes.
Create a new PR with a request to merge to the main branch.
Ensure that the PR title is clear and refers to an existing ticket/bug if applicable, prefixing the title with both a conventional commit and EXPOSED-{NUM}, where {NUM} refers to the YouTrack issue code. For more details about the suggested format, see commit messages.
When contributing a new feature, provide motivation and use-cases describing why the feature not only provides value to Exposed, but also why it would make sense to be part of the Exposed framework itself. Complete as many sections of the PR template description as applicable.
If the contribution requires updates to documentation (be it updating existing content or creating new content), either do so in the same PR or file a new ticket on YouTrack. Any new public API objects should be documented with a KDoc in the same PR.
If the contribution makes any breaking changes, ensure that this is properly denoted in 3 ways:
In the PR (and commit) title using the appropriate conventional commit
By ticking the relevant checkbox in the PR template description
By adding relevant details to Breaking Changes
Make sure any code contributed is covered by tests and no existing tests are broken. We use Docker containers to run tests.
Execute the
detekttask in Gradle to perform code style validation.Finally, make sure to run the
apiCheckGradle task. If it's not successful, run theapiDumpGradle task. Further information can be found here.
Style Guides
A few things to remember:
Your code should conform to the official Kotlin code style guide except that star imports should always be enabled. (ensure Preferences | Editor | Code Style | Kotlin, tab Imports, both
Use import with '*'should be checked).Every new source file should have a copyright header.
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
KDocscannot 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 writingfun testMyTest() = withDb{}.
Commit messages
Commit messages should be written in English.
Their title should be prefixed according to Conventional Commits.
They should be written in present tense using imperative mood ("Fix" instead of "Fixes", "Improve" instead of "Improved"). See How to Write a Git Commit Message.
When applicable, prefix the commit message with EXPOSED-{NUM} where {NUM} refers to the YouTrack issue code.
An example could be:
fix: EXPOSED-123 Fix a specific bug
Setup
Testing on Apple Silicon
To run Oracle XE tests, you need to install Colima container runtime. It will work in pair with your docker installation.
After installing, you need to start the colima daemon in arch x86_64 mode:
The test task can automatically use colima context when needed, and it's better to use default context for other tasks. To switch the context to default, run:
Make sure that default is used as default docker context:
Community Support
If you'd like to help others, please join our Exposed channel on the Kotlin Slack workspace and help out. It's also a great way to learn!
Thank you for your cooperation and for helping to improve Exposed.