Skip to content

fix(report): preserve directory stats in JSON export - #603

Open
ShivamB25 wants to merge 2 commits into
dundee:masterfrom
ShivamB25:fix/json-directory-summary-stats
Open

fix(report): preserve directory stats in JSON export#603
ShivamB25 wants to merge 2 commits into
dundee:masterfrom
ShivamB25:fix/json-directory-summary-stats

Conversation

@ShivamB25

Copy link
Copy Markdown
Contributor

Summary

  • include apparent size, disk usage, and item count in directory JSON metadata
  • preserve aggregate statistics for depth-truncated and summarized directories when reports are reloaded
  • keep full report recomputation behavior unchanged and retain aggregate cutoffs under file filtering
  • add JSON export/import regression coverage, including empty directories

Verification

  • go test -v -covermode=count ./...
  • go run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.11.2 run ./report/... ./cmd/gdu/app/... ./cmd/gdu/...
  • CLI export/import smoke tests for a depth-limited report

Closes #325

@codecov

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.76%. Comparing base (1868609) to head (5e91e01).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #603      +/-   ##
==========================================
+ Coverage   85.69%   85.76%   +0.06%     
==========================================
  Files          55       55              
  Lines        6243     6272      +29     
==========================================
+ Hits         5350     5379      +29     
  Misses        689      689              
  Partials      204      204              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ShivamB25

Copy link
Copy Markdown
Contributor Author

lgtm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"--max-depth" support - allow for summary of size per directory

1 participant