Skip to content

Conversation

@DmitryNekrasov
Copy link
Owner

Enable stricter compiler checks, move path compression logic in DisjointSetUnion, and add @IgnorableReturnValue annotations.

…ointSetUnion`, and add `@IgnorableReturnValue` annotations.
Copy link

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

Enables stricter Kotlin compiler return-value checking and updates affected APIs/tests accordingly, including a small refactor in DisjointSetUnion for path compression.

Changes:

  • Enable allWarningsAsErrors and -Xreturn-value-checker=full in Gradle Kotlin compiler options.
  • Refactor DisjointSetUnion.find() path compression into a dedicated compress() helper and annotate union() as ignorable.
  • Annotate MutableMap.decrement() as ignorable and adjust DSU tests to avoid ignoring return values.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.

File Description
src/test/kotlin/kodvent/datastructures/DisjointSetUnionTest.kt Updates a test to accommodate the return-value checker.
src/main/kotlin/kodvent/datastructures/DisjointSetUnion.kt Refactors path compression and marks union() return value as ignorable.
src/main/kotlin/kodvent/collections/MapExtensions.kt Marks decrement() return value as ignorable.
build.gradle.kts Enables stricter compiler settings (warnings-as-errors + return-value checker).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

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

Copilot reviewed 3 out of 4 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@DmitryNekrasov DmitryNekrasov merged commit d78a321 into main Jan 30, 2026
7 checks passed
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