Skip to content

Add machine-readable empty-column indices to csvclean - #1363

Open
Rober1208 wants to merge 1 commit into
wireservice:masterfrom
Rober1208:csvclean-empty-column-indices
Open

Rober1208 wants to merge 1 commit into
wireservice:masterfrom
Rober1208:csvclean-empty-column-indices

Conversation

@Rober1208

Copy link
Copy Markdown

csvclean --empty-columns reports the affected column numbers only inside the
human-readable msg field. Scripts that need those numbers currently have to
parse that message.

Add --empty-column-indices, which enables the empty-column check and adds an
empty_column_indices field to the error CSV on standard error. It contains a
comma-separated list such as 2,4,5, or 1,3,4 with --zero; it is blank for
other error rows. The existing error CSV format stays the same unless this
option is used. Documentation, the man page, and the changelog are updated.

Refs #1290.

Validation:

  • The new regression failed on the unchanged base because the option did not
    exist, and passed after the change.
  • PYTHONUTF8=1 python -m pytest -q: 357 passed, 31 subtests passed.
  • flake8 csvkit tests, isort csvkit tests --check-only, and
    check-manifest: passed.
  • A subprocess check confirmed that csvcut -c empty_column_indices reads
    2,4,5 from the new error CSV.

This contribution was implemented and verified by Codex AI on behalf of
Rober1208. It has not had an independent human code review.

Copilot AI balanced review requested due to automatic review settings September 30, 2026 07:59

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

2 participants