Overview
A custom overlay:- Implements the
IOverlayPlugininterface - Defines what visual overlays it provides
- Applies data by writing node attributes
- Removes data by clearing those attributes
Step 1: Create the Project
Step 2: Implement IOverlayPlugin
This example creates a Code Ownership plugin that reads from CODEOWNERS and git history:Step 3: Add Configuration
Step 4: Register the Plugin
Option A: Direct Registration
Option B: Plugin Discovery
Place the compiled DLL inplugins/:
Step 5: Test Your Plugin
Advanced: Progress Reporting
For long-running operations:Advanced: Multiple Overlays
A single plugin can provide multiple overlays:More Plugin Ideas
Here are some plugins you could build:| Plugin | Attributes | Use Case |
|---|---|---|
| SonarQube | sonar:bugs, sonar:vulnerabilities, sonar:codeSmells | Quality metrics |
| Build Times | build:avgDuration, build:failures | CI/CD insights |
| PR Activity | pr:openCount, pr:avgReviewTime | Review bottlenecks |
| Dependencies | deps:outdated, deps:vulnerabilities | Security scanning |
| Documentation | docs:coverage, docs:staleness | Doc quality |
Best Practices
Use consistent attribute prefixes
Use consistent attribute prefixes
Always prefix your attributes with your plugin ID to avoid conflicts:
Handle missing data gracefully
Handle missing data gracefully
Not all nodes will have data from your source:
Support cancellation
Support cancellation
Check the cancellation token in loops:
Clean up completely
Clean up completely
Remove ALL attributes your plugin adds: