Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean-up of TupleType #1467

Merged
merged 5 commits into from
Dec 12, 2024
Merged

Clean-up of TupleType #1467

merged 5 commits into from
Dec 12, 2024

Conversation

JPercival
Copy link
Contributor

@JPercival JPercival commented Dec 12, 2024

  • Update TupleType to be immutable once created
  • Make various error messages consistent
  • Make single-line function definition use the compact syntax
  • Use check instead of require for internal state
  • Use string templates over format where possible

Copy link

Formatting check succeeded!

Copy link

codecov bot commented Dec 12, 2024

Codecov Report

Attention: Patch coverage is 37.03704% with 85 lines in your changes missing coverage. Please review.

Project coverage is 65.85%. Comparing base (61ea9a5) to head (ad813c2).
Report is 14 commits behind head on feature-kotlin.

Files with missing lines Patch % Lines
...model/src/main/java/org/hl7/cql/model/TupleType.kt 0.00% 18 Missing ⚠️
...rc/main/java/org/hl7/cql/model/ClassTypeElement.kt 0.00% 8 Missing and 1 partial ⚠️
...el/src/main/java/org/hl7/cql/model/IntervalType.kt 0.00% 7 Missing ⚠️
...org/hl7/cql/model/InvalidRedeclarationException.kt 0.00% 6 Missing ⚠️
.../model/src/main/java/org/hl7/cql/model/ListType.kt 0.00% 6 Missing ⚠️
...rc/main/java/org/hl7/cql/model/TupleTypeElement.kt 0.00% 5 Missing ⚠️
...l/src/main/java/org/hl7/cql/model/TypeParameter.kt 16.66% 3 Missing and 2 partials ⚠️
...el/src/main/java/org/hl7/cql/model/BaseDataType.kt 0.00% 4 Missing ⚠️
...model/src/main/java/org/hl7/cql/model/ClassType.kt 20.00% 3 Missing and 1 partial ⚠️
...org/cqframework/cql/cql2elm/model/ModelImporter.kt 0.00% 3 Missing ⚠️
... and 8 more
Additional details and impacted files
@@                 Coverage Diff                  @@
##             feature-kotlin    #1467      +/-   ##
====================================================
- Coverage             66.02%   65.85%   -0.18%     
- Complexity             3001     4844    +1843     
====================================================
  Files                   486      487       +1     
  Lines                 28447    28791     +344     
  Branches               5463     5428      -35     
====================================================
+ Hits                  18782    18959     +177     
- Misses                 7467     7616     +149     
- Partials               2198     2216      +18     

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

if (this.oneBased) " (one-based)" else "",
if (this.target != null) " (target: " + this.target + ")" else ""
)
return "$name:$type$%s%s%s"
Copy link
Contributor

Choose a reason for hiding this comment

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

It's pretty cool you can do this in Kotlin

@JPercival JPercival merged commit 650c1ab into feature-kotlin Dec 12, 2024
3 checks passed
@JPercival JPercival deleted the tuple-type-cleanup branch December 12, 2024 16:29
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
69.5% 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.

2 participants