Thanks for your interest in contributing!
- Erlang/OTP 24+ (27 recommended)
- rebar3 3.22+
- git
- make
# Clone
git clone https://github.com/lfe/rebar3.git
cd rebar3_lfe
# Create branch
git checkout -b feature/my-feature
# Compile
rebar3 compile
# Run tests
rebar3 ct
# Run all checks
make checkgit checkout -b feature/my-featureBranch naming:
feature/- New featuresfix/- Bug fixesdocs/- Documentation onlyrefactor/- Code refactoringtest/- Test improvements
Follow the code style:
%% ✅ Good
-spec my_function(integer()) -> integer().
my_function(N) ->
N + 1.
%% ❌ Bad (no spec)
my_function(N) ->
N + 1.%% test/my_feature_SUITE.erl
my_test(_Config) ->
?assertEqual(Expected, Actual).# Unit tests
rebar3 ct
# Property tests
rebar3 proper
# All checks
make check
# Coverage
make coveragegit add .
git commit -m "feat: add amazing feature"Commit message format:
type: description
- feat: New feature
- fix: Bug fix
- docs: Documentation
- test: Tests
- refactor: Refactoring
git push origin feature/my-featureThen create PR on GitHub.
- Use
-specfor all exported functions - Max line length: 100 characters
- Use meaningful variable names
- Add comments for complex logic
- Aim for >90% coverage
- Unit tests for individual functions
- Integration tests for workflows
- Property tests for invariants
- Update docs for API changes
- Add examples for new features
- Keep CHANGELOG up to date
r3lfe/
├── src/ # Source code
│ ├── r3lfe*.erl # Modules
│ └── r3lfe.hrl # Shared header
├── test/ # Tests
│ ├── *_SUITE.erl # CT suites
│ └── test_utils.erl
└── docs/ # Documentation
Test single functions in isolation:
simple_test(_Config) ->
Input = "test",
Expected = "result",
Actual = my_module:my_function(Input),
?assertEqual(Expected, Actual).Test complete workflows:
workflow_test(Config) ->
Setup = setup_test_project(Config),
Result = run_full_compilation(Setup),
?assertMatch({ok, _}, Result).Test invariants:
prop_reversible() ->
?FORALL(Input, input_generator(),
reverse(reverse(Input)) =:= Input).- Create
src/r3lfe_prv_mycommand.erl - Implement provider behavior
- Add tests in
test/ - Register in
src/r3lfe.erl - Update documentation
- Write tests first (TDD)
- Implement feature
- Ensure all tests pass
- Update documentation
- Add example if applicable
- Write failing test
- Fix the bug
- Ensure test passes
- Add regression test
- Update CHANGELOG
(For maintainers)
# 1. Update version
vim src/r3lfe.app.src
# 2. Update CHANGELOG
vim docs/release-history.md
# 3. Tag release
git tag v0.5.0
git push origin v0.5.0
# 4. Publish to hex
rebar3 hex publish- Questions: GitHub Discussions
- Bugs: GitHub Issues
- Chat: LFE Slack
Be respectful and constructive.
By contributing, you agree your contributions will be licensed under Apache 2.0.