Skip to content

Align self-validation output format with TemplateDotNetTool style#161

Merged
Malcolmnixon merged 2 commits intomainfrom
copilot/check-self-validation-consistency
Mar 4, 2026
Merged

Align self-validation output format with TemplateDotNetTool style#161
Malcolmnixon merged 2 commits intomainfrom
copilot/check-self-validation-consistency

Conversation

Copy link
Contributor

Copilot AI commented Mar 4, 2026

Pull Request

Description

Self-validation output was using a plain - SpdxTool_Xxx: Passed/Failed list format. This aligns it with the TemplateDotNetTool pattern from PR #51, replacing it with checkmark symbols and adding a summary block.

Before:

Tests:

- SpdxTool_AddPackage: Passed
- SpdxTool_Validate: Failed
...

Validation Passed

After:

✓ SpdxTool_AddPackage - Passed
✗ SpdxTool_Validate - Failed
...

Total Tests: 14
Passed: 13
Failed: 1

Changes

  • 14 Validate*.cs files — Replace context.WriteLine($"- SpdxTool_Xxx: Passed/Failed") with / prefix format; failures now use context.WriteError so they surface as errors
  • Validate.cs — Remove Tests: section header from output; add Total Tests / Passed / Failed summary block after all tests run (failed count uses WriteError)
  • README.md / docs/guide/guide.md — Update example validation report to match new output format

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Code quality improvement

Related Issues

Pre-Submission Checklist

Before submitting this pull request, ensure you have completed the following:

Build and Test

  • Code builds successfully: dotnet build --configuration Release
  • All unit tests pass: dotnet test --configuration Release
  • Self-validation tests pass:
    dotnet run --project src/DemaConsulting.SpdxTool --configuration Release --framework net10.0
    --no-build -- --validate
  • Code produces zero warnings

Code Quality

  • Code formatting is correct: dotnet format --verify-no-changes
  • New code has appropriate XML documentation comments
  • Static analyzer warnings have been addressed

Quality Checks

Please run the following checks before submitting:

  • Spell checker passes: cspell "**/*.{md,cs}"
  • Markdown linter passes: markdownlint "**/*.md"
  • YAML linter passes: yamllint .

Testing

  • Added unit tests for new functionality
  • Updated existing tests if behavior changed
  • All tests follow the AAA (Arrange, Act, Assert) pattern
  • Test coverage is maintained or improved

Documentation

  • Updated README.md (if applicable)
  • Updated ARCHITECTURE.md (if applicable)
  • Added code examples for new features (if applicable)
  • Updated requirements.yaml (if applicable)

Additional Notes

The Validation Passed message is retained after the summary block as existing tests assert on it.


✨ 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] Check consistency of self-validation output with template project Align self-validation output format with TemplateDotNetTool style Mar 4, 2026
@Malcolmnixon Malcolmnixon marked this pull request as ready for review March 4, 2026 00:56
@Malcolmnixon Malcolmnixon merged commit 8ec6abc into main Mar 4, 2026
18 of 19 checks passed
@Malcolmnixon Malcolmnixon deleted the copilot/check-self-validation-consistency branch March 4, 2026 01:11
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