fleetlint Policy for a fleet of repositories
v0.11 (latest)
Getting started

repo/lockfile-committed/flutter

Dependency lockfile is committed

Implements repo/lockfile-committed for flutter.

Severityerror
Tiers1, 2
Stacksflutter
Scopeeach
Kindexpr
Sourcelibrary v0.8.0
Selected byfleetlint-recommended@v0.8.0

Requirement

pubspec.lock is tracked when pubspec.yaml declares dependencies; a pub workspace member (resolution: workspace) uses the pubspec.lock of the workspace root above it.

Why

Builds are reproducible only when dependency versions are pinned in git.

Check

"pubspec.lock" in tracked() || scan("pubspec.yaml", r'^(dev_)?dependencies:').size() == 0 || (scan("pubspec.yaml", r'^resolution:\s*workspace').size() > 0 && ["../", "../../", "../../../"].exists(d, file(d + "pubspec.lock")))

Fix

Run flutter pub get (or dart pub get) and commit pubspec.lock.

Agent instruction (from repo/lockfile-committed): Run the package manager to produce the lockfile, remove any .gitignore entry for it, and commit it.

A finding that names no file points at pubspec.lock.

Sources


Generated by fleetlint docs from catalog v0.8.0.