Skip to content

Apply TemplateDotNetTool consistency updates to SarifMark#60

Merged
Malcolmnixon merged 2 commits intomainfrom
copilot/check-template-updates
Mar 1, 2026
Merged

Apply TemplateDotNetTool consistency updates to SarifMark#60
Malcolmnixon merged 2 commits intomainfrom
copilot/check-template-updates

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 1, 2026

Syncs SarifMark with recent TemplateDotNetTool template commits. Covers package upgrades, null safety guards, and agent documentation gaps.

Description

Project / Package Updates

  • LangVersion: 12latest (both csproj files)
  • GenerateDocumentationFile: Truetrue (casing consistency)
  • SonarAnalyzer.CSharp: 10.19.0.13279310.20.0.135146 (both csproj files)
  • Microsoft.NET.Test.Sdk: 18.0.118.3.0 (test csproj)
  • Added Polyfill 9.12.0 (source-only, main csproj) — enables ArgumentNullException.ThrowIfNull on all target frameworks
  • Added <Using Include="Polyfills" /> implicit global using (test csproj)
  • Added explanatory comments on PrivateAssets/IncludeAssets PackageReference groups

Null Guards

Added ArgumentNullException.ThrowIfNull guards in three entry points:

public static Context Create(string[] args)
{
    ArgumentNullException.ThrowIfNull(args);
    // ...
}

public void ParseArguments(string[] args)
{
    ArgumentNullException.ThrowIfNull(args);
    // ...
}

public static void Run(Context context)
{
    ArgumentNullException.ThrowIfNull(context);
    // ...
}

Agent Documentation

  • test-developer.md: Added MSTest anti-pattern Add ToMarkdown method to SarifResults for markdown export #5 — prefer Assert.StartsWith over Assert.IsTrue(value.StartsWith(...))
  • requirements-agent.md: Added "Test Source Filters" section documenting windows@, ubuntu@, net8.0@, dotnet9.x@, etc. prefixes
  • code-quality-agent.md: Fixed markdownlint config filename (.markdownlint.json.markdownlint-cli2.jsonc)
  • AGENTS.md: Added "Test Source Filters" quick-reference section

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

Pre-Submission Checklist

Build and Test

  • Code builds successfully: dotnet build --configuration Release
  • All 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

  • Spell checker passes: cspell "**/*.{md,cs}"
  • Markdown linter passes: markdownlint "**/*.md"
  • YAML linter passes: yamllint '**/*.{yml,yaml}'
  • Self-validation passes:
    dotnet run --project src/DemaConsulting.SarifMark --configuration Release --framework net10.0 --no-build -- --validate

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

Polyfill must not be added as a direct PackageReference in the test project — since the test project uses ProjectReference to the main project, adding it to both causes duplicate contentfile compilation (CS0121 ambiguous method errors on net8/net9). The implicit using alone is sufficient.


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

Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Copilot AI changed the title [WIP] Check for updates from the template Apply TemplateDotNetTool consistency updates to SarifMark Mar 1, 2026
@Malcolmnixon Malcolmnixon marked this pull request as ready for review March 1, 2026 01:46
@Malcolmnixon Malcolmnixon merged commit fda4caa into main Mar 1, 2026
11 checks passed
@Malcolmnixon Malcolmnixon deleted the copilot/check-template-updates branch March 1, 2026 01:46
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