界面已本地化;技能介绍与说明文档按所选语言由 AI 自动翻译,代码、命令、路径和专业术语保留原文,以原作者文档为准。
探索技能
数据与研究 · SKILL.md

android-tooling

android-tooling

【数据与研究】Configure Android static analysis with Detekt, Ktlint, and Android Lint for CI/CD quality gates. Use for Android-specific lint and quality tooling; defer generic Java Checkstyle, SonarQube, and standalone CI configuration.

独立 GitHub 快照 · 自动分类 · 以原作者文档为准

技能说明

GitHub

name: android-tooling description: Configure Android static analysis with Detekt, Ktlint, and Android Lint for CI/CD quality gates. Use for Android-specific lint and quality tooling; defer generic Java Checkstyle, SonarQube, and standalone CI configuration. metadata: triggers: files: - 'build.gradle.kts' - 'detekt.yml' - '.detekt/config.yml' keywords: - detekt - ktlint - lint - "@Suppress" - abortOnError - jlleitschuh

Android Tooling Standards

Priority: P1 (HIGH)

Implementation Guidelines

Static Analysis

  • Detekt: Enforce code complexity rules (LongMethod, LargeClass). Fail build on high complexity.
  • Ktlint: Enforce formatting style (Indent, Spacing). Use jlleitschuh plugin.
  • Android Lint: Treat warnings as errors in CI (abortOnError = true).

CI Gates

  • Pre-commit: Run lightweight checks (formatting) locally.
  • Pipeline: Run full checks (Detekt + Lint + Unit Tests) on Pull Request.

Anti-Patterns

  • No @Suppress in Production: Fix Detekt/lint violation at source.
  • No Manual Formatting: Let Ktlint handle it — configure auto-format on save in IDE.

References

我的收藏