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

repo/toolchain-pinned/flutter

Toolchain version is pinned

Implements repo/toolchain-pinned for flutter.

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

Requirement

.fvmrc (or .fvm/fvm_config.json) exists, pubspec.yaml’s environment.flutter is an exact version, or .tool-versions/mise or devbox.json names flutter with a version. In devbox.json the package needs a version (flutter@3.32, flutter332); @latest does not count.

Why

Without a pin, every machine and every CI run builds with whatever compiler or runtime happens to be installed, and failures cannot be reproduced.

Check

["", "../", "../../", "../../../"].exists(d, file(d + ".fvmrc") || file(d + ".fvm/fvm_config.json")) || scan("pubspec.yaml", r'^\s+flutter:\s*["\x27]?\d+\.\d+\.\d+["\x27]?\s*$').size() > 0 || ["", "../", "../../", "../../../"].exists(d, file(d + ".tool-versions") && scan(d + ".tool-versions", r'^\s*(flutter)\s+\S*\d').size() > 0) || ["", "../", "../../", "../../../"].exists(d, ["mise.toml", ".mise.toml", ".config/mise.toml", ".config/mise/config.toml", "mise/config.toml"].exists(n,
     file(d + n) && scan(d + n, r'^\s*"?(flutter)"?\s*=\s*[^#\n]*\d').size() > 0))
|| ["", "../", "../../", "../../../"].exists(d, file(d + "devbox.json") && text(d + "devbox.json").matches(r'"(flutter)(@v?\d|"\s*:\s*("v?\d|\{[^}]*"version"\s*:\s*"v?\d))|"(flutter\d+)(@[^"]*)?"'))

Fix

Run fvm use <version> (writes .fvmrc).

Agent instruction (from repo/toolchain-pinned): Add the stack’s toolchain pin set to the version currently installed; do not upgrade the toolchain in the same change.

A finding that names no file points at .fvmrc.

Sources


Generated by fleetlint docs from catalog v0.8.0.