Skip to content

AB#32004 SonarQube fixes#2055

Merged
JamesPasta merged 1 commit intodevfrom
feature/AB#32004-ImprovePrompt-SonarFixes
Feb 27, 2026
Merged

AB#32004 SonarQube fixes#2055
JamesPasta merged 1 commit intodevfrom
feature/AB#32004-ImprovePrompt-SonarFixes

Conversation

@jacobwillsmith
Copy link

Pull request overview

This pull request addresses SonarQube findings in AI prompt-related code paths with minimal, behavior-preserving changes.

The updates focus on maintainability and code-quality compliance: improving catch-clause logging, simplifying a PDF extraction loop, switching regex usage to compile-time generated patterns, and simplifying a nested conditional in scoresheet view logic.

Changes:

  • Updated catch-clause logging in OpenAIService to pass the caught JsonException to _logger.LogWarning(...)
  • Simplified PDF page text loop in TextExtractionService using Select(page => page.Text) while preserving truncation behavior
  • Replaced runtime regex replacements in TextExtractionService with GeneratedRegex-based compile-time regex helpers
  • Simplified nested confidence parsing condition in AssessmentScoresWidgetViewComponent

@github-actions
Copy link

🧪 Unit Test Results (Parallel Execution)

Tests

📊 Summary

Result Count
✅ Passed 451
❌ Failed 0
⚠️ Skipped 0

📄 HTML Reports

  • Merged Tests (HTML): Included in artifacts
    Generated automatically by CI.

@jacobwillsmith jacobwillsmith marked this pull request as ready for review February 27, 2026 22:30
@JamesPasta JamesPasta merged commit 56ee555 into dev Feb 27, 2026
22 checks passed
@JamesPasta JamesPasta deleted the feature/AB#32004-ImprovePrompt-SonarFixes branch February 27, 2026 22:33
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