Apply TemplateDotNetTool template consistency updates to SonarMark#98
Apply TemplateDotNetTool template consistency updates to SonarMark#98Malcolmnixon merged 6 commits intomainfrom
Conversation
- Program.cs: route errors to Console.Error.WriteLine (stderr) - Program.cs: version display uses context.WriteLine (respects --silent) - Context.cs: add AutoFlush=true on log StreamWriter - Context.cs: WriteError uses Console.Error.WriteLine (stderr) - Tests: update to capture Console.Error for error assertions - Tests.csproj: LangVersion 12 → latest - SonarMark.csproj: reorganize packages into labeled ItemGroups - build.yaml: add dotnet tool restore step to CodeQL job - build.yaml: add sonarmark to versionmark capture list - pull_request_template.md: add self-validation checklist item Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
- AGENTS.md: C# 12 → C# (latest), .markdownlint.json → .markdownlint-cli2.jsonc - code-quality-agent.md: .markdownlint.json → .markdownlint-cli2.jsonc - repo-consistency-agent.md: fix markdownlint filename, add Tracking Template Evolution section - requirements-agent.md: add Test Source Filters section Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
|
@copilot Can you re-check - I don't think this pulled in all the updates. The requirements aren't semantic, the self-validation still prints descriptions rather than test names. The self-validation sections of the README.md and user guide don't match the layout of the template. Please re-execute the repo-consistency agent and actually check the pull-requests of the template. |
…d/Failed - Output now shows test names (SonarMark_QualityGateRetrieval) instead of descriptions - Status now uses title case (Passed/Failed) consistent with template PR #51 - Removed unused 'displayName' parameter from RunValidationTest Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
- requirements.yaml: semantic IDs (CLI-001 → Sonar-Cmd-Cli, PLT-001 → Sonar-Platform-Windows, etc.) - README.md: replace Self-Validation Tests table with Self Validation section showing actual output format - docs/guide/guide.md: restructure self-validation section with Validation Report example (template PR #51) - .markdownlint-cli2.jsonc: allow siblings_only duplicate headings for Self-Validation Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Done — addressed in commits Validation.cs (template PR #51): Console output now shows test names ( requirements.yaml (template PR #50): Applied semantic IDs throughout — e.g. README.md + docs/guide/guide.md (template PR #51): Self-validation sections now show the actual output format with test names and checkmarks, matching the template layout. |
requirements.yaml
Outdated
| - title: Command-Line Interface | ||
| requirements: | ||
| - id: CLI-001 | ||
| - id: Sonar-Cmd-Cli |
There was a problem hiding this comment.
I think ALL requirements should start with "SonarMark-" as that's the tool name.
There was a problem hiding this comment.
Done in c550cf7 — all requirement IDs now start with SonarMark- (e.g. SonarMark-Cmd-Cli, SonarMark-Svr-Connect, SonarMark-Rpt-Markdown, SonarMark-Plt-Windows).
requirements.yaml
Outdated
| - title: SonarQube/SonarCloud Integration | ||
| requirements: | ||
| - id: SONAR-001 | ||
| - id: Sonar-Server-Connect |
There was a problem hiding this comment.
I think all "Server" requirements should be "Svr" to keep them short.
There was a problem hiding this comment.
Done in c550cf7 — all server requirement IDs now use Svr (e.g. SonarMark-Svr-Connect, SonarMark-Svr-Auth, SonarMark-Svr-QualityGate).
requirements.yaml
Outdated
| - title: Report Generation | ||
| requirements: | ||
| - id: RPT-001 | ||
| - id: Sonar-Report-Markdown |
There was a problem hiding this comment.
I think all Report requirements should be "Rpt" for keeping them short.
There was a problem hiding this comment.
Done in c550cf7 — all report requirement IDs now use Rpt (e.g. SonarMark-Rpt-Markdown, SonarMark-Rpt-Depth, SonarMark-Rpt-QualityGate).
requirements.yaml
Outdated
| - title: Platform Support | ||
| requirements: | ||
| - id: PLT-001 | ||
| - id: Sonar-Platform-Windows |
There was a problem hiding this comment.
I think all Platform requirements should be "Plt"
There was a problem hiding this comment.
Done in c550cf7 — all platform requirement IDs now use Plt (e.g. SonarMark-Plt-Windows, SonarMark-Plt-Linux, SonarMark-Plt-Net8).
…bbreviations Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Syncs SonarMark with recent TemplateDotNetTool template improvements across code correctness, project configuration, CI workflows, agent documentation, self-validation output, and requirements.
Code fixes (
Program.cs,Context.cs)Main()catch blocks now route toConsole.Error.WriteLine(stderr)context.WriteLine()— respects--silentand log file routingWriteError()writes toConsole.Error.WriteLine(stderr)StreamWritergainsAutoFlush = truefor immediate disk writes on unexpected terminationConsole.Errorinstead ofConsole.OutSelf-validation output (
Validation.cs, template PR #51)SonarMark_QualityGateRetrieval - Passed) instead of descriptions (Quality Gate Retrieval Test - PASSED)Passed/Failed(consistent with template)displayNameparameter fromRunValidationTestProject configuration
Tests.csproj:LangVersion12→latestSonarMark.csproj: packageItemGroups split into labeled sections — Runtime Dependencies, Build Tool Dependencies, Code Analysis Dependencies;Polyfillmoved to build tools with simplePrivateAssets="All"CI workflow (
build.yaml)dotnet tool restorebeforedotnet restorebuild-docsjob: addssonarmarktoversionmark --capturetool listRequirements (
requirements.yaml, template PR #50)SonarMark-prefix throughout: e.g.CLI-001→SonarMark-Cmd-Cli,PLT-001→SonarMark-Plt-Windows,SONAR-003→SonarMark-Svr-QualityGateServer→Svr,Report→Rpt,Platform→PltDocumentation / agent files (template PR #51)
README.md: replaced### Self-Validation Teststable with a## Self Validationsection showing actualsonarmark --validateoutput format with test names and checkmarksdocs/guide/guide.md: restructured self-validation chapter — added Validation Report subsection with actual output example; consolidated saving results into Running Validation; updated Validation Tests to bullet list with test names.markdownlint-cli2.jsonc: addedMD024: siblings_only: trueto allow siblingSelf-ValidationheadingsAGENTS.md:C# 12→C# (latest);.markdownlint.json→.markdownlint-cli2.jsonccode-quality-agent.md:.markdownlint.json→.markdownlint-cli2.jsoncrepo-consistency-agent.md: same filename fix; adds Tracking Template Evolution section (4-step PR review process for catching future drift)requirements-agent.md: adds Test Source Filters section documentingwindows@,ubuntu@,net8.0@, etc. prefixes and warning against accidental removalpull_request_template.md: adds self-validation checklist itemType 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.SonarMark --configuration Release --framework net10.0--no-build -- --validateCode Quality
dotnet format --verify-no-changesLinting
npx markdownlint-cli2 "**/*.md" "#node_modules"npx cspell "**/*.{md,cs}" --no-progressyamllint .Testing
Documentation
Additional Notes
All 76 tests pass across net8.0/net9.0/net10.0. Code review passed with no comments.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.