Skip to content

Prevent configured CSV header rows from being emitted as data #653

Description

@Seddryck

Problem

When header-rows or header-repeat is configured, the modified CSV profile is currently passed to CsvReader.ToDataReader.

That modified profile sets Header=false, which disables PocketCsvReader's normal header processing. Meanwhile, EnumerateCsvRows uses only the first record as the dynamic header.

As a result, additional configured header records can be emitted as data rows.

Expected behavior

When header-rows or header-repeat is configured, do not pass the modified profile to CsvReader.ToDataReader in a way that disables the required header handling.

Configured header records must be consumed as header metadata and must never appear in the normalized data stream.

Acceptance criteria

  • header-rows with more than one header record does not leak extra header records into data.
  • header-repeat does not cause repeated header rows to appear as data.
  • Default single-header behavior remains unchanged.
  • Add regression tests covering configured multi-row and repeated-header scenarios.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions