dart-code-linter

Installation
SKILL.md

Dart Code Linter (DCL)

Overview

dart_code_linter (DCL) is a static analysis tool for Dart/Flutter — the maintained open-source fork of dart-code-metrics (DCM). It reports rules, metrics (cyclomatic complexity, nesting, parameter counts, etc.) and anti-patterns, and can apply some fixes automatically. This skill drives DCL end-to-end: install → analyze → parse the JSON output → fix violations → verify nothing broke.

Core principle: always analyze with --reporter=json so you can parse exactly what to fix and where, fix in batches from safest to riskiest, then re-analyze and re-test after every batch so a fix never silently breaks the build or tests.

Canonical entrypoint: dart run dart_code_linter:metrics <command> <target>. There is no top-level dcl binary.

When to use

  • "Lint / analyze my Dart (or Flutter) code", "find code smells", "check complexity / metrics".
  • "Fix the lint problems automatically", "clean up this file/module".
  • "Find unused files / unused code / unused localization".
  • "Lint only what changed in this PR" / "validate PR #123".
  • Setting up a CI quality gate for a Dart/Flutter repo.

When NOT to use: non-Dart projects; pure formatting (dart format) or core-SDK analyzer fixes (dart fix) with no DCL rules involved — though L1 still wraps those as a convenience.

Installs
4
First Seen
Jun 15, 2026