Skip to content

Conversation

@JPercival
Copy link
Contributor

No description provided.

@github-actions
Copy link

github-actions bot commented Oct 9, 2025

Formatting check succeeded!

@codecov
Copy link

codecov bot commented Oct 9, 2025

Codecov Report

❌ Patch coverage is 64.58333% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.76%. Comparing base (e8479b7) to head (cdac5a4).

Files with missing lines Patch % Lines
.../kotlin/org/cqframework/cql/cql2elm/CqlCompiler.kt 51.42% 11 Missing and 6 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1629      +/-   ##
============================================
+ Coverage     65.63%   65.76%   +0.13%     
  Complexity     1646     1646              
============================================
  Files           473      472       -1     
  Lines         27485    27426      -59     
  Branches       5475     5457      -18     
============================================
- Hits          18039    18037       -2     
+ Misses         7141     7090      -51     
+ Partials       2305     2299       -6     

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

private set

var compiledLibrary: CompiledLibrary? = null
var root: Any? = null
Copy link
Contributor

Choose a reason for hiding this comment

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

@JPercival This is set to the result of Cql2ElmVisitor.visit() inside of run() and contains the last define from the input CQL content. Might be helpful to keep the original visitResult? I could alternatively remove it because we only use it in tests, where instead we could explicitly look for the last ExpressionDef in the compiledLibrary. I think this would be better.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I like your suggestion. I had a similar thought, I just didn't chase it far enough to reach your same conclusion.

libraryManager.compiledLibraries[lib.identifier!!] = compiler.compiledLibrary!!

if (!compiler.errors.isEmpty()) {
if (!compiler.exceptions.isEmpty()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This used to look only at errors, so should be

if (compiler.exceptions.any { it.severity == CqlCompilerException.ErrorSeverity.Error }) { ... }

and only use the errors below

val library = compiler.run(inputStream!!.asSource().buffered())

if (!compiler.errors.isEmpty()) {
if (!compiler.exceptions.isEmpty()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I can change this also to only look at errors as before.

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

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

See analysis details on SonarQube Cloud

@JPercival JPercival marked this pull request as ready for review October 30, 2025 15:32
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