Skip to content

Conversation

@maradini77
Copy link

Summary

Removes duplicate validation logic for leading whitespace in field values in scripts/buildtable.pl.

Changes

  • Removed redundant $val =~ /^\s/ check inside the field parsing branch
  • Kept the unified validation after branching logic
  • Maintains identical error detection behavior

Rationale

The same whitespace validation was performed twice:

  1. Inside the first parsing branch
  2. After the branching logic

Copy link
Member

@jonatack jonatack left a comment

Choose a reason for hiding this comment

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

@maradini77 Thank you for your proposal. While this check line 149 is indeed a subset of the cases checked by line 158 further down, keeping it may ease debugging a failure. If removed, all leading whitespace errors in values would return "Extra spaces," making it harder to quickly see on a batch of files whether the issue is in a new field intro or a continuation line. So let's leave it as-is.

@jonatack jonatack closed this Oct 21, 2025
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