spotless-fix

Automate Kotlin code style and ktlint enforcement via Gradle tasks.

343|68|Updated Jun 14, 2017
One-click install
npx skills add https://github.com/MartinStyk/AndroidApkAnalyzer --skill spotless-fix
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: spotless-fix
Source: https://github.com/MartinStyk/AndroidApkAnalyzer/tree/main/.claude/skills/spotless-fix
Command: npx skills add https://github.com/MartinStyk/AndroidApkAnalyzer --skill spotless-fix

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill resolves common Kotlin code formatting violations and ktlint errors, ensuring your codebase adheres to project-wide style standards without manual intervention.

Core Features & Use Cases

  • Automated Formatting: Applies consistent style rules across all project modules using the Spotless Gradle plugin.
  • Violation Detection: Allows for dry-run checks to identify style issues before they are committed.
  • Use Case: After refactoring a feature module, run this skill to automatically fix multiline function signatures, trailing commas, and import order issues to ensure the code passes CI checks.

Quick Start

Run the spotless-fix skill to apply all necessary code formatting and style corrections to the entire project.

Frequently Asked Questions about spotless-fix

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate Kotlin code style and ktlint fixes in a Gradle project?

You can automate Kotlin code style and ktlint fixes by running a skill that executes standard Gradle tasks to enforce consistent formatting across all modules and build-logic components without manual intervention.

What is the best way to fix multiline function signatures and import order in Kotlin?

The best way to fix multiline function signatures and import order issues is to apply automated formatting rules using the Spotless Gradle plugin to ensure your codebase adheres to project-wide style standards.

Can I check for ktlint violations in Kotlin before committing code?

Yes, you can perform a dry-run check to identify ktlint and code style violations before they are committed, allowing you to resolve formatting issues locally to pass CI checks.

Does Spotless support Compose-specific linting requirements for Kotlin?

Yes, the automated formatting targets Compose-specific linting requirements alongside multiline function signatures and import management to ensure correct style enforcement across the project.

Why do I need to run Gradle tasks for Kotlin formatting after refactoring a feature module?

You need to run Gradle tasks for Kotlin formatting after refactoring to automatically fix trailing commas, import order, and multiline function signatures so your updated code passes CI checks.