|
| 1 | +# Contributing to GitLab Sync |
| 2 | + |
| 3 | +Thank you for considering contributing to GitLab Sync! We welcome contributions from the community. Here are some guidelines to help you get started. |
| 4 | + |
| 5 | +## Prerequisites |
| 6 | + |
| 7 | +Before contributing, please ensure you have the following prerequisites: |
| 8 | + |
| 9 | +1. Clone the repository: `git clone https://github.com/boxboxjason/gitlab-sync.git` |
| 10 | +2. Install [Go](https://golang.org/doc/install) (see [go.mod](./go.mod) for the required version). |
| 11 | +3. Install [Make](https://www.gnu.org/software/make/) (if not already installed). |
| 12 | +4. Install [golangci-lint](https://golangci-lint.run/) and [gosec](https://github.com/securego/gosec) for static analysis and security checks. |
| 13 | +5. Install [gotestsum](https://github.com/gotestyourself/gotestsum) to format test results. |
| 14 | +6. Optional: Install [dependency-check](https://owasp.org/www-project-dependency-check/) for dependency vulnerability checks. |
| 15 | +7. Optional: Install [Docker](https://www.docker.com/) or [Podman](https://podman.io/) for building the Docker image. |
| 16 | + |
| 17 | +## Development Workflow |
| 18 | + |
| 19 | +1. **Create a new branch** for your changes: `git checkout -b feature/my-feature` |
| 20 | +2. **Make your changes** and ensure they are well-tested. |
| 21 | +3. **Run the tests** to ensure everything is working correctly: `make test` |
| 22 | +4. **Run the linter** to check for code quality: `make lint` |
| 23 | +5. **Run security checks** to ensure there are no vulnerabilities: `make dependency-check` |
| 24 | +6. Submit a **pull request** with a clear description of your changes and why they are needed. |
| 25 | + |
| 26 | +## Code Style |
| 27 | + |
| 28 | +We follow the standard Go code style. Please ensure your code adheres to the following: |
| 29 | + |
| 30 | +- Use `gofmt` to format your code. |
| 31 | +- Use meaningful variable and function names. |
| 32 | +- Write clear and concise comments where necessary. |
| 33 | +- Ensure your code is well-tested with unit tests. |
| 34 | +- Avoid unnecessary complexity; keep your code simple and readable. |
| 35 | +- Use `golangci-lint` to check for common issues and code smells. |
| 36 | +- Use `gosec` to check for security issues in your code. |
| 37 | +- Use `gotestsum` to format test results for better readability. |
| 38 | +- Use `dependency-check` to check for known vulnerabilities in your dependencies. |
0 commit comments