Thank you for your interest in contributing to wifimgr! This document provides guidelines and instructions for contributing.
Please read and follow our Code of Conduct.
- Check if the bug has already been reported in Issues
- If not, create a new issue using the bug report template
- Include:
- A clear, descriptive title
- Steps to reproduce the issue
- Expected vs actual behavior
- Version information (
wifimgr version) - Relevant configuration (with sensitive data removed)
- Check existing issues and discussions for similar suggestions
- Create a new issue using the feature request template
- Describe the use case and expected behavior
- Fork the repository
- Create a feature branch from
main:git checkout -b feature/your-feature-name
- Make your changes following our coding standards
- Write or update tests as needed
- Run tests locally:
go test ./... - Commit with clear, descriptive messages
- Push to your fork and create a Pull Request
- Go 1.22.3 or later
- Make
git clone https://github.com/ravinald/wifimgr.git
cd wifimgr
make buildmake test # Run all tests
make test-coverage # Generate coverage reportFor testing with real Mist/Meraki APIs:
- Use only test sites designated for development (ZZ-TMP-SITE, ZZ-WTMP-SITE)
- Never test against production sites
- Use
--diffmode to preview changes before applying
- Follow Effective Go
- Use
gofmtandgoimportsfor formatting - Run
golangci-lintbefore submitting
- Use clear, descriptive names
- Package names: lowercase, single word
- Exported functions/types: PascalCase with Godoc comments
- Unexported: camelCase
- Acronyms: consistent casing (e.g.,
OrgID,MAC)
- Add Godoc comments to all exported functions and types
- Keep comments current with code changes
- Update relevant documentation files in
/docs
- Wrap errors with context:
fmt.Errorf("action failed: %w", err) - Return early on errors
- Use custom error types where appropriate
- Write table-driven tests where applicable
- Test error cases, not just happy paths
- Use meaningful test names describing the scenario
- Code follows project style guidelines
- Tests pass locally (
go test ./...) - New code has appropriate test coverage
- Documentation is updated if needed
- Commit messages are clear and descriptive
- Summarize the changes and their purpose
- Reference any related issues
- Note any breaking changes
- Include test plan or verification steps
Key architectural concepts (see /docs for details):
- Multi-vendor architecture: Supports Mist and Meraki APIs
- Cache system: Three-layer cache for performance
- Cobra CLI: Command hierarchy with Junos-style positional arguments
- Apply command: Currently supports AP configuration only
- Open a Discussion for general questions
- Check existing documentation in
/docs - Review the README for usage information
By contributing, you agree that your contributions will be licensed under the Apache License 2.0.