Skip to content

Latest commit

 

History

History
81 lines (55 loc) · 2.38 KB

CONTRIBUTING.md

File metadata and controls

81 lines (55 loc) · 2.38 KB

Contributing

Find or file an issue to work on

If you're looking to add a feature or fix a bug and there's no issue filed yet, it's good to file an issue first to have a discussion about the change before you start working on it.

If you're new and looking for things to contribute, see our good first issue label. These issues are usually ready to work on and don't require deep knowledge of the library's internals.

Development Environment Setup

Mise

This project uses mise for environment management. You can either:

Option 1: Use mise (Recommended)

Install mise if you haven't already: https://mise.jdx.dev/getting-started.html. Run mise install in the project root to install all required tools. Still read the rest of the guide, because not all tools are managed by mise.

Option 2: Manual Setup

If you prefer not to use mise, check mise.toml for the list of required tools and versions, then install them manually.

Cloning the Repository

This repository uses a Git submodule for test data. When cloning, make sure to include the --recurse-submodules flag:

git clone --recurse-submodules 'https://github.com/PokeAPI/pokekotlin.git'

If you've already cloned the repository without submodules, you can initialize them with:

git submodule update --init --recursive

IDE Setup

  1. Open the project in IntelliJ IDEA or similar IDE.
  2. Make sure you have the Kotlin Multiplatform plugin installed. This should be included by default in recent versions of IntelliJ IDEA and Android Studio.
  3. For more information on setting up Kotlin Multiplatform, refer to the official Kotlin Multiplatform documentation.

Running Tests

Most tests in this project rely on a local server that serves the PokeAPI data from static files. The server needs to be running before executing the tests.

You can start the test server using the provided script:

mise run test-server

Code Formatting

The project uses a number of tools for code formatting. You can apply the formatting rules with:

mise run fix

If you'd prefer to apply automatically on commit, opt in to the pre-commit hook with:

hk install