CONTRIBUTING.md
August 11, 2026 ยท View on GitHub
Contributing as a Developer
- When creating a bug report: Please follow the template and provide detailed information.
- When fixing a feature: Create a Pull Request (PR) with accompanying test code.
- When adding a feature: First, propose the feature in an Issue.
- When touching a mermaid builder: Run
make generateto refresh the samples underdoc/, thenmake render-check. The latter draws every diagram committed here with the real mermaid renderer, which is the only thing that catches a diagram that ships, parses, and still shows the reader something else. - When writing a test: Put it in a test file that already exists. Each mermaid subpackage keeps its tests in the one file named after its builder (
treemap_test.go) and its godoc examples inexamples_test.go; the root package usesmarkdown_test.goandindex_test.gofor tests that reach inside it,contract_test.gofor tests that go through the exported API, andexamples_test.gofor the examples. A new test viewpoint (a golden file, a fuzz target, an error case, a boundary) is a new function in one of those, not a new file.
Contributing Outside of Coding
The following actions help boost my motivation:
- Giving a GitHub Star
- Promoting the application
- Becoming a GitHub Sponsor