Skip to content

Comments

Align repository with TemplateDotNetLibrary template patterns#102

Merged
Malcolmnixon merged 7 commits intomainfrom
copilot/run-repo-consistency-agent
Feb 19, 2026
Merged

Align repository with TemplateDotNetLibrary template patterns#102
Malcolmnixon merged 7 commits intomainfrom
copilot/run-repo-consistency-agent

Conversation

Copy link
Contributor

Copilot AI commented Feb 19, 2026

Pull Request

Description

Aligns this repository with the TemplateDotNetLibrary template using the repo-consistency agent, then runs remaining agents for incremental improvements.

Template Consistency

  • Migrate .sln.slnx
  • Replace .markdownlint.json with .markdownlint-cli2.jsonc
  • Simplify .editorconfig to match template (adds csharp_prefer_braces = true:warning, file-scoped namespace enforcement)
  • Modernize build/lint scripts (build.sh, lint.sh, etc.)
  • Replace manual SBOM tooling (sbom-tool, spdx-tool) with Microsoft.Sbom.Targets in csproj
  • Update buildmark 0.2.0 → 0.3.0; reorder and clean .config/dotnet-tools.json
  • Merge template dictionary additions into .cspell.json; add ignore patterns to .yamllint.yaml

CI/CD Workflows

  • Reorganize build.yaml with section comments matching template structure
  • Add title.txt to all pandoc definition.yaml input-files (was missing — would have broken PDF generation)
  • Fix test-results download pattern to '*test-results*' matching template
  • Simplify release.yaml; add --skip-duplicate to NuGet push
  • Rename PDF outputs: drop DemaConsulting. prefix (e.g. "TestResults Build Notes.pdf")
  • Rename artifact from documentationdocuments

Code Improvements

  • Add input validation (ArgumentNullException/ArgumentException) to all public Serialize/Deserialize methods, using ArgumentNullException.ThrowIfNull per CA1510
  • Narrow catch in Serializer.Identify from catch-all to System.Xml.XmlException
  • Fix braceless if statements in JUnitSerializer.cs and TestHelpers.cs

Requirements & Tests

  • Restore net8.0@/net9.0@/net10.0@ framework-specific test prefixes (agent had incorrectly removed them, breaking evidence traceability)
  • Add REQ-FUNC-012 through REQ-FUNC-021 covering additional test outcomes and features
  • Add 12 new tests using Assert.ThrowsExactly<T>() for input validation (53 total, up from 41)

Potential Template Back-ports

  • TestResults has a comprehensive ARCHITECTURE.md — template could benefit from a placeholder
  • Original .editorconfig had more granular formatting rules (newlines, spaces, indentation) lost in simplification

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
  • 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

All 53 tests pass on net8.0, net9.0, and net10.0. CodeQL and code_review tools timed out during the PR workflow; no security-sensitive code paths were modified (changes are config alignment, input validation, and tests).


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 5 commits February 19, 2026 02:39
This commit brings the TestResults repository in line with the
TemplateDotNetLibrary template while preserving project-specific
functionality.

Major changes:
- Migrate to .markdownlint-cli2.jsonc with ignore patterns
- Simplify .editorconfig with modern C# style rules
- Update .cspell.json dictionary with template terms
- Add ignore patterns to .yamllint.yaml
- Modernize build and lint scripts with emojis and better structure
- Remove external SBOM tools, use Microsoft.Sbom.Targets instead
- Add SBOM configuration to main library csproj
- Reorganize build.yaml workflow with extensive comments
- Update release workflow for cleaner artifact handling
- Minor improvements to CODE_OF_CONDUCT.md formatting

Project-specific items preserved:
- ARCHITECTURE.md (not in template)
- spdx-workflow.yaml (legacy, may be removed later)
- .sln format (vs template's .slnx)
- .sln.DotSettings (ReSharper config)
- CodeQL exclusions (justified suppressions)
- Test-specific configurations

All changes validated:
- YAML syntax validated with yamllint
- Markdown linting passed
- No functionality lost

See CONSISTENCY_REPORT.md for complete details.
…braces, remove report, fix download pattern

Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
…m sln to slnx

Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
…irements and tests

Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Copilot AI changed the title [WIP] Run repo-consistency agent for template alignment Align repository with TemplateDotNetLibrary template patterns Feb 19, 2026
Copilot AI requested a review from Malcolmnixon February 19, 2026 03:18
@Malcolmnixon Malcolmnixon marked this pull request as ready for review February 19, 2026 03:29
@Malcolmnixon
Copy link
Contributor

@copilot Please consider the following Sonar warnings:

src/DemaConsulting.TestResults/IO/JUnitSerializer.cs(61): INFO CODE_SMELL [external_roslyn:CA1510] Use 'ArgumentNullException.ThrowIfNull' instead of explicitly throwing a new exception instance  
src/DemaConsulting.TestResults/IO/TrxSerializer.cs(78): INFO CODE_SMELL [external_roslyn:CA1510] Use 'ArgumentNullException.ThrowIfNull' instead of explicitly throwing a new exception instance  

Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 19, 2026

@copilot Please consider the following Sonar warnings:

src/DemaConsulting.TestResults/IO/JUnitSerializer.cs(61): INFO CODE_SMELL [external_roslyn:CA1510] Use 'ArgumentNullExcep...

Fixed in 95ca4a9 — replaced the explicit new ArgumentNullException(nameof(results)) throws with ArgumentNullException.ThrowIfNull(results) in both JUnitSerializer.cs and TrxSerializer.cs.

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