Skip to content

feat: honor block size environment#604

Open
ShivamB25 wants to merge 2 commits into
dundee:masterfrom
ShivamB25:feat/honor-block-size
Open

feat: honor block size environment#604
ShivamB25 wants to merge 2 commits into
dundee:masterfrom
ShivamB25:feat/honor-block-size

Conversation

@ShivamB25

Copy link
Copy Markdown
Contributor

Summary

  • honor BLOCK_SIZE, falling back to BLOCKSIZE, across stdout, TUI, and export-progress terminal formatting
  • support fixed GNU-style byte block sizes, human-readable, and si; round positive block counts up
  • preserve precedence for explicit size-format flags and keep exported JSON values in raw bytes
  • make formatter tests deterministic under externally supplied block-size variables

Verification

  • go test -v -covermode=count ./...
  • env BLOCK_SIZE=1K go test ./...
  • go run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.11.2 run ./internal/common/... ./stdout/... ./tui/... ./report/... ./cmd/gdu/app/... ./cmd/gdu/...
  • CLI smoke tests with BLOCK_SIZE=1K and BLOCKSIZE=kB

Closes #120

@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.89%. Comparing base (1868609) to head (48273fe).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #604      +/-   ##
==========================================
+ Coverage   85.69%   85.89%   +0.19%     
==========================================
  Files          55       55              
  Lines        6243     6329      +86     
==========================================
+ Hits         5350     5436      +86     
  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.

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.

Honor $BLOCKSIZE and / or $BLOCK_SIZE

1 participant