NickLarsenNZ / NickLarsenNZ/cool-diff
Idea: Print (configurable) list of omitted fields/items
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Picking up the example from README, we could add some infos on what was skipped:
spec:
# 2 fields omitted (volumes, gracefulShutdownTimeout)
containers:
# 1 item ommited (my-sidecar)
- name: app
# 2 items omitted (volumeMounts, imagePullPolicy)
env:
- name: LOG_LEVEL
- value: debug
+ value: info
- image: "myapp:2.0"
+ image: "myapp:1.0"
We don't want to print an unlimited long list of fields/items, so cap it to e.g. 3 list items (configurable, e.g. 0 turns them off entirely) like that:
# 20 items omitted (volumeMounts, imagePullPolicy, foo, ...)
Fields are just the field names, so that should easily be convertable to a String.
Items are a bit harder, I guess that only works when a ArrayMatchMode is set up? But didn't even use the crate yet, so not sure.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the README example and trace the entry point for ArrayMatchMode to understand how omitted fields and items are identified. Define how the configurable list cap, including 0 to disable it, should apply to both kinds of omissions. Done means the diff can report capped field and item names without producing an unlimited list.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 45/100