Add code quality report generation to build pipeline#84
Conversation
Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
|
@copilot The build fails with the error Please ensure the workflows that call build.yaml have the appropriate changes. |
Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Fixed in commit 9b23b50. Added |
|
|
||
| # Query filters to disable specific queries for certain paths | ||
| query-filters: | ||
| - exclude: |
There was a problem hiding this comment.
Are these excludes needed? Did you make sure the code actually requires these by inspecting the CodeQL analysis, or are these just copies from the other project?
There was a problem hiding this comment.
Yes, both excludes are justified by the actual code:
-
cs/path-combine: Test code uses
Path.Combineextensively (100+ occurrences) to create temporary test files with controlled values (e.g.,Path.Combine(_testDirectory, "requirements.yaml")). These are not security risks since they use hardcoded strings and GUIDs, not user input. -
cs/catch-of-all-exceptions: Program.cs line 74 has a justified catch-all handler that logs unexpected errors and re-throws them for event logging - a standard pattern for top-level exception handling.
Pull Request
Description
Adds automated code quality report generation to the build pipeline, producing "ReqStream Code Quality.pdf" with CodeQL security analysis and SonarCloud metrics. Follows the established pattern from the TestResults project.
Changes
Tools
Documentation Template
CodeQL Integration
Quality Report Generation
Permissions
Type of Change
Related Issues
Issue linking is handled automatically by the system.
Pre-Submission Checklist
Before submitting this pull request, ensure you have completed the following:
Build and Test
dotnet build --configuration Releasedotnet test --configuration ReleaseCode Quality
dotnet format --verify-no-changesQuality Checks
Please run the following checks before submitting:
cspell "**/*.{md,cs}"markdownlint "**/*.md"yamllint '**/*.{yml,yaml}'Testing
Documentation
Additional Notes
The quality report PDF will be generated during CI builds and included in release artifacts. CodeQL analysis runs in parallel with the main build, keeping build times efficient.
Original prompt
💡 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.