Skip to content

Port improvements from TemplateDotNetLibrary template#32

Merged
Malcolmnixon merged 5 commits intomainfrom
copilot/copy-improvements-from-templates
Feb 19, 2026
Merged

Port improvements from TemplateDotNetLibrary template#32
Malcolmnixon merged 5 commits intomainfrom
copilot/copy-improvements-from-templates

Conversation

Copy link
Contributor

Copilot AI commented Feb 19, 2026

Pull Request

Description

Sync shared infrastructure patterns from TemplateDotNetLibrary into this repo. Differences specific to tool-vs-library (integration tests, self-validation, Context/Program classes) are intentionally preserved.

  • .editorconfig: Add end_of_line = lf to [*] section
  • .gitignore: Add package-lock.json to Node.js section
  • .config/dotnet-tools.json: Bump buildmark 0.2.00.3.0
  • Test .csproj: Reorganize to match library template — section comments (<!-- Build Configuration -->, <!-- Code Quality Configuration -->, <!-- Test Framework Dependencies -->, <!-- Code Analysis Dependencies -->, <!-- Project References -->), separate ItemGroups for test framework vs code analysis packages, reorder PropertyGroup entries (build config → packaging → quality)
  • Test AssemblyInfo.cs: Remove redundant InternalsVisibleTo attribute (already handled by main .csproj's <InternalsVisibleTo> element, matching library template pattern)
  • Test AAA comments: Add consistent // Arrange, // Act, // Assert comments to all test methods in ContextTests.cs, ProgramTests.cs, and IntegrationTests.cs (matching existing PathHelpersTests.cs pattern and library template convention)
  • .github/agents/test-developer.md: Add MSTest V4 Best Practices section from library template (anti-patterns for catch-block assertions, IsTrue/IsFalse equality checks, non-public test classes, and collection count assertions)

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.TemplateDotNetTool --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

No functional or behavioral changes. All 32 existing tests pass unchanged. CodeQL reports 0 alerts.

The test-developer agent MD file was reviewed against the Library template version and updated with the missing MSTest V4 Best Practices section. Tool-specific differences (integration test references, self-validation warnings) are intentionally preserved.


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

@Malcolmnixon
Copy link
Contributor

@copilot Please consider the test-developer agent and see if there's anything suitable for updating.

…, buildmark version, test csproj structure

Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Copilot AI changed the title [WIP] Copy improvements from TemplateDotNetLibrary repo Port improvements from TemplateDotNetLibrary template Feb 19, 2026
Copilot AI requested a review from Malcolmnixon February 19, 2026 14:56
Copilot AI and others added 2 commits February 19, 2026 15:01
- Remove redundant InternalsVisibleTo from test AssemblyInfo.cs
- Add consistent AAA (Arrange/Act/Assert) comments to all test methods
- Matches patterns from TemplateDotNetLibrary and existing PathHelpersTests.cs
…sibleTo from test AssemblyInfo

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

Copilot AI commented Feb 19, 2026

@copilot Please consider the test-developer agent and see if there's anything suitable for updating.

Used the test-developer agent to evaluate test files. Made two improvements in commits f933999 and 7be4af7:

  1. Added consistent AAA comments (// Arrange, // Act, // Assert) to all test methods in ContextTests.cs, ProgramTests.cs, and IntegrationTests.cs — matching the pattern already used in PathHelpersTests.cs and the Library template
  2. Removed redundant InternalsVisibleTo from test AssemblyInfo.cs — the attribute was making the test assembly's internals visible to itself (pointless), and the actual needed InternalsVisibleTo for the main project is already in the main .csproj. Kept [assembly: DoNotParallelize] which is intentional for these tests.

All 32 tests pass, format check passes.

@Malcolmnixon
Copy link
Contributor

@copilot I think you RAN the test-developer agent to modify the code. I actually want you to review the test-developer agent MD file against the version in https://github.com/demaconsulting/TemplateDotNetLibrary/blob/main/.github/agents/test-developer.md and see if this one should be updated.

…rary template

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

Copilot AI commented Feb 19, 2026

@copilot I think you RAN the test-developer agent to modify the code. I actually want you to review the test-developer agent MD file against the version in https://github.com/demaconsulting/TemplateDo...

Compared .github/agents/test-developer.md against the Library version. The Tool's file was missing the MSTest V4 Best Practices section (anti-patterns for catch-block assertions, IsTrue/IsFalse equality checks, non-public test classes, and collection count assertions). Added it in 4791581. The other differences (integration test mentions, self-validation warnings) are intentional tool-vs-library distinctions.

@Malcolmnixon Malcolmnixon marked this pull request as ready for review February 19, 2026 15:33
@Malcolmnixon Malcolmnixon merged commit d8482fd into main Feb 19, 2026
16 of 22 checks passed
@Malcolmnixon Malcolmnixon deleted the copilot/copy-improvements-from-templates branch February 19, 2026 15:33
Copilot AI added a commit that referenced this pull request Mar 6, 2026
Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Malcolmnixon added a commit that referenced this pull request Mar 6, 2026
* Initial plan

* Apply changes from TemplateDotNetLibrary PRs #30, #31, #32

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

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
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