Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
117 changes: 117 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
# Contribution Guidelines

**Note:** If these contribution guidelines are not followed your issue or PR might be closed, so please read them carefully.


## Contribution types


### Bug Reports

- If you find a bug, please first report it using [Github issues](https://github.com/faire/ksp-reflection-testing)
- First, check if there is not already an issue for it; duplicated issues will be closed.


### Bug Fix

- If you'd like to submit a fix for a bug, please read the [How To](#how-to-contribute) for how to send a Pull Request.
- Indicate on the open issue that you are working on fixing the bug and the issue will be assigned to you.
- Write `Fixes #xxxx` in your PR text, where xxxx is the issue number (if there is one).
- Include a test that isolates the bug and verifies that it was fixed.


### New Features

- If you'd like to add a feature to the library that doesn't already exist, feel free to describe the feature in a new
[GitHub issue](https://github.com/faire/ksp-reflection-testing/issues).
- If you'd like to implement the new feature, please wait for feedback from the project maintainers before spending too much time writing the code.
In some cases, enhancements may not align well with the project's future development direction.
- Implement the code for the new feature and please read the [How To](#how-to-contribute).


### Documentation & Miscellaneous

- If you have suggestions for improvements to the documentation or examples (or something else), we would love to hear about it.
- As always first file a [Github issue](https://github.com/faire/ksp-reflection-testing/issues).
- Implement the changes to the documentation, please read the [How To](#how-to-contribute).


## How To Contribute


### Requirements

For a contribution to be accepted:

- Follow the the style and formatting of the project when writing the code;
- Compile, test, format, and lint code using `./gradlew build` (or your IDE of choice);
- Documentation should always be updated or added (if applicable);
- Tests should always be updated or added (if applicable) -- check the [Test writing guide] for more details;
- The PR title should start with a [conventional commit][conventional commit] prefix (`feat:`, `fix:`, etc).

If the contribution doesn't meet these criteria, a maintainer will discuss it with you on the issue or PR. You can still continue to add more commits to the
branch you have sent the Pull Request from and it will be automatically reflected in the PR.


## Open an issue and fork the repository

- If it is a bigger change or a new feature, first of all [file a bug or feature report](https://github.com/faire/ksp-reflection-testing/issues), so that we can discuss what
direction to follow.
- [Fork the project](https://docs.github.com/en/get-started/quickstart/contributing-to-projects) on GitHub.
- Clone the forked repository to your local development machine (e.g. `git clone git@github.com:<YOUR_GITHUB_USER>/ksp-reflection-testing.git`).


### Environment Setup

This project is managed with the included Gradle wrapper, which should download the appropriate version for you. You will also need Java `21` or newer.

To run the "build", which includes compilation, tests, lint, formatting, and other checks, run:


```shell
./gradlew build
```


### Performing changes

- Create a new local branch from `main` (e.g. `git checkout -b user.my-new-feature`)
- Make your changes (try to split them up with one PR per feature/fix).
- When committing your changes, make sure that each commit message is clear
- Push your new branch to your own fork into the same remote branch


### Breaking changes

When doing breaking changes, a deprecation tag should be added first containing a message that conveys to what method should be used instead to perform the
task.

Also don't forget to include the `!` as part of your conventional commit prefix when actually removing old code.


### Open a pull request

Go to our [pull request page](https://github.com/faire/ksp-reflection-testing/pulls) and in the top it will ask you if you want to open a pull request from
your newly created branch.

The title of the pull request should start with a [conventional commit][conventional commit] type.

Allowed types are:

- `fix:` -- patches a bug and is not a new feature;
- `feat:` -- introduces a new feature;
- `docs:` -- updates or adds documentation or examples;
- `test:` -- updates or adds tests;
- `refactor:` -- refactors code but doesn't introduce any changes or additions to the public API;
- `perf:` -- code change that improves performance;
- `build:` -- code change that affects the build system or external dependencies;
- `ci:` -- changes to the CI configuration files and scripts;
- `chore:` -- other changes that don't modify source or test files;
- `revert:` -- reverts a previous commit.

If you introduce a **breaking change** the conventional commit type MUST end with an exclamation mark (e.g. `feat!: Remove method XXX`).

The sentence of the commit (after the `:`) should start with a verb in the present tense; as a rule of thumb, think that the commit message will complete the
sentence "This commit will ...". For example, "Add support for ..." or "Fix bug with ...".

[conventional commit]: https://www.conventionalcommits.org/en/v1.0.0/
22 changes: 22 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
MIT License

Copyright (c) 2026 Faire

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,18 @@
# ksp-reflection-testing

A reflection test harness for [KSP](https://kotlinlang.org/docs/ksp-overview.html); use reflection to seamlessly test your KSP generators.


## Getting Started

You can check out our tests in this repo to see how to use the library (more instructions to come soon).


## Contributing

If you like ksp-reflection-testing, give us a star to help the project!

Have you found a bug or have a suggestion? Open an [issue](https://github.com/Faire/ksp-reflection-testing/issues) and we will take a
look at it as soon as possible.

Do you want to contribute with a PR? Make sure to read our [Contributing Guide](/CONTRIBUTING.md)!