Skip to content
pubscout

dart_code_linter

4.4.5, released 11 days ago by bancolombia.com

A software analytics and static analysis tool for checking code metrics, lint rules, and unused code.

$ flutter pub add dart_code_linter
Source repository

What it does

Dart Code Linter analyzes Dart and Flutter code against over 70 pre-built rules and metrics. It integrates into the analyzer via plugins and provides a CLI for running checks like unused files, localization, and dead code.

AI-written summary of version 4.4.4, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You want to enforce custom lint rules and architectural metrics in your Dart or Flutter project.
  • You need to detect unused code, files, or localizations in a repository.

Skip it when

  • Your Dart SDK version is unsupported by the current DCL release matrix.
  • You only require standard out-of-the-box Dart linter rules.

Strengths

  • Comprehensive collection of custom rules and metrics with auto-fix support.
  • CLI commands for deep analysis including unused code and localization checks.

Weaknesses

  • Requires careful compatibility management with specific Dart SDK and analyzer package versions.
  • Public members analysis for unused code can produce false positives.

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
19

Add as a dev dependency and configure in analysis_options.yaml.

dart pub add --dev dart_code_linter

Alternatives

Packages that do the same job and could replace dart_code_linter.

  • dart_code_metrics_presets

    Predefined configuration presets of lint rules and metrics for DCM.

  • ciach

    Dead code detector for Dart and Flutter that finds and removes unused declarations.

  • cognitive_complexity

    Algorithmic Cognitive Complexity calculation and Data-Flow analysis library and CLI tools.

  • werkbank

    A powerful tool that helps you develop, test, visualize, and organize your Flutter UI components.

Works with

Packages commonly used together with dart_code_linter: ones it builds on, ones built on it, and its own family.