|
| 1 | +# Contributing |
| 2 | + |
| 3 | +## Reporting Bugs |
| 4 | + |
| 5 | +Before creating a bug report: |
| 6 | + |
| 7 | +1. Search existing issues |
| 8 | +2. Update to the latest version |
| 9 | +3. Use the bug report template |
| 10 | + |
| 11 | +Include: |
| 12 | +- Zsh version (`zsh --version`) |
| 13 | +- Man version (`man --version`) |
| 14 | +- Your configuration |
| 15 | +- Steps to reproduce |
| 16 | +- Expected vs actual behavior |
| 17 | + |
| 18 | +## Development Setup |
| 19 | + |
| 20 | +```bash |
| 21 | +# Fork and clone |
| 22 | +git clone https://github.com/YOUR_USERNAME/zsh-vi-man.git |
| 23 | +cd zsh-vi-man |
| 24 | + |
| 25 | +# Create a branch |
| 26 | +git checkout -b feature/your-feature-name |
| 27 | + |
| 28 | +# Test your changes |
| 29 | +zsh test_patterns.zsh |
| 30 | +``` |
| 31 | + |
| 32 | +## Code Style |
| 33 | + |
| 34 | +- 2 spaces for indentation |
| 35 | +- Lines under 100 characters |
| 36 | +- Add comments for complex logic |
| 37 | +- Follow existing patterns |
| 38 | + |
| 39 | +## Commit Messages |
| 40 | + |
| 41 | +Use conventional commit format: |
| 42 | + |
| 43 | +``` |
| 44 | +feat: add support for custom pager options |
| 45 | +fix: handle options with equals sign correctly |
| 46 | +docs: update installation instructions |
| 47 | +test: add tests for slash-separated options |
| 48 | +``` |
| 49 | + |
| 50 | +## Writing Tests |
| 51 | + |
| 52 | +Add tests to `test_patterns.zsh` for pattern changes: |
| 53 | + |
| 54 | +```zsh |
| 55 | +pattern=$(build_your_pattern_function "input") |
| 56 | + |
| 57 | +assert_matches "$pattern" \ |
| 58 | + " expected match line" \ |
| 59 | + "Description of what should match" |
| 60 | +``` |
| 61 | + |
| 62 | +## Pull Requests |
| 63 | + |
| 64 | +1. Create PR using the template |
| 65 | +2. Link related issues (use "Fixes #123") |
| 66 | +3. Ensure tests pass |
| 67 | +4. Respond to review feedback |
| 68 | + |
| 69 | +## CI/CD |
| 70 | + |
| 71 | +GitHub Actions automatically: |
| 72 | +- Runs pattern tests |
| 73 | +- Verifies plugin loads |
| 74 | +- Tests on Ubuntu and macOS |
| 75 | +- Checks compatibility with plugin managers |
| 76 | +- Runs shellcheck |
| 77 | + |
0 commit comments