Skip to content

Add code quality report generation to build pipeline#77

Merged
Malcolmnixon merged 4 commits intomainfrom
copilot/add-code-quality-report
Jan 22, 2026
Merged

Add code quality report generation to build pipeline#77
Malcolmnixon merged 4 commits intomainfrom
copilot/add-code-quality-report

Conversation

Copy link
Contributor

Copilot AI commented Jan 22, 2026

Pull Request

Description

Integrates SonarMark 1.0.0 into the build pipeline to generate a "TestResults Code Quality.pdf" report from SonarCloud analysis results, published alongside existing documentation artifacts.

Changes:

  • Tool manifest (.config/dotnet-tools.json): Added demaconsulting.sonarmark 1.0.0
  • Spell check dictionary (.cspell.json): Added "hotspots" and "sonarmark" to dictionary
  • Documentation template (docs/quality/): Created title metadata, introduction, and Pandoc definition matching existing doc structure
    • Introduction focuses on the document serving as evidence of good code quality standards
  • Build workflow (.github/workflows/build.yaml): Added three steps in build-docs job:
    1. Query SonarCloud and generate markdown with SonarMark
    2. Convert to HTML with Pandoc
    3. Convert to PDF with Weasyprint

Report generation follows the same pattern as requirements and trace matrix documents, using the existing template and tools.

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • 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 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 '**/*.{yml,yaml}'

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

The SonarMark tool queries the existing SonarCloud analysis already performed during the build. No additional analysis overhead is introduced. The SONAR_TOKEN secret is already configured and reused from the existing SonarScanner integration.

The code quality report introduction has been designed to be tool-agnostic, serving as evidence of code quality standards rather than focusing on specific analysis tools, allowing for future expansion beyond SonarCloud.

Original prompt

This section details on the original issue you should resolve

<issue_title>[Feature]: Add Code Quality Report</issue_title>
<issue_description>### Problem Statement

The build pipeline needs to build a code-quality report with Sonar analysis results

Proposed Solution

A new "TestResults Code Quality.pdf" needs to be generated using the same pandoc/weasyprint approach as is used for requirements.

This involves:

Alternatives Considered

No response

Usage Examples

Benefits

Report of code quality included with releases.

Priority

Medium - Would improve my workflow

Willingness to Contribute

Yes, I can submit a pull request

Additional Context

No response

Checklist

  • I have searched existing issues to ensure this is not a duplicate
  • I have provided a clear description of the feature
  • I have explained why this feature would be useful</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits January 22, 2026 19:24
Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Copilot AI changed the title [WIP] Add code quality report generation with Sonar analysis Add code quality report generation to build pipeline Jan 22, 2026
Copilot AI requested a review from Malcolmnixon January 22, 2026 19:29
Copy link
Contributor

@Malcolmnixon Malcolmnixon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please run the quality checks - issues are still being introduced - for example docs/quality/introduction.md:17:12 Unknown word (hotspots)


## Purpose

This report provides a comprehensive analysis of the TestResults codebase using SonarCloud,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This quality report will end up growing to contain more than just SonarCloud analysis - don't try to describe the tool, just describe that the purpose of the document is to act as evidence of good code quality.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated Purpose section to focus on the document serving as evidence of good quality standards rather than describing SonarCloud specifically. (d7efc48)

…urpose section

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

Copilot AI commented Jan 22, 2026

Please run the quality checks - issues are still being introduced - for example docs/quality/introduction.md:17:12 Unknown word (hotspots)

Added "hotspots" and "sonarmark" to .cspell.json dictionary. All spell checks now pass. (d7efc48)

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.

[Feature]: Add Code Quality Report

2 participants