Code
How wagoodman/dive is laid out, and where to start for common changes.
There is no import map for this report yet.
Where to start reading
- Repository root
- Repository root
- Likely start-up file
- Suggested starting pointAI
- Suggested starting pointAI
- Suggested starting pointAI
- Suggested starting pointAI
- Suggested starting pointAI
Find files for a task
AIAdd a new container runtime backend (e.g., containerd)
- Create a new resolver struct in dive/image/{runtime}/ implementing the Resolver interface from dive/image/resolver.go
- Register the new resolver in dive/get_image_resolver.go by adding a case to the resolver selection logic
- Add CLI flag and option parsing in cmd/dive/cli/internal/options/application.go to enable runtime selection
Add a new analysis metric or efficiency rule
- Define the metric calculation in dive/filetree/efficiency.go by adding a new method to the EfficiencyCalculator
- Extend the Layer or Image struct in dive/image/image.go or dive/image/layer.go to store the new metric
- Expose the metric in dive/image/analysis.go where the Image is populated during analysis
- Display the metric in cmd/dive/cli/internal/ui/v1/format/format.go or add a new UI view
Add a new CI evaluation rule
- Define the rule type and logic in cmd/dive/cli/internal/command/ci/rule.go
- Parse the rule from user configuration in cmd/dive/cli/internal/command/ci/rules.go
- Apply the rule in cmd/dive/cli/internal/command/ci/evaluator.go during evaluation
- Test the rule in cmd/dive/cli/internal/command/ci/evaluator_test.go with example images
Add a new export format (e.g., YAML, CSV)
- Create a new exporter in cmd/dive/cli/internal/command/export/export.go with a format handler function
- Register the format option in cmd/dive/cli/internal/options/export.go
- Test the export in cmd/dive/cli/internal/command/export/export_test.go with snapshot validation
Trace runtime behavior
Add or update tests
Change build or automation
RepoPilot lists up to 500 files, so a file missing here may still exist.
- Files marked “likely” are guessed from their names.