Fix CodeQL warnings: LINQ patterns, resource disposal, and redundant conditions#18
Merged
Malcolmnixon merged 2 commits intomainfrom Feb 3, 2026
Merged
Fix CodeQL warnings: LINQ patterns, resource disposal, and redundant conditions#18Malcolmnixon merged 2 commits intomainfrom
Malcolmnixon merged 2 commits intomainfrom
Conversation
…onditions, and fix disposals Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix CodeQL reported code issues
Fix CodeQL warnings: LINQ patterns, resource disposal, and redundant conditions
Feb 3, 2026
Malcolmnixon
approved these changes
Feb 3, 2026
25 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
Description
Resolves CodeQL warnings by addressing code quality issues in repository connector logic and test code. Updated CodeQL configuration to suppress false positives from generated code and justified exception handlers.
Changes
obj/**/generated/**paths and generic catch clauses inContext.cs,Program.cs, andProcessRunner.csGitHubRepoConnector.cs):.Select()and.SelectMany()chains for PR number extraction and label-to-type mappingContextTests.cs): Addedusingdeclarations for 6StringWriterinstances in console output capture testsType of Change
Related Issues
Addresses static analysis warnings from CodeQL scan.
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
All 106 tests pass across net8.0, net9.0, and net10.0 targets. CodeQL security scan reports zero alerts.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://storage.googleapis.com/chromium-browser-snapshots/Linux_x64/1108766/chrome-linux.zip/usr/local/bin/node node install.js /home/REDACTED/work/BuildMark/.codeql-scratch/dbs/csharp/working/nugetconfig/nuget.config --force(http block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
This section details on the original issue you should resolve
<issue_title>[Feature]: Code Cleanup</issue_title>
<issue_description>### Problem Statement
CodeQL is reporting numerous issues
Proposed Solution
Fix the following CodeQL issues: