detekt-custom-rules

Create and register custom Detekt rules for dependency injection patterns in Kotlin projects.

58|4|Updated Mar 8, 2026
One-click install
npx skills add https://github.com/po4yka/RIPDPI --skill detekt-custom-rules
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: detekt-custom-rules
Source: https://github.com/po4yka/RIPDPI/tree/main/.github/skills/detekt-custom-rules
Command: npx skills add https://github.com/po4yka/RIPDPI --skill detekt-custom-rules

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Custom detekt rules help teams enforce DI guardrails and reduce false positives in Kotlin projects.

Core Features & Use Cases

  • Create and register Detekt rules across modules.
  • Define DI-related checks to guard Hilt usage and constructor patterns.
  • Use and configure detekt.yml to apply rules consistently across CI.

Quick Start

Configure and run the custom Detekt rules in your Kotlin project to begin enforcing DI guardrails.

Frequently Asked Questions about detekt-custom-rules

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

FAQPage Schema
How do I create custom Detekt rules to enforce dependency injection patterns in Kotlin?

Custom Detekt rules enforce DI guardrails by implementing rule classes, registering a RuleSetProvider, and configuring checks in a detekt.yml file to validate Kotlin constructor patterns and Hilt usage across modules.

What is the best way to configure static analysis for Hilt dependency injection in a multi-module Kotlin project?

Configuring static analysis for Hilt DI in a multi-module Kotlin project involves creating a custom Detekt rule set, registering it via a provider, and applying consistent YAML configuration across your CI pipeline to guard constructor patterns.

How do you test custom Detekt rules to ensure they catch dependency injection violations?

You test custom Detekt rules by writing unit tests that validate your rule classes against Kotlin code snippets, ensuring the static analysis correctly identifies and flags dependency injection guardrail violations during the linting process.

Can I use Detekt for static analysis to check Kotlin dependency injection across multiple modules?

Yes, you can use Detekt for static analysis across multiple Kotlin modules by developing a custom rule set, registering a RuleSetProvider, and applying the YAML configuration consistently across modules to enforce DI safety.

Why should I write custom Detekt rules instead of using existing linters for Kotlin DI safety?

Writing custom Detekt rules allows you to enforce specific dependency injection guardrails tailored to your project, reducing false positives from generic linters and ensuring Hilt constructor patterns are validated consistently in CI.

Do I need to configure detekt.yml to activate custom rules for Kotlin dependency injection checks?

Yes, you need to configure detekt.yml to activate custom rules, enabling the static analysis engine to apply your specific dependency injection guardrails and enforce DI safety consistently across the Kotlin project's CI pipeline.