Skip to content

fix(scheme): reject an empty column in --scheme - #1114

Merged
andrii-bodnar merged 1 commit into
mainfrom
empty-scheme-column-fix
Sep 8, 2026
Merged

fix(scheme): reject an empty column in --scheme#1114
andrii-bodnar merged 1 commit into
mainfrom
empty-scheme-column-fix

Conversation

@bhdnb

@bhdnb bhdnb commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

--scheme en= silently mapped en to column 0 — the first real column — instead of erroring, so a typo like --scheme en=,de=1 mis-mapped the file rather than failing. Number('') is 0, an integer and not negative, so an empty column cleared the validation guard.

Affects tm upload and glossary upload, the two callers of parseScheme. en=0 still parses — '0' is truthy, so widening the check to !column doesn't swallow a legitimate first column.

parseScheme's unit tests live on next_tests branch.

@bhdnb
bhdnb requested a review from andrii-bodnar September 7, 2026 16:18
@bhdnb bhdnb self-assigned this Sep 7, 2026
@bhdnb bhdnb added the bug label Sep 7, 2026
@codecov

codecov Bot commented Sep 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.21%. Comparing base (323f860) to head (11e8944).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1114   +/-   ##
=======================================
  Coverage   92.21%   92.21%           
=======================================
  Files         142      142           
  Lines       11494    11494           
=======================================
  Hits        10598    10598           
  Misses        896      896           

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread src-next/cli/utils/parsing.ts
@andrii-bodnar
andrii-bodnar merged commit cc489bb into main Sep 8, 2026
13 checks passed
@andrii-bodnar
andrii-bodnar deleted the empty-scheme-column-fix branch September 8, 2026 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants