# Conventions de commit

Tous les messages de commit sont rédigés en **anglais**, en suivant le format [Conventional Commits](https://www.conventionalcommits.org/) :

```
<type>(<scope>): <description courte>
```

---

## Types

| Type | Usage |
|------|-------|
| `feat` | New feature |
| `fix` | Bug fix |
| `refactor` | Code restructuring without behavior change |
| `style` | Formatting only (spaces, commas, no logic change) |
| `docs` | Documentation only |
| `test` | Add or update tests |
| `chore` | Maintenance, dependencies, build config |
| `perf` | Performance improvement |
| `revert` | Revert a previous commit |

---

## Exemples

```
feat(auth): add OAuth2 login support
fix(api): handle null response from payment gateway
refactor(storage): extract upload logic into helper
docs(guide): add git commit message conventions
chore(deps): update dependencies
perf(db): cache user metadata on repeated reads
revert: revert "feat(auth): add OAuth2 login support"
```

---

## Règles

- **Scope** : facultatif, précise la zone touchée `auth`, `api`, `storage`, `ui`, `config`
- **Description** : minuscules, sans point final, en anglais
- Un commit = une intention. Ne pas mélanger fix et refactor
- Pas de `wip`, `fix fix`, `oups` ou messages vides

## Breaking changes

Ajouter `!` après le type et un pied de page `BREAKING CHANGE:` :

```
feat(api)!: remove legacy query parameter

BREAKING CHANGE: the `legacy` param is no longer accepted, use `version` instead.
```
