Skip to content

Fix: Suppress console output from NTIA validation during self-validation#104

Merged
Malcolmnixon merged 2 commits intomainfrom
copilot/fix-ntia-validation-console-output
Dec 15, 2025
Merged

Fix: Suppress console output from NTIA validation during self-validation#104
Malcolmnixon merged 2 commits intomainfrom
copilot/fix-ntia-validation-console-output

Conversation

Copy link
Contributor

Copilot AI commented Dec 15, 2025

The NTIA self-validation test intentionally validates a non-compliant SPDX document to verify error detection works correctly. However, this was printing the expected validation errors to the console, making it appear the self-validation had failed when it actually succeeded.

Changes

  • Added --silent flag to the NTIA validation call that expects failure in ValidateNtia.cs:131
  • Validation errors now only write to the log file (for verification) instead of console output
  • Aligns with existing pattern used by other validation calls in the same file

Before

DemaConsulting.SpdxTool 0.0.0-run.235+bcd68859

NTIA: Package 'Test Package' Missing Supplier

Error: Found 1 Issues in test-ntia.spdx.json
- SpdxTool_Ntia: Passed

After

DemaConsulting.SpdxTool 0.0.0-run.235+bcd68859

- SpdxTool_Ntia: Passed
Original prompt

This section details on the original issue you should resolve

<issue_title>[BUG]</issue_title>
<issue_description>## Describe the Bug

The NTIA self-validation erroneously prints the expected NTIA failure to the console - making it appear as if the self-validation has failed, when in fact it has succeeded:

To Reproduce

Steps to reproduce the behavior:

Run the spdx-tool self-validation

Expected Behavior

I expect to see the self-validation report all failures without the confusing NTIA validation being printed.

Actual Behavior

The self-validation prints the following in the middle of the self-validation results:

DemaConsulting.SpdxTool 0.0.0-run.235+bcd68859b4a7fef211c7538ba68b2b8af6afefd5

NTIA: Package 'Test Package' Missing Supplier

Error: Found 1 Issues in test-ntia.spdx.json
- SpdxTool_Ntia: Passed

Environment

  • OS: ALL
  • .NET Version: ALL
  • SpdxTool Version: Main branch

SPDX Document

N/A

Additional Context

This problem was introduced when the NTIA self-validation check was introduced

Possible Solution

The NTIA self-validation should be executed with the silent option so the failure only goes to the output file used to inspect validation results, rather than going to the console and confusing the user.
</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix NTIA self-validation console output for accuracy Fix: Suppress console output from NTIA validation during self-validation Dec 15, 2025
Copilot AI requested a review from Malcolmnixon December 15, 2025 21:13
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.

[BUG]

2 participants