Thank you for your interest in contributing to mdschema! We welcome contributions from the community.
- Clone the repository:
git clone https://github.com/jackchuka/mdschema.git
cd mdschema- Install Go (version 1.24 or later):
- Download from golang.org
- Build the project:
go build -o mdschema ./cmd/mdschema- Run tests and lint:
go test ./...
golangci-lint run- Follow standard Go conventions
- Use
gofmtto format your code - Add tests for new functionality
- Update documentation as needed
- All tests must pass before submitting a PR
- Add tests for new features and bug fixes
- Integration tests are in
testdata/integration_test.go
- Use clear, descriptive commit messages
- Start with a verb (Add, Fix, Update, etc.)
- Keep the first line under 50 characters
- Add more details in the body if needed
Example:
Add support for custom validation rules
This change introduces a plugin system that allows users to
define custom validation rules in their schemas.
- Fork the repository on GitHub
- Create a feature branch from main:
git checkout -b feature/your-feature-name
- Make your changes and add tests
- Run tests to ensure everything works:
go test ./... - Commit your changes with a clear message
- Push to your fork:
git push origin feature/your-feature-name
- Create a Pull Request on GitHub
- Describe your changes clearly in the PR description
- Link to any relevant issues using keywords like "Fixes #123"
- Ensure all tests pass in CI
- Be responsive to code review feedback
- Keep PRs focused - one feature or fix per PR
We welcome many types of contributions:
- Bug fixes - Fix issues in existing functionality
- New features - Add new validation rules or capabilities
- Documentation - Improve README, add examples, fix typos
- Tests - Add test coverage for existing code
- Performance - Optimize existing code
- Refactoring - Improve code structure and maintainability
Understanding the codebase structure:
cmd/mdschema/- CLI application entry pointinternal/parser/- Markdown parsing using goldmarkinternal/rules/- Validation rules (structure, code blocks, text)internal/schema/- Schema loading and definitioninternal/generator/- Template generation from schemasinternal/reporter/- Output formattingtestdata/- Integration tests and test schemas
- Issues - Check existing issues or create a new one
- Discussions - Use GitHub Discussions for questions
- Code Review - Ask questions in your PR if you need guidance
Please be respectful and considerate in all interactions. We want mdschema to be a welcoming project for contributors of all backgrounds and experience levels.
Thank you for contributing! 🎉