Skip to content

chore(format): apply spotless ktlint formatting to maps3d-compose and maps3d-compose-demo - #71

Open
dkhawk wants to merge 2 commits into
mainfrom
chore/spotless-formatting-compose-and-demo
Open

dkhawk wants to merge 2 commits into
mainfrom
chore/spotless-formatting-compose-and-demo

Conversation

@dkhawk

@dkhawk dkhawk commented Sep 22, 2026 •

Copy link
Copy Markdown
Collaborator

🥞 Stacked PR (1 of 2)


Summary

Applies spotlessApply (ktlint) code formatting to pre-existing files across the maps3d-compose and maps3d-compose-demo modules.

Both modules configure the Spotless Gradle plugin with target("**/*.kt") and ktlint(), enforcing strict adherence to line-length limits (max-line-length 100), argument wrapping, and newline conventions. Pre-existing unformatted lines on main caused spotlessCheck failures on feature branches; this PR brings all files in these modules into 100% spotless compliance.

Also refactors WhiskeyCompass.kt drawing logic into dedicated private DrawScope helper functions (drawCompassStrip, drawDegreeTick, drawCardinalLabel, drawDegreeLabel) to eliminate deep indentation nesting and maintain clean line lengths.

Changes by Module

maps3d-compose

  • GoogleMap3D.kt: Moved trailing inline comment to its own line to keep line length <= 100.
  • CameraUpdate.kt: Wrapped multi-line expression body in FlyAroundOptions.toCameraUpdate().
  • Units.kt: Wrapped conditional expressions and template instantiations in ImperialUnitsConverter and MetricUnitsConverter.
  • Utilities.kt: Wrapped long function headers and KDoc comments.

maps3d-compose-demo

  • CameraAnimationsActivity.kt: Wrapped suspend extension function declaration and listener callbacks.
  • MapInteractionsActivity.kt: Wrapped camera setup lambda arguments.
  • TiltScale.kt: Formatted canvas drawing parameters and line wraps.
  • WhiskeyCompass.kt: Formatted compass canvas drawing; encapsulated parameters in CompassStripParams and extracted tick, strip, and label drawing into private DrawScope helpers to eliminate deep nesting and manage line lengths cleanly.
  • BaseVisualTest.kt: Formatted method signature for captureScreenshot().
  • Maps3DVisualTest.kt: Formatted JSON parsing and assertion failure message wrapping.

Verification

  • ./gradlew :maps3d-compose:spotlessCheck :maps3d-compose-demo:spotlessCheck -> BUILD SUCCESSFUL
  • ./gradlew :maps3d-compose:lintDebug :maps3d-compose-demo:lintDebug -> BUILD SUCCESSFUL
  • ./gradlew :maps3d-compose:compileDebugKotlin :maps3d-compose-demo:compileDebugKotlin -> BUILD SUCCESSFUL

@dkhawk
dkhawk requested a review from LoyalAbbas September 22, 2026 17:11
@dkhawk
dkhawk marked this pull request as ready for review September 22, 2026 17:11
@dkhawk
dkhawk added this pull request to stack #73 September 22, 2026 17:12
@dkhawk
dkhawk requested a review from LoyalAbbas September 23, 2026 20:11

@LoyalAbbas LoyalAbbas left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

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