# Contributing to Infr
We welcome contributions to Infr! Before you get started, please review the following.
## Contributor License Agreement
All contributions to this project are subject to our [Contributor License Agreement](CLA.md). By submitting a pull request, you agree to the terms of the CLA, which includes assigning copyright of your contributions to the project owner.
Please read the CLA carefully before contributing.
## Getting Started
1. Fork the repository
2. Create a feature branch from `main`
3. Make your changes
4. Run the test suite: `cargo test`
5. Ensure formatting and linting pass:
```bash
cargo fmt --all -- --check
cargo clippy -- -D warnings
```
6. Submit a pull request
## Bug Fix Workflow
When fixing bugs, please follow this order:
1. Add a regression test that reproduces the issue
2. Run the test and verify it fails
3. Implement the fix
4. Run the test again and verify it passes
## Code Quality
- Prefer clean, long-term solutions over quick hacks
- Keep changes focused — don't mix unrelated changes in one PR
- All tests must pass before a PR will be merged
## Adding Conformance Tests
To add a conformance test, create a new `.infr` file in `tests/conformance/` with expected diagnostic comments (`#> OK`, `#> Error [infr]: ...`, `#> Warning`).
## Questions?
Open an issue if you have questions about contributing.