Thank you for your interest in contributing to the fcitx5-lotus project! This document guides you on how to participate in project development.
- Getting Started
- Contribution Workflow
- Code of Conduct
- Code Style Rules
- Pull Request Process
- Important Notes on Branching
- Bug Reporting
- Feature Requests
- GCC or Clang with C++17 support
- CMake >= 3.16
- Go 1.20+ (for bamboo engine)
- Fcitx5 development headers
- Git
# Clone repository
git clone https://github.com/LotusInputMethod/fcitx5-lotus.git
cd fcitx5-lotus
# Initialize submodules
git submodule update --init --recursive
# Build
mkdir build && cd build
cmake ..
make -j$(nproc)Fork this repository on GitHub and clone your fork to your machine.
git clone https://github.com/yourusername/fcitx5-lotus.git
cd fcitx5-lotus
git remote add upstream https://github.com/LotusInputMethod/fcitx5-lotus.gitAlways create a new branch for each feature or bug fix:
git checkout dev
git pull upstream dev
git checkout -b feature/feature-name
# or
git checkout -b fix/bug-name- Write clean, readable code
- Follow code style rules (see below)
- Update documentation if needed
Use clear and descriptive commit messages:
feat: add emoji support
- Add emoji_data.h
- Update generate_emoji_header.py
All members contributing to this project must adhere to the Contributor Code of Conduct to build an open, friendly, and healthy community.
- Follow the
.clang-formatfile in the repository - Encouraged to create a hook for pre-commit to automatically format code before commit by creating a file .git/hooks/pre-commit with the following content:
#!/bin/bash
FILES=$(git diff --cached --name-only --diff-filter=ACMR | grep -E '\.(cpp|h)$')
if [ -n "$FILES" ]; then
for file in $FILES; do
clang-format -i "$file"
git add "$file"
done
fiThen run the command: chmod +x .git/hooks/pre-commit
# Build C++ code
cd build
cmake .. && makegit checkout dev
git pull upstream dev
git checkout feature/feature-name
git rebase devgit push origin feature/feature-nameCreate a Pull Request on GitHub with:
- Clear descriptive title
- Detailed description of changes
- Link to related issue (if any)
- Screenshots for UI changes
NEVER create a Pull Request into the main branch
- The
mainbranch only contains stable releases and is only merged by the maintainer - All Pull Requests must target the
devbranch - After passing all CI/CD tests and being reviewed by the maintainer, code will be merged into
dev - When eligible, code will be merged from
devtomainby the maintainer to bump the version
main ← Stable release (only maintainer merges)
↑
dev ← Main development branch (all PRs merge here)
↑
feature/*, fix/*, hotfix/* ← Personal branch for each PR
- Developer creates PR to
dev - Code review by maintainer
- Merge into
dev - Test on
dev - When stable → merge
dev→main(by maintainer)
When reporting a bug, please provide:
- fcitx5-lotus version
- Operating system and version
- Steps to reproduce the bug
- Log or screenshot (if any) (Log via
fcitx5-diagnosecommand) - Environment (desktop environment, terminal, etc.)
Before proposing a new feature:
- Check if the feature already exists
- Search for similar issues
- Clearly describe the feature and use case
- Explain why this feature is necessary
By contributing, you agree that your code will be licensed under the same license as the project (GPL-3.0-or-later).
Thank you for contributing!