Skip to content

Adopt library quality standard: formatting, static analysis, coverage and docs - #3

Draft
AndroidPoet wants to merge 1 commit into
mainfrom
chore/library-standard
Draft

AndroidPoet wants to merge 1 commit into
mainfrom
chore/library-standard

Conversation

@AndroidPoet

Copy link
Copy Markdown
Owner

Summary

Brings the repo up to our reusable library quality standard by wiring four pillars into the build and aligning configuration across all ten published modules.

Pillars

Pillar Status Notes
Spotless Added ktlint 1.5.0 (ktlint_official) via the Spotless plugin 8.6.0; formats Kotlin sources, all *.gradle.kts, and misc (*.md, .gitignore, config/**/*.yml). A shared .editorconfig drives both the IDE and the Gradle check.
detekt Added detekt 1.23.7 with a shared config/detekt/detekt.yml; analyses every commonMain/commonTest/jvmMain/iosMain/wasmJsMain source set with per-module baselines.
Kover Added kover 0.8.3 aggregates JVM line coverage across all published modules; koverVerify gates regressions.
Docs site Added Nextra site under website/ with Appwrite-specific content (Introduction, Getting Started, Usage, Results & Errors, Modules, Platforms, Realtime) plus a GitHub Pages deploy workflow.

Verification

All run locally and pass:

  • ./gradlew spotlessApply then spotlessCheck — clean
  • ./gradlew detekt — clean
  • ./gradlew koverXmlReport koverVerify — passes (aggregate JVM line coverage ~12.7%, floor set to 10%; most tested code lives in appwrite-core, the thin REST-wrapper service modules are currently untested)
  • ./gradlew compileKotlinJvm jvmTest — green
  • pnpm build in website/ — all pages export to static HTML

Notable changes beyond config

  • Expanded wildcard imports (auth models, ktor) to satisfy ktlint no-wildcard-imports. Source reformatting is otherwise purely cosmetic.
  • A few detekt rules are tuned in detekt.yml with inline rationale: MatchingDeclarationName/ktlint filename (a file pairs an Appwrite-prefixed name with a short type whose name a sibling already owns), UnusedParameter (Kotlin/Wasm js(...) shims reference params inside the JS string body), FunctionOnlyReturningConstant (Role/Permission constant accessors kept for API parity), MaxLineLength/TooGenericExceptionThrown (test fixtures only).
  • Added quality gates to the build workflow, a docs deploy workflow, .kotlin/ to .gitignore, and a Contributor Covenant code of conduct.

Skipped

None of the four pillars were skipped.

Notes

Draft — please review the detekt rule tunings and the coverage floor before merging.

Wire the four quality pillars into the build and align config across modules:

- Spotless (ktlint 1.5.0 / ktlint_official) formats all Kotlin and Gradle
  scripts; shared .editorconfig drives both the IDE and the Gradle check.
- detekt 1.23.7 with a shared config/detekt/detekt.yml, analysing every
  common/jvm/ios/wasmJs source set with per-module baselines.
- Kover 0.8.3 aggregates JVM line coverage across all published modules and
  gates regressions via koverVerify.
- Nextra documentation site under website/ (Introduction, Getting Started,
  Usage, Results & Errors, Modules, Platforms, Realtime) with a GitHub Pages
  deploy workflow.

Also expands wildcard imports to satisfy ktlint, adds quality gates to the
build workflow, ignores .kotlin/, and adds a Contributor Covenant code of
conduct. Source reformatting is purely cosmetic; JVM compile and jvmTest pass.
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.

1 participant