Thank you for your interest in contributing to Kodachi Linux! This document provides guidelines and best practices for contributing to the project.
- Code of Conduct
- Git Workflow
- Commit Message Guidelines
- Branching Strategy
- Pull Request Process
- Code Style Guidelines
- Directory Structure
- Testing
- Security
- Be respectful and professional in all interactions
- Focus on constructive criticism and technical merit
- Welcome contributors of all skill levels
- Keep discussions focused on improving the project
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/Linux-Kodachi.git cd Linux-Kodachi - Add the upstream repository:
git remote add upstream https://github.com/WMAL/Linux-Kodachi.git
- Keep your fork synchronized:
git fetch upstream git checkout main git merge upstream/main
- Create a feature branch from
main:git checkout -b feature/your-feature-name
- Make your changes in logical, atomic commits
- Test your changes thoroughly
- Push to your fork:
git push origin feature/your-feature-name
- Create a Pull Request on GitHub
type(scope): brief description (max 50 chars)
Detailed explanation of the change (wrap at 72 chars)
- Why this change is necessary
- What problem it solves
- Any side effects or considerations
Fixes #issue_number (if applicable)
- feat: New feature or capability
- fix: Bug fix
- docs: Documentation changes
- style: Code formatting (no functional changes)
- refactor: Code restructuring without changing behavior
- test: Adding or modifying tests
- chore: Maintenance tasks, dependency updates
- perf: Performance improvements
- security: Security-related changes
Good commit messages:
feat(tor-switch): add load balancing support for multiple instances
Implements native kernel-level load balancing using iptables/nftables
with three modes: round-robin, weighted, and consistent-hashing.
This allows better traffic distribution across Tor instances.
Fixes #123
fix(ip-fetch): handle timeout errors in geolocation API calls
Add proper error handling for network timeouts when fetching
geolocation data. Implements exponential backoff retry logic
with configurable max attempts.
Bad commit messages:
Update files
Fix bug
WIP
Changes
- Feature branches:
feature/descriptive-name - Bug fixes:
fix/issue-description - Documentation:
docs/what-is-being-documented - Hotfixes:
hotfix/critical-issue
- main branch: Production-ready code only
- Feature branches: All new development
- No direct commits to main: Always use Pull Requests
- Keep branches focused: One feature/fix per branch
- Delete branches after merge: Keep repository clean
- Update your branch with latest main:
git fetch upstream git rebase upstream/main
- Run all tests and ensure they pass
- Update documentation if needed
- Squash related commits for cleaner history:
git rebase -i HEAD~n # where n is number of commits
## Description
Brief description of changes
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Documentation update
## Testing
- [ ] Unit tests pass
- [ ] Integration tests pass
- [ ] Manual testing completed
## Checklist
- [ ] Code follows project style guidelines
- [ ] Self-review completed
- [ ] Documentation updated
- [ ] No hardcoded paths or credentials
- [ ] All tests passing
- [ ] No new warnings
## Related Issues
Fixes #(issue number)- At least one maintainer review required
- All CI checks must pass
- No merge conflicts
- Approved reviews before merge
- Squash and merge to maintain clean history
- No hardcoded paths: Always detect dynamically
- No credentials in code: Use environment variables
- Error handling: Never use
.unwrap()in Rust code - Consistent naming: Use descriptive, meaningful names
- Documentation: Comment complex logic
- Testing: Write tests for new functionality
- Follow official Rust style guide
- Use
cargo fmtbefore committing - Fix all
cargo clippywarnings - Proper error handling with
Resultand?
- Use shellcheck for validation
- Quote all variables:
"$var" - Use
set -euo pipefailfor safety - Meaningful function and variable names
- Follow existing project patterns
- Proper event handling
- Clean separation of UI and logic
- No spaces in directory or file names
- Use hyphens for word separation:
my-feature-name - Version directories:
Kodachi-9, notKodachi 9 - Descriptive names that indicate purpose
Linux-Kodachi/
├── Kodachi-9/ # Current version (no spaces!)
├── Kodachi-8.27-legacy/ # Legacy version (clear marking)
├── docs/ # Documentation
├── scripts/ # Utility scripts
└── tests/ # Test suites
- Unit tests: For individual functions/modules
- Integration tests: For component interactions
- Security tests: For authentication and encryption
- Performance tests: For critical paths
# Rust services
cd dashboard/hooks/rust/service-name
cargo test
# Gambas applications
cd gambas/app-name
./test_app.sh-
Never commit:
- API keys or tokens
- Passwords or credentials
- Private keys or certificates
- Personal information
-
Always validate:
- User input
- File paths
- Network data
- Command arguments
-
Report vulnerabilities:
- Use private disclosure
- Contact maintainers directly through GitHub
- Do not create public issues for vulnerabilities
- No sensitive data in code
- Input validation implemented
- Proper authentication checks
- Secure communication protocols
- Least privilege principle followed
- Documentation: Check
/docsdirectory - Issues: Search existing issues before creating new ones
- Discussions: Use GitHub Discussions for questions
- Email: Contact maintainers for sensitive topics
Contributors are recognized in:
- CONTRIBUTORS.md file
- Release notes
- Project documentation
Thank you for contributing to making Kodachi Linux better and more secure!