Apply NuGetCacheTool PR#8 improvements to TemplateDotNetTool#48
Apply NuGetCacheTool PR#8 improvements to TemplateDotNetTool#48Malcolmnixon merged 6 commits intomainfrom
Conversation
Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
…rements Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
|
@copilot TMPL-REQ-004 wasn't satisfied in the CI build pipeline |
…TMPL-REQ-004 Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
docs/guide/guide.md
Outdated
| | `--silent` | Suppress console output | | ||
| | `--validate` | Run self-validation | | ||
| | `--results <file>` | Write validation results to file (TRX or JUnit format) | | ||
| | `--results <file>` | Write validation results to file (.trx or .xml) | |
There was a problem hiding this comment.
.trx makes sense, but .xml could be anything, I think people will understand TRX or JUnit better.
There was a problem hiding this comment.
Updated in fa79789 — changed to "TRX or JUnit format".
requirements.yaml
Outdated
| - Context_WriteError_NotSilent_WritesToConsole | ||
| - IntegrationTest_UnknownArgument_ReturnsError | ||
|
|
||
| - id: TMPL-REQ-015 |
There was a problem hiding this comment.
Perhaps fix the order of the 15/14 requirements seeing as they're both new.
There was a problem hiding this comment.
Fixed in fa79789 — order is now TMPL-CMD-013, TMPL-CMD-014, TMPL-CMD-015.
requirements.yaml
Outdated
There was a problem hiding this comment.
Let's have all "Command-Line Interface" requirements be TMPL-CMD-xxx
There was a problem hiding this comment.
Done in fa79789 — all Command-Line Interface requirements renamed to TMPL-CMD-001 through TMPL-CMD-015.
requirements.yaml
Outdated
|
|
||
| - title: Platform Support | ||
| requirements: | ||
| - id: TMPL-REQ-008 |
There was a problem hiding this comment.
Let's have all Platform Support requirements be TMPL-PLT-xxx
There was a problem hiding this comment.
Done in fa79789 — all Platform Support requirements renamed to TMPL-PLT-008 through TMPL-PLT-012.
…LT-xxx; fix REQ order and guide wording Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
requirements.yaml
Outdated
| - Context_Create_LogFlag_OpensLogFile | ||
| - IntegrationTest_LogFlag_WritesOutputToFile | ||
|
|
||
| - id: TMPL-CMD-013 |
There was a problem hiding this comment.
Please.renumber these requirements 008-010
There was a problem hiding this comment.
Renumbered in 37e5923 — TMPL-CMD-013/014/015 are now TMPL-CMD-008/009/010.
requirements.yaml
Outdated
| - title: Platform Support | ||
| requirements: | ||
| - id: TMPL-REQ-008 | ||
| - id: TMPL-PLT-008 |
There was a problem hiding this comment.
The PLT requirements can start from 001. Please renumber
There was a problem hiding this comment.
Renumbered in 37e5923 — TMPL-PLT now starts from 001 (TMPL-PLT-001 through TMPL-PLT-005).
…08-012 to 001-005 Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Backports improvements identified and applied in NuGetCacheTool PR#8 to this template repository so downstream tools benefit from them on next sync.
Description
Correctness — stderr vs stdout
Context.WriteError()now writes toConsole.Errorinstead ofConsole.OutProgram.Maincatch blocks now write toConsole.Errorinstead ofConsole.OutReliability — log file flushing
Context.OpenLogFileopensStreamWriterwithAutoFlush = trueTest coverage
Context_WriteError_SetsErrorExitCode— verifies exit code 1 after errorContext_WriteError_NotSilent_WritesToConsole— verifies stderr outputContext_WriteError_Silent_DoesNotWriteToConsole— verifies silent suppression of stderrContext_WriteError_WritesToLogFile— verifies error persistence to log fileContext_WriteLine_Silent_DoesNotWriteToConsole— verifies silent suppression of stdout (required by TMPL-CMD-004)Context_Create_LogFlag_WithoutValue_ThrowsArgumentException— missing--logvalueContext_Create_ResultsFlag_WithoutValue_ThrowsArgumentException— missing--resultsvalueIntegrationTest_ValidateWithResults_GeneratesJUnitFile— JUnit output pathRequirements traceability (
requirements.yaml)Program_Version_ReturnsNonEmptyString→ TMPL-CMD-002IntegrationTest_ValidateWithResults_GeneratesJUnitFile→ TMPL-CMD-006TMPL-REQ-xxxtoTMPL-CMD-xxx(001–010)TMPL-REQ-xxxtoTMPL-PLT-xxx(001–005)Documentation
guide.md: notes errors go to stderr; clarifies--resultsaccepts TRX or JUnit formatConsistency
LangVersion:12→latestAGENTS.mdTech Stack:C# 12→C# (latest)Type of Change
Related Issues
Pre-Submission Checklist
Before submitting this pull request, ensure you have completed the following:
Build and Test
dotnet build --configuration Releasedotnet test --configuration Releasedotnet run --project src/DemaConsulting.TemplateDotNetTool --configuration Release --framework net10.0--no-build -- --validateCode Quality
dotnet format --verify-no-changesQuality Checks
Please run the following checks before submitting:
cspell "**/*.{md,cs}"markdownlint "**/*.md"yamllint .Testing
Documentation
Additional Notes
All 39 tests pass across .NET 8, 9, and 10. CodeQL found no alerts.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.