Skip to content

fix: warn on duplicate column names in CSV header#105

Merged
vmvarela merged 1 commit intomasterfrom
issue-80/warn-duplicate-columns
Apr 15, 2026
Merged

fix: warn on duplicate column names in CSV header#105
vmvarela merged 1 commit intomasterfrom
issue-80/warn-duplicate-columns

Conversation

@vmvarela
Copy link
Copy Markdown
Owner

Summary

  • Emit warning: duplicate column "<original>" renamed to "<new>" to stderr when CSV headers contain duplicate column names
  • Warnings are always written to stderr (never corrupt stdout)
  • Write errors on the warning itself are logged via std.log.err following existing project conventions

Changes

  • src/main.zig: parseHeader now accepts a stderr_writer parameter; when deduplication renames a column, a warning line is printed to stderr
  • build.zig: Two new integration tests — one verifying the warning appears on stderr, another verifying stdout remains clean

Closes #80

When the CSV header contains duplicate column names, emit a warning to
stderr for each rename (e.g. warning: duplicate column "value" renamed
to "value_2"). Warnings are always written to stderr so they never
corrupt stdout output.

Closes #80
@vmvarela vmvarela added this to the Sprint 5 milestone Apr 15, 2026
@vmvarela vmvarela added type:bug Something isn't working priority:high Must be in the next sprint size:xs Trivial — less than 1 hour labels Apr 15, 2026
@github-actions github-actions bot added type:feature New functionality type:chore Maintenance, refactoring, tooling and removed type:bug Something isn't working labels Apr 15, 2026
@vmvarela vmvarela merged commit 75ff138 into master Apr 15, 2026
5 checks passed
@vmvarela vmvarela deleted the issue-80/warn-duplicate-columns branch April 15, 2026 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority:high Must be in the next sprint size:xs Trivial — less than 1 hour type:chore Maintenance, refactoring, tooling type:feature New functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Warn on duplicate column names

1 participant