sweeper
Finds and removes unused gen-l10n translation keys from ARB files using resolved static analysis.
0.4.2
4.8K downloads/mo
#3897 most downloaded on pub.dev
yash-garg/sweeper
What this package is like to depend on
Last release 1 months ago
08 Jul 2026
Too new to tell
only 1 release windows
Nearly every release is documented
notes for 8 of 8 stable releases
Nothing withdrawn
no release was ever pulled
1 months old
8 releases · first in 2026
8 releases in the last 12 months
see the full history below
Release timeline
8 releases · Jul 2026 to Jul 2026Releases
latest 8-
0.4.208 Jul 2026Release notes
Open source →- Internal: stricter lint rules and style cleanups; no functional changes.
-
0.4.108 Jul 2026Release notes
Open source →cleanno longer rewrites ARB files it removed nothing from: untouched files stay byte-identical instead of being reformatted by re-serialization.- Hand-written Dart files inside the gen-l10n output directory (e.g.
lib/l10n/l10n.darthelpers) are now scanned for key usage; only the generated<output-localization-file>and its_<locale>variants are excluded. Previously, keys used only in such files were wrongly deleted. tool/scripts are now scanned for key usage.- Invalid
--keepglobs report a clean error (exit 2) instead of crashing with a stack trace. --keepglobs are case-sensitive on every platform; previously they were case-insensitive on Windows only.SweepEngineaccepts a relativeprojectRootinstead of throwing a rawArgumentError.- Removing an ARB key with an explicit
nullvalue is now counted in the per-file removal totals. - Atomic writes use a pid-suffixed temp file (safe under concurrent runs) and clean up the temp file on failure.
-
0.4.007 Jul 2026Release notes
Open source →What's Changed
- feat: monorepo and workspaces support by @yash-garg in #2
New Contributors
- @yash-garg made their first contribution in #2
Full Changelog: v0.3.0...v0.4.0
Release notes
Open source →- New
--scan/-sflag oncheckandclean: include additional package roots (monorepo siblings) when scanning for key usage. - Pub workspaces are detected automatically: all workspace members are
scanned for key usage, and the shared root
package_config.jsonis found by walking up parent directories.
-
0.3.007 Jul 2026Release notes
Open source →What's Changed
- chore(deps): bump actions/checkout from v4 to v7 by @dependabot[bot] in #1
New Contributors
- @dependabot[bot] made their first contribution in #1
Full Changelog: v0.2.2...v0.3.0
Release notes
Open source →- New
sortcommand: alphabetizes keys in all ARB files, keeping@@headers first and@keymetadata attached to its key.
-
0.2.207 Jul 2026Release notes
Open source →- Widened
analyzerconstraint to>=10.0.0 <15.0.0so sweeper can coexist with packages pinned to older analyzer majors (e.g. dart_code_linter). Full test suite verified against analyzer 10.0.0 and 14.0.0.
- Widened
-
0.2.107 Jul 2026 -
0.2.007 Jul 2026Release notes
Open source →- Hardened detection: the localizations class must be declared in the
gen-l10n output location (
output-diror the legacypackage:flutter_gensynthetic package), so identically-named classes elsewhere never count. - Colored terminal output (ANSI auto-detected, plain when piped).
- New
--quiet/-qflag oncheckandcleanto print summaries only. - Dartdoc for the full public API and a pub.dev example.
- Hardened detection: the localizations class must be declared in the
gen-l10n output location (
-
0.1.007 Jul 2026Release notes
Open source →- Initial release:
checkandcleancommands with resolved-AST unused-key detection,--keepglobs,--json,--dry-run, and fail-closed behavior.
- Initial release: