fleetlint Policy for a fleet of repositories
v0.8
Getting started

deps/unused-check/flutter

Unused dependencies are detected

Implements deps/unused-check for flutter.

Severityinfo
Tiers1
Stacksflutter
Scopeeach
Kindoutcome
Sourcelibrary v0.5.0
Selected byfleetlint-recommended@v0.5.0

Requirement

A recipe or CI step runs dependency_validator (dart run dependency_validator).

Why

Every declared dependency is attack surface and update churn; one nothing uses is pure cost.

Parameters

  • runners: [../Makefile ../justfile ../Justfile ../Taskfile.yml ../Taskfile.yaml ../../Makefile ../../justfile ../../Justfile ../../Taskfile.yml ../../Taskfile.yaml ../../../Makefile ../../../justfile ../../../Justfile ../../../Taskfile.yml ../../../Taskfile.yaml]
  • skip: ^\s*[@+-]*\s*(\{\{[^}]*\}\}\s*|\$[({][A-Za-z_]+[)}]\s*)?(#|//|echo\b|printf\b|(sudo\s+)?(go (install|get)|cargo b?install|pipx? install|pip3 install|python3? -m pip install|uv (tool |pip )?(install|add)|(npm|pnpm|yarn|bun) (i|install|add|global add)|gem install|bundle add|brew install|dotnet tool (install|update)|composer (global )?require|apt(-get)? install|curl|wget)\b[^;&]*$)

Fix

Add dependency_validator as a dev dependency and run dart run dependency_validator in the audit target.

Agent instruction: Add the stack’s unused-dependency checker to the audit target; remove the dependencies it reports in a separate change after confirming nothing loads them dynamically.

A finding of this rule points at the file taskrunner.file != "" ? taskrunner.file : "Makefile" yields.

Sources


Generated by fleetlint docs from catalog v0.5.0.