INNER CODE UNIT · Python

expected

wolfSSL/wolfssl · scripts/bomsh_verify.py:152

            expected = parts[0] + parts[1]
            obj_count += 1
            actual = gitoid_sha1(obj)
            if actual != expected:
                bad.append((obj, expected, actual))
    return obj_count, bad


def verify(spdx_glob, omnibor_dir):
    """Orchestrate the two checks.  Returns (ok: bool, messages:
    List[str]).  `messages` is appended to in success and failure both,
    so callers can log the success lines ('OK: N gitoid(s) verified' +
    '    objects round-trip: M blobs') even when ok is True."""
    messages: List[str] = []

    spdx_paths = sorted(_glob.glob(spdx_glob))
    if not spdx_paths:
        return False, [f'no SPDX matched {spdx_glob!r}']

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…