checkTagValueTextFields static method

void checkTagValueTextFields(
  1. SbomTag tag,
  2. String section
)

Validate tag value text fields

Implementation

static void checkTagValueTextFields(SbomTag tag, String section) {
  for (final value in tag.values) {
    if ((!value.startsWith(SbomSpdxConstants.textStart)) &&
        (!value.endsWith(SbomSpdxConstants.textEnd))) {
      SbomUtilities.warning(
          'Invalid tag value found in configuration for the $section section, tag name '
          '${SbomSpdxUtilities.getSpecTagName(tag.name)} - SBOM may not pass validation');
    }
  }
}