Skip to content

Context reference check is not collapsing whitespace #1265

@jstone-psi

Description

@jstone-psi

Checked for duplicates

Yes - I've already checked

🐛 Describe the bug

When I created test labels that has a line break in a particularly long observing system component name ("The Origins, Spectral Interpretation, Resource Identification, Security, Regolith Explorer (OSIRIS-REx) Spacecraft"), I noticed that the validate tool was raising a warning that the component name did not match the context object.

This warning does not appear when there are no line breaks in the component name. However, it does appear again when I have multiple spaces in the name.

🕵️ Expected behavior

The data type of Observing_System_Component/name is UTF8_Short_String_Collapsed, so these extra spaces and line breaks should be collapsed into a single space before the check is performed. When the values are collapsed, no warning would occur for these labels.

📜 To Reproduce

  1. Find a label that validates correctly.
  2. Add additional spaces in the middle of the Observing_System_Component/name
  3. Try to validate the new label, and observe the warning

🖥 Environment Info

  • Version of this software: validate 3.7.1
  • Operating System: MacOS Sonoma 14.7.5 with OpenJDK openjdk 23.0.2

📚 Version of Software Used

validate 3.7.1

🩺 Test Data / Additional context

sample_labels.zip

orex-hk.txt

🦄 Related requirements

⚙️ Engineering Details

No response

🎉 Integration & Test

No response

Metadata

Metadata

Assignees

Labels

Type

Projects

Status

ToDo

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions