petertrr / kotlin-multiplatform-diff

Multiplaform kotlin library for calculating text differences. Based on java-diff-utils, supports JVM, JS and native targets.
Apache License 2.0
74 stars 5 forks source link

Perform an overall code cleanup #108

Closed lppedd closed 3 months ago

lppedd commented 3 months ago

As per title, this is just a cleanup to enhance readability or remove unused/duplicated APIs.

I've split each cleanup action into its own commit to make it easier to review them.

lppedd commented 3 months ago

CI seems to be failing because of unreachable codecov.

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 69.89247% with 56 lines in your changes are missing coverage. Please review.

Project coverage is 84.17%. Comparing base (5f3e6b3) to head (04efa7a).

Files Patch % Lines
...hub/petertrr/diffutils/algorithm/myers/PathNode.kt 13.33% 12 Missing and 1 partial :warning:
...n/kotlin/io/github/petertrr/diffutils/DiffUtils.kt 76.19% 10 Missing :warning:
.../io/github/petertrr/diffutils/patch/ChangeDelta.kt 58.82% 7 Missing :warning:
...ub/petertrr/diffutils/algorithm/myers/MyersDiff.kt 72.72% 1 Missing and 5 partials :warning:
.../io/github/petertrr/diffutils/patch/DeleteDelta.kt 58.33% 5 Missing :warning:
.../io/github/petertrr/diffutils/patch/InsertDelta.kt 66.66% 4 Missing :warning:
...diffutils/patch/ConflictProducingConflictOutput.kt 75.00% 1 Missing and 2 partials :warning:
...kotlin/io/github/petertrr/diffutils/patch/Chunk.kt 81.81% 1 Missing and 1 partial :warning:
...iffutils/patch/ExceptionProducingConflictOutput.kt 33.33% 1 Missing and 1 partial :warning:
...o/github/petertrr/diffutils/patch/DiffException.kt 0.00% 1 Missing :warning:
... and 3 more
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #108 +/- ## ============================================ - Coverage 85.85% 84.17% -1.69% - Complexity 110 151 +41 ============================================ Files 14 22 +8 Lines 502 537 +35 Branches 89 89 ============================================ + Hits 431 452 +21 - Misses 47 58 +11 - Partials 24 27 +3 ``` | [Flag](https://app.codecov.io/gh/petertrr/kotlin-multiplatform-diff/pull/108/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Peter+Trifanov) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/petertrr/kotlin-multiplatform-diff/pull/108/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Peter+Trifanov) | `84.17% <69.89%> (-1.69%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Peter+Trifanov#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

lppedd commented 3 months ago

Thank you! I'll try to get code coverage up with one of the following PRs to port the java-diff changes.