Skip to content

MOEN-45889: Migrate ktlint to ktfmt/Spotless, fix dart format CI check - #230

Open
kkgowtham-engg-sdk wants to merge 1 commit into
feature/MOEN-45889_major_version_updatefrom
feature/MOEN-45889_format_fix_ktfmt_migration
Open

MOEN-45889: Migrate ktlint to ktfmt/Spotless, fix dart format CI check#230
kkgowtham-engg-sdk wants to merge 1 commit into
feature/MOEN-45889_major_version_updatefrom
feature/MOEN-45889_format_fix_ktfmt_migration

Conversation

@kkgowtham-engg-sdk

@kkgowtham-engg-sdk kkgowtham-engg-sdk commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Migrate Kotlin lint/format from ktlint to Spotless + ktfmt (0.62, kotlinlangStyle, matching MoEngage-Android-SDK), commented out by default and toggled on via script for format/verify, same as the old ktlint setup.
  • Fix verify-format.sh: it was cd-ing into the wrong directory, so the dart format check silently always passed regardless of actual formatting drift.
  • Apply dart format . workspace-wide to clear the drift the broken check had missed.

Test plan

  • spotlessCheck/spotlessApply toggle scripts verified end-to-end (including failure + re-comment behavior)
  • flutter build apk --debug builds with Spotless commented out (default state)
  • verify-format.sh verified to fail on unformatted code, pass on clean code
  • melos run analyze / melos run unittest pass

@moe-hodor

moe-hodor Bot commented Jul 7, 2026

Copy link
Copy Markdown

🚪 Hodor is reviewing this PR... 👀

@moe-hodor moe-hodor Bot added cfr:neutral Change Failure Rate: neutral impact branch:feature Planned work — new functionality or enhancement (neutral CFR) labels Jul 7, 2026
Comment thread packages/moengage_cards/moengage_cards_android/android/build.gradle
Comment thread packages/moengage_cards/moengage_cards_android/android/build.gradle

@moe-hodor moe-hodor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review: MOEN-45889 - ktlint → Spotless Migration

Issues (3 after filtering):
⚠️ Warning: 1
💡 Suggestion: 2

Hodor filtered 2 low-signal comment(s) to reduce noise.
Verdict: COMMENT

@kkgowtham-engg-sdk
kkgowtham-engg-sdk force-pushed the feature/MOEN-45889_format_fix_ktfmt_migration branch from cea5f21 to f2b545d Compare July 7, 2026 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

branch:feature Planned work — new functionality or enhancement (neutral CFR) cfr:neutral Change Failure Rate: neutral impact

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant