Skip to main content

Other Notable Packages

Notable third-party tools that complement solid_lints in keeping Dart and Flutter codebases clean, robust, and maintainable.

undead

pub package

Deterministic reachability and dead/unused declaration analysis for Dart and Flutter packages.

It performs whole-package AST analysis using package:analyzer to build a reachability graph from known entrypoints to all internal declarations, identifying unused top-level declarations, classes, functions, and variables.


cognitive_complexity

pub package

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

It implements the Cognitive Complexity principles articulated by SonarSource, providing an objective way to find and fix overly complex logic and routines.


dedupe

pub package

High-performance code duplication and clone detection engine and CLI tool for Dart and Flutter.

It scans codebases to detect token-level, structural, and near-miss code clones across files and packages with fast incremental analysis.

Comparison: avoid_duplicate_code vs dedupe

Feature / Scenarioavoid_duplicate_codededupe
Tool typeDart Analyzer / Linter plugin ruleStandalone CLI tool & Dart library/API
Primary workflowReal-time in-IDE feedback and dart analyzeRepository auditing, CI/CD checks, PR gating, batch analysis
Detection approachBlock-level (AST): Analyzes complete syntactic structures (functions, methods, closures, if/for bodies)Sequence-level (Tokens): Analyzes continuous sequences of code anywhere across files
Whole functions & blocks
(e.g., duplicated methods with renamed variables)
DetectedDetected
Sub-method fragments
(e.g., 5–10 copied lines inside a 50-line method)
Skipped (only evaluates complete blocks/methods)Detected (flags duplicate snippets regardless of block boundaries)
Near-miss / modified clones
(e.g., copy-paste with an extra line or minor edit)
Skipped (requires matching syntactic block structure)Detected (fuzzy matching detects clones with insertions/deletions)
Differing literals diffingDetailed in-IDE diff (pinpoints exact differing values, e.g. 'email' vs 'sms')No per-value diff (flags clone locations without a detailed literal breakdown)
Reporting & diagnosticsIDE Problems & Related LocationsMarkdown, JSON, GitHub Actions annotations, % duplication metrics
Disk cache usage

💡 Best Together: Use avoid_duplicate_code for instant IDE feedback, and dedupe for CI/CD quality gates and repository-wide code clone audits.