Skip to content

Fix CqlInternalException to CqlToElmError mapping#1608

Merged
JPercival merged 4 commits intomasterfrom
bug-included-library-exception-details
Sep 26, 2025
Merged

Fix CqlInternalException to CqlToElmError mapping#1608
JPercival merged 4 commits intomasterfrom
bug-included-library-exception-details

Conversation

@JPercival
Copy link
Copy Markdown
Contributor

  • Fixed a case where incorrect CqlToElmError annotations were generated for CqlIncludeExceptions
  • Test for same
  • Migrated the test code I touched to Kotlin

@github-actions
Copy link
Copy Markdown

Formatting check succeeded!

@JPercival JPercival requested a review from Copilot September 26, 2025 18:42
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes CqlInternalException to CqlToElmError mapping by correcting how CqlIncludeException annotations are generated. The main change improves error handling for missing included libraries by ensuring the correct error type and properties are set in the CqlToElmError annotations.

  • Fixed mapping of CqlIncludeException to CqlToElmError annotations with proper ErrorType.INCLUDE
  • Added test for missing included libraries that verifies correct error annotation generation
  • Migrated test code from Java to Kotlin

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
LibraryBuilder.kt Fixed error type mapping logic for CqlIncludeException and improved code structure
ElmDeserializeTests.kt Added test for missing include error handling and migrated from Java to Kotlin
TestUtils.kt Migrated utility functions from Java to Kotlin
TestLibrarySourceProvider.kt Migrated library source provider from Java to Kotlin
IdObjectFactoryTest.kt Migrated test from Java to Kotlin
MissingIncludedLibraryTest.cql Added test CQL file for missing library scenario

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@codecov
Copy link
Copy Markdown

codecov bot commented Sep 26, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.88%. Comparing base (928da1d) to head (2fe29bd).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #1608   +/-   ##
=========================================
  Coverage     62.88%   62.88%           
  Complexity     1863     1863           
=========================================
  Files           341      341           
  Lines         14925    14925           
  Branches       2966     2966           
=========================================
  Hits           9385     9385           
  Misses         4060     4060           
  Partials       1480     1480           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Convert the rest of the ELM module tests to Kotlin
@JPercival JPercival merged commit c0abd5f into master Sep 26, 2025
4 checks passed
@JPercival JPercival deleted the bug-included-library-exception-details branch September 26, 2025 21:04
@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

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.

3 participants