| 1 | # Contributing to Go-Sieve |
| 2 | |
| 3 | Thank you for considering contributing to the Go-Sieve cache implementation! This document provides guidelines and instructions for contributing. |
| 4 | |
| 5 | ## Code of Conduct |
| 6 | |
| 7 | By participating in this project, you are expected to uphold our Code of Conduct. Please report unacceptable behavior to the project maintainers. |
| 8 | |
| 9 | ## How Can I Contribute? |
| 10 | |
| 11 | ### Reporting Bugs |
| 12 | |
| 13 | - Before creating a bug report, check the issue tracker to see if the problem has already been reported |
| 14 | - When creating a bug report, include a clear title and description, along with as much relevant information as possible |
| 15 | - If possible, include steps to reproduce, expected behavior, and actual behavior |
| 16 | |
| 17 | ### Suggesting Enhancements |
| 18 | |
| 19 | - Before creating an enhancement suggestion, check the issue tracker to see if it has already been suggested |
| 20 | - Provide a clear description of the enhancement, along with any specific implementation details you can offer |
| 21 | - Explain why this enhancement would be useful to most Go-Sieve users |
| 22 | |
| 23 | ### Pull Requests |
| 24 | |
| 25 | - Fill in the required template |
| 26 | - Do not include issue numbers in the PR title |
| 27 | - Include screenshots and animated GIFs in your pull request whenever possible |
| 28 | - End all files with a newline |
| 29 | - Avoid platform-dependent code |
| 30 | - Make sure all tests pass |
| 31 | - Document new code based on the existing Go documentation style |
| 32 | |
| 33 | ## Style Guidelines |
| 34 | |
| 35 | ### Git Commit Messages |
| 36 | |
| 37 | - Use the present tense ("Add feature" not "Added feature") |
| 38 | - Use the imperative mood ("Move cursor to..." not "Moves cursor to...") |
| 39 | - Limit the first line to 72 characters or less |
| 40 | - Reference issues and pull requests after the first line |
| 41 | - Consider starting the commit message with an applicable emoji: |
| 42 | - โจ (`:sparkles:`) when adding a new feature |
| 43 | - ๐ (`:bug:`) when fixing a bug |
| 44 | - ๐ (`:books:`) when adding or updating documentation |
| 45 | - ๐งช (`:test_tube:`) when adding tests |
| 46 | - ๐ง (`:wrench:`) when dealing with the build system |
| 47 | - โฌ๏ธ (`:arrow_up:`) when upgrading dependencies |
| 48 | - โฌ๏ธ (`:arrow_down:`) when downgrading dependencies |
| 49 | |
| 50 | ### Go Style |
| 51 | |
| 52 | - Follow the standard Go style guidelines |
| 53 | - Run `go fmt` on your code before submitting |
| 54 | - Use meaningful variable names |
| 55 | - Document all exported functions, types, and constants |
| 56 | - Write comprehensive tests for new functionality |
| 57 | |
| 58 | ## Development Process |
| 59 | |
| 60 | 1. Fork the repository |
| 61 | 2. Create a new branch for your feature or bugfix (`git checkout -b feature/my-new-feature`) |
| 62 | 3. Make your changes |
| 63 | 4. Run tests to ensure they pass (`go test ./...`) |
| 64 | 5. Commit your changes (`git commit -am 'Add some feature'`) |
| 65 | 6. Push to the branch (`git push origin feature/my-new-feature`) |
| 66 | 7. Create a new Pull Request |
| 67 | |
| 68 | ## Testing |
| 69 | |
| 70 | - Write unit tests for all new functionality |
| 71 | - Make sure all existing tests pass before submitting a pull request |
| 72 | - Aim for high test coverage, especially for critical parts of the codebase |
| 73 | |
| 74 | ## Questions? |
| 75 | |
| 76 | If you have any questions, feel free to open an issue with the "question" label or reach out to the maintainers directly. |
| 77 | |
| 78 | Thank you for your contributions! |