Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions cli/azd/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ In general, to make contributions a smooth and easy experience, we encourage the

Prerequisites:

- [Go](https://go.dev/dl/) 1.26
- [Go](https://go.dev/dl/) 1.26.1

Build:

Expand Down Expand Up @@ -49,13 +49,20 @@ automatically adds that directory to your PATH if it isn't already there.

### Preflight (all quality checks)

Run all pre-commit checks (formatting, copyright headers, linting, spell check, build, unit tests) in one command:
Run all pre-commit checks (formatting, copyright headers, linting, spell check, build, unit tests, and playback tests) in one command:

```bash
cd cli/azd
mage preflight
```

To run only the playback tests (functional tests replayed from recorded cassettes, no Azure credentials needed):

```bash
cd cli/azd
mage playbackTests
```

Run tests:

```bash
Expand Down Expand Up @@ -91,6 +98,16 @@ CI enforces this check — PRs with pending `go fix` suggestions will fail the l

> Note: On Windows you may need to add `C:\Program Files\Git\usr\bin` to `%PATH%`

### Go Version Management

When bumping the Go version across the repository, use the `Update-GoVersion.ps1` script instead of manually editing each file. It updates all `go.mod` files, Dockerfiles with `golang:` base images, and the ADO pipeline template in one command:

```powershell
pwsh eng/scripts/Update-GoVersion.ps1 -NewVersion 1.27.0
```

CI enforces version consistency via the `validate-go-version` workflow, which runs on PRs that touch `go.mod`, `Dockerfile`, or the ADO setup template. The source of truth is `cli/azd/go.mod`.

### Debugging (with VSCode)

If you don't have a preferred editor for Go code, we recommend [Visual Studio Code](https://code.visualstudio.com/Download).
Expand Down