We welcome contributions! This document provides guidelines and instructions for contributing.
Getting Started
- Fork the repository
- Clone your fork:
git clone https://github.com/your-username/luhn_ex.git cd luhn_ex - Install dependencies:
mix deps.get - Make sure existing tests pass:
mix test
Development Setup
We use asdf for managing Elixir and Erlang versions.
A .tool-versions file is included in the repository. Install the correct
versions with:
asdf install
Making Changes
- Create a topic branch from
master:git checkout -b my-feature master - Make your changes in logical commits
- Add or update tests as needed
- Ensure all checks pass before submitting:
mix test mix format --check-formatted mix credo --strict mix dialyzer
Code Style
- Run
mix formatbefore committing — CI enforces formatting - Follow Credo suggestions (
mix credo --strict) - Add
@docand@specto all public functions - Use doctests for simple examples
Running Benchmarks
mix run bench/bench.exs
Pull Requests
- Keep PRs focused — one feature or fix per PR
- Update
CHANGELOG.mdunder the[Unreleased]section - Write a clear PR description explaining what and why
- Link any related issues
- Large changes should be discussed in an issue first
Bug Reports
When filing a bug report, please include:
- Elixir and OTP versions (
elixir --version) - Luhn version
- Steps to reproduce
- Expected vs actual behavior
License
By contributing, you agree that your contributions will be licensed under the MIT License.