| title | Contributing to azd-rest | |||
|---|---|---|---|---|
| description | Guidelines for contributing to the azd-rest project | |||
| lastUpdated | 2026-01-15 | |||
| tags |
|
We love your input! We want to make contributing to azd-rest as easy and transparent as possible, whether it's:
- Reporting a bug
- Discussing the current state of the code
- Submitting a fix
- Proposing new features
- Becoming a maintainer
We use GitHub to host code, to track issues and feature requests, as well as accept pull requests.
- Fork the repo and create your branch from
main. - If you've added code that should be tested, add tests.
- If you've changed APIs, update the documentation.
- Ensure the test suite passes.
- Make sure your code lints.
- Issue that pull request!
- Go 1.26.0 or later
- golangci-lint
- Node.js 20+ (for cspell)
- Git
# Clone your fork
git clone https://github.com/YOUR_USERNAME/azd-rest.git
cd azd-rest/cli
# Install dependencies
go mod download
# Install mage (build tool)
go install github.com/magefile/mage@latest
# Build and install
mage install
# Verify installation
azd rest version
# Run tests
mage test
# Run all quality checks
mage preflight- Follow the standard Go formatting guidelines (use
gofmtandgoimports) - Write meaningful comments for exported functions and types
- All comments should end with a period
- Keep functions focused and concise
- Write tests for new functionality
cd cli
# Format code
mage fmt
# Run all linters
mage lint
# Run spell checker (from root)
cd ..
cspell "**/*.{go,md,yaml,yml}" --config cspell.jsoncd cli
# Run unit tests (fast, <5s)
mage test
# Run with verbose output
go test -v -short ./src/...# Run all integration tests
mage testIntegration
# Run specific package
TEST_PACKAGE=auth mage testIntegration
# Run specific test
TEST_NAME=TestAuthIntegration mage testIntegration
# Run all tests (unit + integration)
mage testAll# Generate coverage report
mage testCoverage
# View coverage in browser
# Windows
start coverage/coverage.html
# macOS
open coverage/coverage.html
# Linux
xdg-open coverage/coverage.html- Update the README.md with details of changes to the interface, if applicable.
- Update the CHANGELOG.md with notes on your changes.
- The PR will be merged once you have the sign-off of at least one maintainer.
- Keep it small: Small, focused PRs are easier to review and merge.
- Write good commit messages: Follow Conventional Commits (feat:, fix:, docs:, etc.)
- Add tests: Ensure your changes are covered by tests (>=80% coverage).
- Update documentation: If you change functionality, update the docs.
- Follow the code style: Make sure your code passes all linters.
- Run preflight: Execute
mage preflightbefore submitting.
Before submitting a PR:
# Run all quality checks
mage preflightThis ensures:
- ✅ Code formatting (
go fmt) - ✅ Linting (
go vet,golangci-lint) - ✅ Unit tests (100% pass)
- ✅ Integration tests (100% pass)
- ✅ Coverage report (>=80%)
- Use the present tense ("Add feature" not "Added feature")
- Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
- Limit the first line to 72 characters or less
- Reference issues and pull requests liberally after the first line
In short, when you submit code changes, your submissions are understood to be under the same MIT License that covers the project. Feel free to contact the maintainers if that's a concern.
We use GitHub issues to track public bugs. Report a bug by opening a new issue.
Great Bug Reports tend to have:
- A quick summary and/or background
- Steps to reproduce
- Be specific!
- Give sample code if you can
- What you expected would happen
- What actually happens
- Notes (possibly including why you think this might be happening, or stuff you tried that didn't work)
We welcome feature requests! Please create an issue describing:
- The problem you're trying to solve
- Your proposed solution
- Any alternatives you've considered
- Additional context
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to make participation in our project and our community a harassment-free experience for everyone.
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members
By contributing, you agree that your contributions will be licensed under its MIT License.
Feel free to open an issue with your question or contact the maintainers directly.
Your contributions to open source, large or small, make projects like this possible. Thank you for taking the time to contribute.