-
Notifications
You must be signed in to change notification settings - Fork 0
Contributing
Tuhin Garai edited this page Jul 3, 2025
·
1 revision
Thank you for your interest in contributing to BravePurifier! This guide will help you get started with contributing to the project.
- Report installation issues
- Document configuration problems
- Identify compatibility issues
- Report security vulnerabilities
- Suggest new privacy enhancements
- Propose additional Linux distribution support
- Request new configuration options
- Suggest documentation improvements
- Fix bugs and issues
- Add new features
- Improve existing functionality
- Optimize performance
- Improve README and wiki pages
- Add usage examples
- Create tutorials and guides
- Translate documentation
- Test on different Linux distributions
- Verify privacy features
- Test edge cases and scenarios
- Performance testing
- Linux system (any supported distribution)
- Git installed
- Basic knowledge of Bash scripting
- Understanding of Linux package managers
-
Fork the Repository
# Fork on GitHub, then clone your fork git clone https://github.com/YOUR_USERNAME/BravePurifier.git cd BravePurifier
-
Create Development Branch
git checkout -b feature/your-feature-name # or git checkout -b bugfix/issue-description -
Set Up Development Environment
# Make script executable chmod +x brave-purifier.sh # Test current functionality sudo ./brave-purifier.sh --help
# Use strict error handling
set -euo pipefail
# Use readonly for constants
readonly SCRIPT_VERSION="1.0"
# Use local variables in functions
function example_function() {
local variable_name="value"
}
# Use descriptive function names
check_root() { ... }
detect_package_manager() { ... }-
Functions:
snake_case(e.g.,install_brave,apply_policies) -
Variables:
UPPER_CASEfor constants,snake_casefor locals -
Files:
kebab-case(e.g.,brave-purifier.sh)
# Always check command success
if ! command -v apt >/dev/null 2>&1; then
error "APT not found"
exit 1
fi
# Use proper error messages
error() { echo -e "${RED}[ERROR]${NC} $1" >&2; }
warn() { echo -e "${YELLOW}[WARN]${NC} $1" >&2; }# Function description
# Arguments: $1 - package manager name
# Returns: 0 on success, 1 on failure
detect_package_manager() {
# Implementation details
}type(scope): description
feat(install): add support for Alpine Linux
fix(policies): correct JSON syntax in privacy policy
docs(wiki): update installation guide
test(arch): add Arch Linux testing
Types: feat, fix, docs, style, refactor, test, chore
# Test on clean system
sudo ./brave-purifier.sh
# Test updates
sudo ./brave-purifier.sh # Run twice
# Test error conditions
./brave-purifier.sh # Without sudo (should fail)Test on multiple distributions:
- Ubuntu 22.04 LTS
- Fedora 39
- Arch Linux (latest)
- openSUSE Leap 15.5
- Debian 12
# Verify policies are applied
cat /etc/brave/policies/managed/privacy-policy.json
# Test privacy features
brave-browser chrome://policy/Before starting work:
- Check existing issues
- Create detailed issue description
- Discuss approach with maintainers
- Get approval for major changes
# Create feature branch
git checkout -b feature/new-feature
# Make changes
# ... edit files ...
# Test thoroughly
sudo ./brave-purifier.sh
# Commit changes
git add .
git commit -m "feat(feature): add new feature"
# Push to your fork
git push origin feature/new-feature- Create Pull Request on GitHub
- Fill out PR template completely
- Link related issues using keywords
- Request review from maintainers
- Address feedback promptly
- Ensure CI passes (when implemented)
## Description
Brief description of changes
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Documentation update
- [ ] Performance improvement
## Testing
- [ ] Tested on Ubuntu
- [ ] Tested on Fedora
- [ ] Tested on Arch Linux
- [ ] Privacy features verified
## Checklist
- [ ] Code follows style guidelines
- [ ] Self-review completed
- [ ] Documentation updated
- [ ] No breaking changes# Fresh installation
sudo ./brave-purifier.sh
# Update existing installation
sudo ./brave-purifier.sh
# Error conditions
./brave-purifier.sh # No sudo
FORCE_PM="invalid" sudo ./brave-purifier.sh # Invalid PM# Verify policies
ls -la /etc/brave/policies/managed/
cat /etc/brave/policies/managed/privacy-policy.json | jq .
# Test user settings
cat ~/.config/BraveSoftware/Brave-Browser/Default/Preferences | jq .
# Browser testing
brave-browser chrome://policy/
brave-browser chrome://settings/privacyTest matrix:
- Ubuntu: 20.04, 22.04, 23.04
- Fedora: 37, 38, 39
- Arch: Latest rolling
- Debian: 11, 12
- openSUSE: Leap 15.5, Tumbleweed
# Network issues
# Simulate network failure during download
# Permission issues
# Test with different user permissions
# Existing installations
# Test with various existing Brave versions
# Corrupted files
# Test recovery from corrupted configurations#!/bin/bash
# test-basic.sh
set -euo pipefail
# Test help output
./brave-purifier.sh --help
# Test version output
./brave-purifier.sh --version
# Test without sudo (should fail)
if ./brave-purifier.sh 2>/dev/null; then
echo "ERROR: Script should require sudo"
exit 1
fi
echo "Basic tests passed"Include:
- System Information: OS, version, architecture
- Error Messages: Complete error output
- Steps to Reproduce: Detailed reproduction steps
- Expected Behavior: What should happen
- Actual Behavior: What actually happens
- Log Files: Relevant log excerpts
Include:
- Problem Description: What problem does this solve?
- Proposed Solution: How should it work?
- Alternatives Considered: Other approaches considered
- Additional Context: Screenshots, examples, etc.
For security vulnerabilities:
- Do NOT create public issues
- Email: security@nightcodex7.dev
- Include: Detailed vulnerability description
- Provide: Steps to reproduce
- Suggest: Potential fixes if known
BravePurifier uses semantic versioning:
- Major (X.0.0): Breaking changes
- Minor (1.X.0): New features, backward compatible
- Patch (1.0.X): Bug fixes, backward compatible
- All tests pass
- Documentation updated
- CHANGELOG.md updated
- Version number bumped
- Git tag created
- Release notes written
- Security: Privacy and security enhancements
- Compatibility: Support for new Linux distributions
- Bug Fixes: Critical installation and configuration issues
- Documentation: Clear, comprehensive guides
- Features: New privacy features and options
- Performance: Script optimization and speed improvements
- Testing: Automated testing and CI/CD
- Usability: Better error messages and user experience
- Refactoring: Code cleanup and organization
- Optimization: Minor performance improvements
- Cosmetic: UI/UX improvements
- GitHub Issues: Bug reports and feature requests
- GitHub Discussions: General questions and ideas
- Pull Requests: Code review and collaboration
- Email: security@nightcodex7.dev (security issues only)
- Security Issues: Within 24 hours
- Bug Reports: Within 48 hours
- Feature Requests: Within 1 week
- Pull Requests: Within 1 week
- Be respectful and inclusive
- Focus on constructive feedback
- Help others learn and grow
- Follow GitHub's community guidelines
All contributors are recognized in:
- README.md: Contributors section
- CHANGELOG.md: Release notes
- GitHub: Contributor graphs and statistics
- Code Contributors: Listed in README
- Bug Reporters: Mentioned in changelog
- Documentation: Credited in wiki pages
- Testers: Acknowledged in release notes
- Bash Scripting: Advanced Bash-Scripting Guide
- Linux Packaging: Distribution-specific documentation
- Privacy Technologies: Privacy Guides
- Git Workflow: GitHub Flow
- Shellcheck: Bash script linting
- jq: JSON processing
- Git: Version control
- GitHub CLI: Command-line GitHub interface
Thank you for contributing to BravePurifier! Your efforts help make the internet more private and secure for everyone.
For questions about contributing, create a discussion thread or contact the maintainers.