| 1 |
--- |
| 2 |
paths: |
| 3 |
- "**/*" |
| 4 |
--- |
| 5 |
|
| 6 |
# Contribution rules (go-openapi) |
| 7 |
|
| 8 |
Read `.github/CONTRIBUTING.md` before opening a pull request. |
| 9 |
|
| 10 |
## Commit hygiene |
| 11 |
|
| 12 |
- Every commit **must** be DCO signed-off (`git commit -s`) with a real email address. |
| 13 |
PGP-signed commits are appreciated but not required. |
| 14 |
- Agents may be listed as co-authors (`Co-Authored-By:`) but the commit **author must be the human sponsor**. |
| 15 |
We do not accept commits solely authored by bots or agents. |
| 16 |
- Squash commits into logical units of work before requesting review (`git rebase -i`). |
| 17 |
|
| 18 |
## Linting |
| 19 |
|
| 20 |
Before pushing, verify your changes pass linting against the base branch: |
| 21 |
|
| 22 |
```sh |
| 23 |
golangci-lint run --new-from-rev master |
| 24 |
``` |
| 25 |
|
| 26 |
Install the latest version if you don't have it: |
| 27 |
|
| 28 |
```sh |
| 29 |
go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest |
| 30 |
``` |
| 31 |
|
| 32 |
## Problem statement |
| 33 |
|
| 34 |
- Clearly describe the problem the PR solves, or reference an existing issue. |
| 35 |
- PR descriptions must not be vague ("fix bug", "improve code") — explain *what* was wrong and *why* the change is correct. |
| 36 |
|
| 37 |
## Tests are mandatory |
| 38 |
|
| 39 |
- Every bug fix or feature **must** include tests that demonstrate the problem and verify the fix. |
| 40 |
- The only exceptions are documentation changes and typo fixes. |
| 41 |
- Aim for at least 80% coverage of your patch. |
| 42 |
- Run the full test suite before submitting: |
| 43 |
|
| 44 |
For mono-repos: |
| 45 |
```sh |
| 46 |
go test work ./... |
| 47 |
``` |
| 48 |
|
| 49 |
For single module repos: |
| 50 |
```sh |
| 51 |
go test ./... |
| 52 |
``` |