Skip to content

Conversation

@emyfops
Copy link
Collaborator

@emyfops emyfops commented Mar 16, 2025

x

@github-actions github-actions bot added the triage Requires labelling or review label Mar 16, 2025
@Avanatiker Avanatiker requested a review from Copilot April 3, 2025 04:32
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

This PR introduces extensive unit tests for various mathematical, collection, and task-related utilities, while also refactoring some function and variable names for consistency across the codebase. Key changes include:

  • Addition of comprehensive test suites for vector math, range functions, and collection utilities.
  • Renaming of several methods (e.g. from “mod” to “remainder” and “setMaxSize” to “setSizeLimit”) to improve clarity.
  • Minor refactorings in task and network modules to enhance state management and integration with the testing pipeline.

Reviewed Changes

Copilot reviewed 18 out of 20 changed files in this pull request and generated no comments.

File Description
common/src/test/kotlin/* New test classes covering Vec3d/Vec2d operations, VarIntIterator, Task handling, ranges, and collection utilities.
common/src/main/kotlin/com/lambda/util/* Renaming of functions and properties for improved clarity and consistency (e.g., mod → remainder, setMaxSize → setSizeLimit).
.github/workflows/build.yml Adjustments to the build workflow and branch filters.
Files not reviewed (2)
  • common/build.gradle.kts: Language not supported
  • gradle.properties: Language not supported
Comments suppressed due to low confidence (2)

common/src/main/kotlin/com/lambda/task/Task.kt:41

  • [nitpick] Changing both 'subTasks' and 'state' from private to public may expose internal task state to external modification. Consider retaining encapsulation unless there is a deliberate need to modify these properties externally.
val subTasks = mutableListOf<Task<*>>()
var state = State.INIT

common/src/main/kotlin/com/lambda/util/VarIntIterator.kt:36

  • [nitpick] The use of the variable 'size' as a counter for groups read is slightly ambiguous. Renaming it to 'groupCount' (or a similar name) would improve clarity.
value = value or ((b and SEGMENT_BIT) shl (size++ * 7))

has issues with mocking logging ingame thats why some tests are disabled for now
@Avanatiker Avanatiker merged commit f9dcafb into master Apr 7, 2025
3 checks passed
@Avanatiker Avanatiker deleted the feature/tests branch April 7, 2025 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

triage Requires labelling or review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants