saropa_lints 15.2.2
saropa_lints: ^15.2.2 copied to clipboard
2332 custom lint rules with 254 quick fixes for Flutter and Dart. Static analysis for security, accessibility, and performance.
Changelog #
....
-+shdmNMMMMNmdhs+-
-odMMMNyo/-..``.++:+o+/-
/dMMMMMM/ `````
dMMMMMMMMNdhhhdddmmmNmmddhs+-
/MMMMMMMMMMMMMMMMMMMMMMMMMMMMMNh/
. :sdmNNNNMMMMMNNNMMMMMMMMMMMMMMMMm+
o ..~~~::~+==+~:/+sdNMMMMMMMMMMMo
m .+NMMMMMMMMMN
m+ :MMMMMMMMMm
/N: :MMMMMMMMM/
oNs. +NMMMMMMMMo
:dNy/. ./smMMMMMMMMm:
/dMNmhyso+++oosydNNMMMMMMMMMd/
.odMMMMMMMMMMMMMMMMMMMMdo-
-+shdNNMMMMNNdhs+-
``
Made by Saropa. All rights reserved.
Learn more at https://saropa.com, or mailto://dev.tools@saropa.com
2300+ custom lint rules with 250+ quick fixes for Flutter and Dart — static analysis for security, accessibility, performance, and library-specific patterns. Includes a VS Code extension with Package Vibrancy scoring.
Package — pub.dev/packages/saropa_lints
Releases — github.com/saropa/saropa_lints/releases
VS Code Marketplace — marketplace.visualstudio.com/items?itemName=saropa.saropa-lints
Open VSX Registry — open-vsx.org/extension/saropa/saropa-lints
15.2.2 #
CLI reference guide — complete flag tables, CI examples, and exit codes for every CLI command.
The scan CLI gains three new flags that make it easier to wire into CI and automation pipelines. --min-impact filters by the rule author's declared impact rather than the configurable analyzer severity, --fail-on decouples the exit code from display filtering so you can show everything but fail only on errors, and --json-file-path writes machine-readable output to a file without stdout redirection. A --quiet flag silences all progress chatter for fully headless runs. The Problems-tab cap (max_issues) is now actually enforced instead of just tracked. log
Added #
- Scan CLI:
--min-impactflag filters diagnostics by the rule's declared impact level (error, warning, info) instead of the analyzer severity. Some rules have info severity but warning impact;--min-impact warningexcludes the truly-info ones. JSON output now includes animpactfield per diagnostic. (#308) - Scan CLI:
--json-file-path <path>writes JSON output directly to a file instead of stdout, so automation harnesses can consume the result without stdout redirection. Implies--format json. (#310) - Scan CLI:
--fail-on <severity>decouples the exit code from display filtering — the scan shows all diagnostics (or those matching--min-severity) but exits 1 only when the full set contains at least one diagnostic at or above the threshold (e.g.--fail-on error). Pair with--fail-on-count <n>to tolerate a known baseline (exit 1 only when the count exceeds n). JSON output includes afailOnmetadata object when the flag is active. (#309) - Scan CLI:
--quiet/-qflag suppresses all stderr progress and status messages. The caller gets only the exit code and stdout output (report or JSON). Useful for fully silent automation paired with--json-file-path. - Scan CLI:
--json-file-pathnow creates parent directories if they don't exist, so callers don't need tomkdirfirst.
Fixed #
- The
max_issuesProblems-tab cap (default 500, configurable viamax_issues:inanalysis_options_custom.yaml) is now actually enforced. It previously tracked the count and printed a "N issues in Problems tab" message without withholding anything — every issue still reached the Problems tab regardless of the configured limit. ERROR-severity diagnostics always surface regardless of the cap;violations.jsonand the text report remain uncapped either way. No action required. - Scan CLI progress messages ("Loaded N rules…", "Scanning N files…") now go to stderr instead of stdout, so
--format jsonoutput is valid JSON when redirected to a file. No action required. (#310)
Added (docs) #
- New standalone CLI reference guide documents every CLI command (
init,scan,cross_file,project_vibrancy,quality_gate,baseline,rule_count,project_health) with complete flag tables, CI examples, exit codes, and JSON output schema. The README scanner section is also updated with the full flag set. No action required.
Maintenance
- Publish script test runner now detects Dart VM heap corruption crashes and Windows file-lock races as transient infrastructure failures, shows a clear diagnosis, and recommends Retry instead of leaving the user to parse raw stack traces.
15.2.0 #
Rule execution is roughly twice as fast, and the analysis server now reports the ~200 most important error and warning rules by default without holding the full resolved type model in memory — the remaining rules fire on save via the scan daemon so nothing is lost. Measured at +0.6% memory over the plugin-off baseline (vs +77.2% for full in-process coverage), so this is safe for every project with the plugins: block enabled, with no config change required. The About panel and tier picker now show live rule counts from a single source of truth, replacing stale hand-typed numbers. log
Added #
- New
rule_countCLI (dart run saropa_lints:rule_count, or--format json) reports the live rule count per tier plus opt-in stylistic rules, computed directly fromlib/src/tiers.dart. No action required. - New
--profileflag on the scan CLI records per-rule execution timing and writes it toreports/.saropa_lints/rule_timings.json(slowest first, with call counts and averages). Timing was previously collected but never written anywhere; this makes slow rules measurable so performance work targets real offenders. No action required. - New
lanesetting underplugins.saropa_lintscontrols which rules run inside the analysis server.light(the default when the key is absent) runs only the ~200 error and warning rules that need no type resolution, so those findings appear in the editor shortly after typing pauses rather than only after a save, without the editor holding the whole project's resolved type model; the rest still fire on save via the scan daemon. Setlane: fullto keep the previous behavior of running every enabled rule in-process.
Changed #
- Rule execution is roughly twice as fast: project-root lookups are now memoized instead of re-walking the directory tree on every AST node, the hottest platform/import rules run their cheap syntactic checks before project gates, repeated file probes are cached, and deprecation checks are computed once per API element instead of once per reference — a 47% rule-time reduction on a 165-file before/after benchmark, confirmed at scale on a 4,487-file production app. No action required.
Fixed #
prefer_moving_to_variable,prefer_pattern_destructuring,avoid_multiple_stream_listeners, andrequire_sqflite_transactionno longer re-scan nested scopes once per enclosing block, which removes duplicate diagnostics for the same code. Each nested block (anif/elsearm, a loop ortrybody, any brace-delimited scope) is now judged on its own rather than summed with its enclosing scope — this also means a pattern split across a block boundary (e.g. 2 writes before a loop plus 1 inside it) may no longer triggerrequire_sqflite_transactionoravoid_multiple_stream_listenerswhere it previously did. No action required.- Dropping a
.saropa_stopfile in the scan target root now actually aborts a running scan between files with a partial report, instead of being silently ignored by the scan CLI; the sentinel is consumed so the next scan runs normally. No action required.
Added (Extension) #
- (Extension) The About Saropa Lints panel now shows a live rule-count strip (total plus per-tier breakdown) fetched from the new
rule_countCLI when a project is open, replacing the static number previously baked into the panel's markdown copy. No action required. - (Extension) The Manage Rule Packs tier picker now shows each tier's live rule count next to its name (e.g. "essential 331 rules"), fetched once per panel open from the same
rule_countCLI. No action required. - (Extension) On-save scans now skip the rules the in-process plugin already reports when a project runs
lane: light, so a finding is not listed twice in the Problems panel; the skip applies only while the plugin is verifiably reporting, so nothing is hidden if it is off or silent. No action required. - (Extension) New "Saropa Lints: Set Analysis Lane" command (command palette, or the sidebar's Lane row) switches between
lightandfullin-process analysis without hand-editinganalysis_options.yaml. Picking a lane restarts the Dart analysis server so the change takes effect immediately.
Maintenance
- Widened the
rule_countCLI's extension-side timeout from 10s to 25s — a colddart runinvocation measured at 8.4s, leaving too little margin under the old cap on a slower first run. - Fixed the pre-commit hook's dart-fix and recommended.yaml gates:
subprocess.run(['dart', ...])silently failed to finddarton Windows (Flutter shipsdart.bat, which Python's subprocess can't resolve withoutshell=True), so both gates had been no-op'ing on every commit. Now resolved viashutil.which('dart').
15.1.2 #
The Upgrade Opportunities panel's AI prompt is more accurate and less noisy: it now surfaces the deprecated APIs a project actually calls, dual-dependency version risk, and possible local reimplementations of library code, while dropping dev-only and transitive dependencies that aren't actionable. The old per-card clipboard copy is replaced by "Write Report" buttons — global (all packages in one file) and per-card (single package) — that save dated files and copy the path. Seven actively-maintained packages were removed from the known-issues database after being incorrectly flagged as end-of-life. log
Added (Extension) #
- (Extension) The Upgrade Opportunities AI prompt now includes deprecated APIs the project actually calls (with call sites), the package's vibrancy score/license/vulnerabilities/known-issue status, and any GitHub issues flagged as breaking or deprecation-related — previously only new-feature changelog bullets were included. No action required.
- (Extension) The Upgrade Opportunities panel no longer lists dev-only or transitive dependencies with zero source imports (e.g.
build_runner), since new features in a package the project never calls are not actionable. No action required. - (Extension) The AI prompt now flags "dual dependency" risk — a direct dependency that is also required transitively through another direct dependency — since a major version bump on either side can diverge type identity for shared exported classes. No action required.
- (Extension) The AI prompt now flags possible local reimplementation — project code (a class, mixin, extension, or function) whose name matches something the dependency's own source already exports — as a candidate for deletion in favor of the library version. No action required.
Changed (Extension) #
- (Extension) The Upgrade Opportunities panel replaces the per-card "Copy for AI" clipboard button with "Write Report" buttons — a global one in the header that writes all packages' prompts to one file, and a per-card one that writes just that package's prompt. Both save a dated markdown file under
reports/and copy the absolute path to the clipboard. No action required. - (Extension) The AI prompt's task instruction now asks two separate questions per feature — does it replace something the project does manually (retrofit), and does it solve a problem the project has never addressed (greenfield) — instead of only "does it fit an existing call site". No action required.
Fixed (Extension) #
- (Extension) Removed 7 stale entries from the Package Dashboard's known-issues database (
timezone,retrofit,sqflite_sqlcipher,intl_translation,window_size,routemaster,flutter_keychain) that flagged actively-maintained packages as end-of-life based on outdated data. No action required.
Maintenance
- Added a pre-publish audit check that cross-checks
known_issues.jsonlifecycle claims (end-of-life/caution/maintenance-mode) against live pub.dev data and warns when a package has since shipped a non-discontinued release contradicting the recorded reason. Non-blocking (network-dependent, 5s per-request timeout); run standalone withpython scripts/check_known_issues_freshness.py. - The pre-publish audit now also regenerates
plans/known_issues_review.mdon every publish run (previously only via manually runningscripts/generate_known_issues_review.py), sharing one pub.dev fetch pass with the freshness check above instead of double-fetching the overlapping entries. - Added unit test coverage for the freshness-check and review-report generator modules, and promoted their shared internals (candidate loading, pub.dev fetch, staleness rule) from private cross-module imports to an explicit shared surface.
- Corrected the advertised rule count from a stale "2100+"/"2134" to the current 2332 (2109 tiered + 223 opt-in stylistic) across the README, extension manifest, and marketing copy.
15.1.1 #
Five new quick fixes for stylistic rules: convert regular comments to doc comments, remove redundant type annotations, replace string + concatenation with adjacent literals, simplify BorderRadius.all(Radius.circular(r)) to BorderRadius.circular(r), and replace sizing-only Container with SizedBox. log
Added #
- Quick fix for
prefer_doc_comments_over_regular: converts//comments to///doc comments with one click. No action required. - Quick fix for
avoid_explicit_type_declaration: removes the redundant type annotation, letting the compiler infer the type. No action required. - Quick fix for
prefer_adjacent_strings: strips+operators between string literals, producing idiomatic adjacent-string syntax. No action required. - Quick fix for
prefer_borderradius_circular: rewritesBorderRadius.all(Radius.circular(r))to the shorterBorderRadius.circular(r). No action required. - Quick fix for
prefer_sizedbox_over_container: replaces sizing-onlyContainerwithSizedBox. No action required.
Maintenance
- Publish script now strips
- Unreleasedsuffix (and typo variants) from versioned CHANGELOG headings at publish time, so## [X.Y.Z] - Unreleasedis cleaned to## [X.Y.Z]before version sync.
15.1.0 #
Breaking: 35 rule names that collided with core Dart/Flutter lint names are renamed with semantic suffixes (e.g. prefer_single_quotes → prefer_single_quotes_strict); 3 duplicates with no behavioral difference are removed. Old names are deprecated aliases for one release cycle. Use --fix-ignores to migrate downstream projects. log
require_ignore_comment_plugin_prefix now validates prefixed ignore comments against the rule registry. Four false-positive fixes across gradient-in-build, dartdoc cross-refs, cyclomatic-complexity flat switches, and large-objects-in-state recomputed caches.
Fixed #
avoid_gradient_in_buildno longer flags gradients insideAnimatedBuilder.builder,TweenAnimationBuilder.builder,ListenableBuilder.builder, orValueListenableBuilder.builderclosures, where the gradient intentionally varies every animation frame. Also exempts gradients in anybuilder:closure when the gradient's arguments reference a closure-unique parameter (e.g. a tween value), making the gate work for custom animation builders too. No action required.verify_documented_parameters_existno longer flags valid dartdoc cross-references to methods, functions, or getters as stale parameter names. No action required.require_ignore_comment_plugin_prefixnow validates the suffix of already-prefixed ignore comments against the rule registry. A prefixed name that doesn't match any registered rule (typo, renamed rule, or fabricated name) now produces a diagnostic with a "did you mean?" suggestion and a quick fix to auto-replace the typo. No action required.avoid_high_cyclomatic_complexityno longer flags flat switch dispatch tables where every case is a single return, break, or expression with no nested branching — these are enum-to-value lookups with mechanical complexity, not logical branching. No action required.avoid_large_objects_in_stateno longer flags collection fields that are reassigned wholesale in method bodies without accumulating mutations. Accumulation detection now uses element-resolved field matching (immune to shadowed locals), per-variable tracking for multi-variable declarations, constructor initializer list walking, and treats??=as a conditional reassignment instead of growth. No action required.
Maintenance
- Consolidated animation-builder widget name sets into
kAnimatedRebuildersincompound_performance_patterns.dart, used by both compound-performance rules andavoid_gradient_in_build. - Publish audit now blocks on core Dart lint name collisions (Check 8 in tier integrity), auto-updated from dart-lang/linter via
python scripts/update_core_lint_names.py. - Publish pipeline steps now prompt Retry / Ignore / Abort on failure instead of hard-exiting, so the developer can fix issues in another terminal without losing the publish session. Irreversible steps (git push, tag, pub.dev publish, GitHub release) only offer Retry / Abort.
- Removed unused
tiers.dartimport from formatting rules. - MT cache serialization (
mt_fallback.py) now streams entries to disk one-by-one instead of building the full JSON string in memory, fixing aMemoryErrorcrash on large caches.
Added (Extension) #
- Diagnostics sidebar section — four severity toggles (
saropaLints.severity.error,.warning,.info,.hint) plus the Lint integration, Analyzer plugin, and Tier controls (moved from Settings). Each severity has a colored icon (red/yellow/blue/green), requires double-click to toggle (preventing accidental flips), and shows an inline eye button on hover as a single-click fallback. No action required.
Changed #
- Breaking: 35 rules renamed with semantic suffixes to resolve name collisions with core Dart/Flutter lints. Update
analysis_options.yamland// ignore:comments to use the new names (e.g.prefer_single_quotes→prefer_single_quotes_strict). Old names remain as deprecated aliases for one release cycle.
Removed #
- Breaking:
avoid_private_typedef_functions,missing_code_block_language_in_doc_comment, andprefer_initializing_formalsremoved — identical to core Dart lints with no behavioral difference. Use the core Dart lint instead; no action required if already enabled.
15.0.4 #
Switching Lint integration on is now near-instant instead of a two-minute wait that looked like a freeze. Every command the extension shells out to a Dart tool for now uses the Dart executable directly rather than routing through Flutter, and the dependency resolve is skipped altogether when nothing needs resolving. log
Fixed (Extension) #
- Turning Lint integration on took around two minutes on a Flutter project and looked frozen, so it got canceled and the project seemed impossible to re-enable. The extension now runs
dartrather thanflutterforpub getandanalyze— the same work without the Flutter tool's startup cost, measured at 1.9 s versus 116 s on the same project — and skipspub getentirely whenpubspec.yamlis unchanged and the package is already resolved. No action required. - Upgrading the saropa_lints version from the extension paid the same two-minute Flutter startup cost on every upgrade. It now uses the same fast path, falling back to Flutter only when the resolve genuinely fails on the Flutter SDK. No action required.
Maintenance
- (Extension) Every command the extension shells out to is now timed into the extension report and output channel, so a slowness report carries its own measurements instead of needing a stopwatch. No action required.
15.0.3 #
The scan CLI now lets users filter diagnostics by severity, so AI agents and CI pipelines can suppress info-level noise and focus on warnings and errors. The extension also stops losing the in-editor analyzer plugin when Lint integration is switched off and back on, and now reports that plugin's real state instead of implying it from a setting that does not control it. log
Added #
--min-severityflag for thescancommand filters diagnostics by severity threshold —--min-severity warningexcludes info-level output from both stdout and the report file, reducing noise for AI agents and CI pipelines. No action required.--max-severityflag for thescancommand caps output at a severity ceiling —--max-severity warninghides errors so you can triage lower-priority noise in isolation. No action required.
Added (Extension) #
- When Lint integration and the analyzer plugin disagree in a way you probably did not intend — scan-on-save on with in-editor diagnostics silently off, or the multi-gigabyte plugin still loading while lints read as off — the extension now offers once to reconcile it either way. Answer or dismiss it and it does not ask again for that project.
Fixed (Extension) #
- Clicking a finding in the Problems panel now highlights the full diagnostic span instead of a single character — eliminates the "highlight every matching letter" noise caused by VS Code's occurrence-highlight when the range was only one character wide. No action required.
- Turning Lint integration off and then on again left the in-editor analyzer plugin switched off — the off step comments out the
plugins:block inanalysis_options.yaml, and the on step never put it back, so a project silently lost live diagnostics with no indication of why. Enable now restores the block when it was this extension's own Off that commented it out, leaving new projects (which default to the lighter scan-on-save delivery) untouched. This has proven to be tricky! - The sidebar now reports the analyzer plugin's actual on-disk state as its own row, so "Lint integration: On" can no longer sit above a project whose
plugins:block is commented out — clicking that row while it reads Off restores the plugin. No action required. - The record of which side switched the analyzer plugin off is now stored twice, so a VS Code profile switch or extension-storage reset can no longer make Enable silently stop restoring the plugin. No action required.
- The analyzer plugin row and its restore logic now track every folder in a multi-root window and start working in a window that had no folder open at startup, instead of only the one folder present when the extension activated. No action required.
- Changing the tier froze the whole window until the config rewrite finished, behind a notification that showed one static title and no Cancel button — on a large project that is indistinguishable from a hang. The tier change now runs in the background with a live elapsed-time counter and a working Cancel, joins a second invocation to the one already running instead of racing on the same file, and restores the previous tier setting if the change does not complete. No action required.
Maintenance
- (Extension) Added explicit
"types"field to bothtsconfig.jsonandtsconfig.test.jsonso the TypeScript compiler reliably resolves Node.js globals and test framework types instead of relying on auto-discovery. No action required. - (Extension) Added
verify-tsconfig-typesbuild gate that validates both tsconfig files duringprecompile— fails when an imported@types/*package is missing from either config's"types"array. No action required. - (Extension) Pinned Filipino translation of "Analyzer plugin" in the curated dictionary so the MT pipeline stops overwriting it with untranslated English on every run. No action required.
- (Extension) The i18n pipeline now warns at the start of every run when a curated dictionary key no longer matches any English source string — catches silent regressions where a renamed en.json string causes the dictionary entry to stop matching and MT takes over. Pass
--fail-on-driftto hard-gate (added to publish pipeline). No action required. - (Extension) Fixed 9 orphaned curated dictionary keys across nl, fr, ur, bn, fil, and he — stale from prior en.json renames ("Search Packages" → "Search packages", "Open Lints Config" → "Manage Rule Packs"). No action required.
- Added fixture coverage for
avoid_positioned_outside_stack— covers the Positioned-in-list-passed-to-custom-widget false positive that was already fixed in v4.13.0 but had no test. No action required.
15.0.2 #
This release focuses on improving the reliability and user experience of the extension's setup workflows. Progress notifications now provide real-time feedback during lengthy operations to clearly communicate the current status. Safeguards have also been introduced to prevent duplicate, conflicting tasks from executing concurrently if a command is triggered multiple times. log
Fixed (Extension) #
- The "Enabling Saropa Lints" progress notification stayed on a single static title for the entire
pub getstep, which can take over a minute on projects with many plugins — with nothing on screen to distinguish "still working" from "stuck," clicking Cancel (or clicking "Enable" again) mid-run was a reasonable reaction. The notification now shows which step is running and a live elapsed-time counter (e.g. "Running pub get… (45s)"). No action required. - Clicking "Enable" again while an enable flow was already running started a second, fully concurrent flow — both writing
pubspec.yaml/analysis_options.yamland shelling out topub get/write_configat the same time — instead of joining the one already in progress, which could stack duplicate progress notifications and race on the same files. A second call now joins the in-flight run instead of starting a new one. The same fix applies to "Create Baseline" (saropa_baseline.json), which had the same gap. No action required.
15.0.1 #
Version 15.0.1 improves the editor extension's responsiveness and resolves a file-parsing bug that prevented the plugin from re-enabling. The setup flow now executes asynchronously to prevent UI freezes, while deactivated lint configurations generate significantly smaller files by omitting unused inline documentation. log
Fixed (Extension) #
- A project whose
plugins:block is written commented-out (new projects, or one where "Turn Off Lint Integration" was used) no longer gets the full per-rule description dump on every regenerate — the disabled block now keeps only therule_name: true/falselines needed to restore the exact configured tier, dropping the multi-hundred-line prose and box-drawing headers that served no purpose while inert. A live (uncommented) block is unaffected and keeps its full inline documentation. No action required; re-rundart run saropa_lints:initor trigger a config write to see the smaller file. - "Enabling Saropa Lints" could appear to hang forever on larger projects — the enable flow ran
pub get, config write, and analysis synchronously, freezing the whole editor for as long as those took instead of just showing progress. The flow now runs them without blocking the UI and can be canceled from the progress notification. Canceling during the final analysis step also no longer silently reports "Enable" as successful — it now stops and logs the cancellation instead of turning the plugin on as if the flow had completed. No action required. - "Re-enable Plugin" could report "nothing to restore" on a project whose
analysis_options.yamlmixed CRLF and plain-LF line endings, even though the disabledplugins:block was plainly present — line detection now tolerates mixed endings instead of assuming one for the whole file. No action required.
15.0.0 #
Version 15.0.0 adds new quick fixes for error logging and variable placement while introducing a persistent background daemon for significantly faster IDE save-scans. This release resolves false positives across exception handling, lifecycle timers, static method detection, and platform target checks. Project tier management is now unified directly through project configuration, reducing default editor memory overhead. log
Added #
require_error_loggingnow offers a quick fix: applying it inserts adebugPrintcall logging the caught error (interpolating the captured exception variable when one exists, or naming the statically-known exception type when it does not) instead of only reporting the missing log call.move_variable_closer_to_its_usagenow offers a quick fix: applying it moves the flagged declaration down to just before its first use. The fix only activates when doing so is provably safe (a single-variable declaration whose initializer shares no identifier with any statement it would move past) and otherwise leaves the diagnostic for manual review, so no action is required beyond reviewing the proposed edit before applying it.
Fixed #
avoid_catching_generic_exceptionno longer flagson Object/on Exception/dynamiccatch clauses whose body forwards the caught error to a logging or crash-reporting call (or rethrows it) before falling back — this is a deliberate pattern for also catchingErrorsubtypes and reporting them, not a swallowed exception. Untypedcatch (e)is unaffected. (plans/history/2026.08/2026.08.15/avoid_catching_generic_exception_false_positive_logged_broad_catch.md)require_error_boundaryno longer flags aMaterialApp/CupertinoAppbuilt insidemain()'s owncatchclause when that clause already logged the caught error and itstrybody attemptedrunApp(...)— that's the app's crash-recovery fallback screen, not its normal entry point, and demanding it also carry an error-boundarybuilder:is recursive. The same shape outsidemain(), without logging, or without anrunAppattempt in thetrybody still requires abuilder:as before. (plans/history/2026.08/2026.08.15/require_error_boundary_false_positive_fallback_ui_inside_catch.md)require_error_loggingno longer flags acatch/on Typeclause with no captured exception variable if its body still calls a recognized logging function — a static message likeon TimeoutException { debug('timed out'); }is a complete log entry even without touching the exception object. A clause with no captured variable and no logging call is still flagged, as before. (plans/history/2026.08/2026.08.15/require_error_logging_false_positive_unparamed_catch_with_logged_body.md)require_app_lifecycle_handling,avoid_work_in_paused_state, andrequire_lifecycle_observerno longer flag aTimer/Stream.periodic/.listen()subscription that is created and canceled/closed within the sameStateclass's owninitState/dispose()pair — that's Flutter's standard cleanup contract for a foreground-only ticker that doesn't need to pause on backgrounding, since it stops existing when the widget is disposed. A class whosedispose()does not cancel the field it created, or that assigns the Timer/subscription somewhere dispose() can't prove cleanup for, is still flagged, as before. (plans/history/2026.08/2026.08.15/require_app_lifecycle_handling_false_positive_dispose_cancels_timer.md)require_ios_deployment_target_consistencyno longer flagsimport 'dart:async'(or any other import/export URI) as Swiftasync/awaitusage — the rule now skips string literals inside import/export directives before checking them against its tracked iOS 15+ API names. A genuine API name appearing elsewhere in the file is still flagged, as before. The same import/export-URI substring-match false positive was also fixed inrequire_ios_live_activities_setup(triggered byimport 'package:live_activities/...') andrequire_ios_certificate_pinning(triggered by package import paths containing segments like/auth). (plans/history/2026.08/2026.08.15/require_ios_deployment_target_consistency_false_positive_import_uri_misattribution.md)prefer_static_methodno longer flags methods that read instance fields or call instance methods via bare (unprefixed) identifiers — the idiomatic Dart style used throughout most codebases. Previously the rule only recognized an explicitthis.prefix, so any method touching instance state through a bare identifier (including inside a nested closure) was misdiagnosed as "could be static." A method that truly uses no instance state anywhere is still flagged, as before. (plans/history/2026.08/2026.08.15/prefer_static_method_false_positive_implicit_field_access.md)move_variable_closer_to_its_usageno longer flags a deliberate "load N values, then consume all N in the same order" batch shape (e.g. five sequentialawait-loads followed by five field assignments) — a sibling declaration in the same contiguous run that is itself genuinely used elsewhere, or the first-use site of another such sibling, no longer counts toward the "unrelated intervening statements" distance. A genuinely far-apart single declaration, declarations used out of matching order, or unused padding declarations sitting next to a real one, are all still flagged, as before. (plans/history/2026.08/2026.08.15/move_variable_closer_to_its_usage_false_positive_batch_declaration_grouping.md)require_firebase_app_check_productionandrequire_firebase_app_checkno longer flagFirebase.initializeApp()whenFirebaseAppCheck/AppCheckactivation is deferred to a separate, actually-called function elsewhere in the same file — a common pattern for keeping a slow/flaky Play Integrity check off the startup path. A file where App Check is only mentioned in a comment, or where the activating function exists but is never called from anywhere, is still flagged, as before. (plans/history/2026.08/2026.08.15/require_firebase_app_check_production_false_positive_activation_in_separate_function.md)require_log_level_for_productionno longer flags a bare verbose-log call (e.g.debug(...)) when the called function's own log-level parameter (level,logLevel,severity, orverbosity) already defaults to a safe value — demanding an explicitlevel:argument in that case would be a no-op. A callee whose default is itself verbose, unrecognized (numeric or constructor-call), or unresolvable, is still flagged, as before. (plans/history/2026.08/2026.08.15/require_log_level_for_production_false_positive_default_level_param.md)
Changed (Extension) #
- Saving a Dart file now scans it in an external process and shows findings as squiggles and Problems panel entries — no separate setting to find or enable, this is what
saropaLints.enablednow does. Turning that toggle off stops save scans and shuts the scanner down immediately, rather than leaving stale findings in the Problems panel.saropaLints.scanOnSave.resolveTypes(default on) controls whether scans fully resolve types so type-based rules fire; turn it off only if save latency matters more than catching those rules. - Type-resolved save scans run through a persistent
scan_daemonprocess that builds the analyzer's project context once and keeps it warm, so a save is checked in a few seconds instead of re-paying a roughly one-minute analyzer warmup on every save. The status bar shows a warming message while the first scan after opening is still resolving; the daemon restarts automatically (with backoff) if it stops. Measured memory is comparable to the in-process analyzer plugin — the daemon's advantage is living outside the editor's own process, not a smaller footprint. - New projects (
dart run saropa_lints:initor the extension's Enable) no longer get a live in-process analyzer plugin — theplugins:block is written commented out by default, since it can hold several GB of resolved analysis state on large projects for no benefit over the scan-on-save daemon above. A project that already had the plugin running, or had it explicitly turned off, keeps that state through tier changes and re-enabling; uncomment the block inanalysis_options.yamlto opt back in to live in-editor squiggles, or run the new "Saropa Lints: Re-enable In-Process Plugin" command to do it in one step (it also restarts the Dart analysis server so the plugin reloads immediately). - New command "Saropa Lints: Scan Whole Project for Issues" runs a cancelable whole-project scan so files you haven't saved this session still show up in the Problems panel — save-triggered scanning alone only checks a file once you save it. It streams results in chunks as it goes and can be canceled mid-scan from the progress notification; run it from the Command Palette when you want full coverage, not automatically on open (a full pass on a large project can take tens of minutes).
- A save-triggered scan of a single file no longer prints a misleading progress bar estimating its position against the whole project (e.g. "Files: 1/4477, ETA: 2h"). That estimate now only appears during the long-lived in-editor plugin session it was designed for; one-shot scans (save-triggered daemon,
scanCLI) show a plain file count instead. analysis_options.yamlis now the single source of truth for a project's lint tier. Save-triggered scans, the whole-project baseline scan, and the tier picker's "current tier" display now read the tier straight fromanalysis_options.yamlinstead of trusting the (possibly stale)saropaLints.tiersetting, so a hand-edited or regenerated config file can no longer silently disagree with what the extension shows or scans with.SAROPA_TIERremains available as a dev-only override but now logs a warning when it disagrees with the project's own config;saropa_tier:inanalysis_options_custom.yamlis deprecated in favor ofanalysis_options.yaml.
Maintenance
- Investigated a
no_magic_stringfalse-positive report (string literal inside a//-commented-outdebugPrintcall) and confirmed by code inspection it cannot occur — the rule and all its gating helpers are AST-callback-only, with no raw-text scanning. Added a resolved-analyzer regression test pinning this behavior. (bugs/no_magic_string_false_positive_commented_out_code.md) - Manually corrected seven German and Swahili extension strings that had shipped corrupted machine-translation output — a mangled literal
--resolveCLI flag, two entries collapsed into a repetition loop (one leaking a fragment resembling a stray prompt artifact), and grammatically broken fallback text — and added each as a curateddictionaries.pyoverride so a future translation run can never regenerate the same corruption from cache.
14.5.9 #
This release adds a rule catching a common button-labeling mistake: cramming extra detail into a button's main text using parentheses instead of the dedicated subtitle line. It also closes the last gap in the "Lint integration off" toggle: the analyzer plugin itself now refuses to enable any rules while the integration is disabled, so no fallback configuration can silently re-enable analysis and its multi-gigabyte memory footprint. log
Added #
- New rule
avoid_parenthesized_button_caption(Comprehensive tier): flagsCommonButton/CommonButtonWaitcalls where thetext:parameter contains parenthesized text that belongs insubtitleText:instead. No action required.
Fixed #
- The analyzer plugin now enables zero rules whenever "Lint integration" is toggled off, even if it gets loaded anyway — previously fallback configuration could re-enable over a thousand rules and hold several GB of analysis-server memory on a project the user had disabled. No action required.
14.5.8 #
Fixed the extension running lint analysis in the background while "Lint integration" was turned off. Disabling the integration now stops every automatic analysis trigger and background suggestion, not just the editor diagnostics. log
Fixed (Extension) #
- Turning off "Lint integration" now also stops analysis triggered by saving files, changing dependencies, changing tier, changing config, and enabling a rule pack, along with the crash-coverage rule suggestion. Previously only in-editor diagnostics were suppressed. No action required.
- Turning off "Lint integration" now restarts the Dart analysis server immediately, so the plugin's background process actually exits instead of continuing to run (and hold onto several GB of memory) until the next manual reload. No action required.
Changed (Extension) #
- The "Run Analysis" toolbar button is hidden while "Lint integration" is off, instead of appearing clickable and doing nothing useful. No action required.
14.5.7 #
Dependency maintenance release — no rule or extension changes. log
Maintenance
- Bumped
js-yaml(extension dev dependency, viamocha) from 4.3.0 to 4.3.1, resolving GHSA-5p4m-2wfm-xmqj.
14.5.6 #
This release introduces a new rule to ensure lint suppression comments work correctly in your IDE. The require_ignore_comment_plugin_prefix rule flags ignore comments referencing saropa_lints rules that lack the required package prefix, preventing suppressions from failing silently. An automated quick fix is included to instantly apply the missing prefix. log
Added #
- New rule
require_ignore_comment_plugin_prefix(Essential tier, WARNING) — flags// ignore: rule_nameand// ignore_for_file: rule_namecomments that reference a saropa_lints rule without the requiredsaropa_lints/prefix, which causes the suppression to silently fail in the IDE. A quick fix inserts the prefix. No action required. dart run saropa_lints scan --fix-ignores— bulk-converts bare// ignore: rule_nameto// ignore: saropa_lints/rule_namefor all known saropa_lints rules acrosslib/,test/, andbin/.
Fixed #
require_ignore_comment_plugin_prefix's quick fix could insert the prefix into the wrong// ignore:comment when another ignore comment sat nearby in the file. It now targets the exact flagged comment. No action required.--fix-ignoresskipped hyphenated rule names (e.g.avoid-null-assertion), leaving them unprefixed. It now converts them correctly. No action required.
14.5.5 #
The Analysis Optimizer now makes changes safely: it surgically updates only the patterns you're modifying while preserving your file structure, comments, and ordering, and backs up your configuration before every write for easy manual recovery. The dashboard excludes redundant recommendations when patterns are already covered and automatically rescans to keep the status current. log
Fixed (Extension) #
- Analysis Optimizer could silently destroy hand-curated
analysis_options.yamlstructure — every Apply/Remove/Fix Syntax action rebuilt the entireexclude:block from scratch, discarding section-header comments and blank-line grouping (which aren't attached to any single pattern) and re-sorting every entry alphabetically. Writes are now surgical: only the lines for patterns actually being added or removed are touched, and every other line — comments, spacing, order — is left exactly as it was. No action required. - Folder exclusion recommendations kept showing as "Recommended" even when already covered by a broader applied pattern (e.g. individual
dependency_overrides/<package>/**entries never matched as "Applied" despite adependency_overrides/**already excluding them). These redundant recommendations no longer appear. No action required. - The dashboard now automatically scans on open and rescans after every Apply/Remove/Fix Syntax, instead of requiring a manual "Scan Workspace" click to see current status. No action required.
Added (Extension) #
- Every Analysis Optimizer write now saves a one-step-back copy of
analysis_options.yamltoanalysis_options.yaml.bakfirst, so a change can always be manually reverted. No action required.
14.5.4 #
This release fixes the Analysis Optimizer's exclusion detection, which previously missed patterns already present in analysis_options.yaml and duplicated them on apply. The dashboard's two separate exclusion lists are now one sortable table with clearer status and impact indicators, plus a quick line preview before applying. log
Fixed (Extension) #
- Analysis Optimizer could write invalid YAML that broke Dart analysis entirely — an unquoted exclude pattern starting with
**(routine for Dart globs) is YAML alias syntax, not a literal string, and caused a realUndefined aliasparse error the moment the analyzer read the file. Every written pattern is now quoted, and previously-malformed unquoted entries are automatically re-quoted the next time any change is applied through the dashboard. No action required. - Analysis Optimizer failed to detect existing exclusions — patterns with an inline
# commentor a stray trailing quote (- **/*.g.dart" # ...) were never recognized as already excluded, so the dashboard kept recommending them and applying created a duplicate line. The reader now strips comments and malformed quoting before comparing, and the writer preserves each pattern's original comment on write. No action required. - Analysis Optimizer's "Current exclusions" and "Recommended exclusions" are now one deduplicated "Exclusions" table, with an Applied/Recommended status column, sortable columns, and the chosen sort order preserved across Apply/Remove actions. No action required.
- An already-applied Analysis Optimizer exclusion that matches zero scanned Dart files (e.g. a non-Dart tool reference) now shows a dash and an explanatory reason instead of a misleading "0". No action required.
Added (Extension) #
- Each Analysis Optimizer recommendation now has a "Preview" toggle showing the approximate line that would be added to
analysis_options.yaml, without leaving the table. No action required. - Analysis Optimizer now proactively warns when
analysis_options.yamlalready has invalid exclude syntax and offers a one-click "Fix Syntax" that re-quotes every entry, so a broken file can be repaired without needing to apply or remove a specific pattern first. No action required.
14.5.3 #
This release fixes a test-suite timeout in the health-history archival path and completes Filipino and Dutch translation coverage across the extension UI. No action required. log
Fixed #
loadHealthHistorytest timeout — complexity parsing every Dart file across archived tags exceeded the 2-minute test budget. The function now accepts an optionalwithComplexityparameter (defaultstrue; test passesfalse).
Maintenance
loadHealthHistorynow caches each tag's computedHistoryPointon disk (.dart_tool/saropa_lints/health_history_cache.json), keyed by the tag's resolved commit SHA. Repeat calls against unchanged tags skip re-archiving and re-scanning entirely.- Fill
fil/nlextension i18n coverage gaps forDefault,Pattern,Medium, andOpen analysis_options.yaml.Patternis kept as the English loanword already used in the sibling{count} file pattern(s)string;Open analysis_options.yamluses verb-final Dutch order to match the existingpubspec.yaml openensibling.
14.5.2 #
This release introduces the Analysis Optimizer to help developers proactively manage their Dart analyzer's resource footprint. The extension now identifies memory-intensive files and provides an interactive dashboard for safely previewing and applying workspace exclusion patterns. By intelligently filtering out generated code and high-cost directories, users can easily maintain editor performance and swiftly resolve critical memory warnings. log
Added (Extension) #
- Analysis Optimizer — new dashboard (sidebar, command palette, or memory warning toast) that scans the workspace, identifies high-cost files and folders, and recommends
analyzer: exclude:patterns to reduce Dart analyzer memory usage. Applying a pattern opens a diff preview of the resultinganalysis_options.yamlbefore writing; multi-pattern applies require confirmation. Generated code patterns (*.g.dart,*.freezed.dart, etc.) are recommended by default. No action required. - The critical-memory toast now includes an "Optimize Analysis" button alongside "Clean Up" to surface the optimizer when the analyzer is consuming excessive memory.
14.5.1 #
This release introduces a new balanced memory mode to drastically reduce RAM consumption during incremental analysis, alongside a Full Opportunities Report designed specifically for AI-driven dependency reviews. It also refines localization workflows by eliminating false-positive translation warnings on placeholder-only templates. Developers will experience a significantly lighter background footprint on large projects and gain deeper, exportable insights into their codebase's dependency utilization. log
Added #
- Full Opportunities Report — a new export (sidebar, or
Saropa Lints: Export Full Opportunities Report) that consolidates every dependency and every changelog feature into one HTML, Markdown, and JSON report underreports/. Unlike the Upgrade Opportunities panel, it keeps fully-adopted packages and every changelog category, and counts each feature's usage from zero upward with the exact project file and line of every reference. Built to hand to an AI for a dependency-usage review. - Balanced memory mode — new
memory_mode: balancedsetting (default) that skips type-heavy rules on unchanged files during incremental analysis, reducing CPU work on re-analysis passes. When a dependency changes, all transitive importers are automatically re-analyzed via import-graph invalidation. Setmemory_mode: fullinanalysis_options_custom.yamlorSAROPA_MEMORY_MODE=fullto restore previous behavior. No action required.
Maintenance
- Moved
.vsixoutput fromextension/to the project root for easier access after packaging. - Translation skip logic now recognizes placeholder-only templates (
{category} ({count})) as untranslatable, eliminating 48 false-positive missing-translation reports. - Pinned the opportunities report's symbol matcher against the implementation it replaced with a differential test, which found that the previous matcher silently never counted
$-prefixed identifiers. - Added a headless-DOM test harness (
jsdom) that executes the opportunities report's inline script, so its filter, mode toggles, expand/collapse, and column sort are verified to work rather than merely to be present. - Marked 68 rule files as type-resolution-heavy (
usesTypeResolution) to support balanced memory mode filtering.
14.5.0 #
This release introduces comprehensive system health monitoring to track memory usage and safely terminate orphaned background processes. It also resolves severe memory retention issues during analysis of large codebases and refines localization workflows by preventing false-positive translation warnings. Developers will experience a significantly more stable and responsive environment with highly accurate diagnostic results during extended coding sessions. log
Added #
- System health monitor in the VS Code extension: polls Dart/Flutter process memory and orphaned daemon count every 60 seconds (Windows). Status bar shows a warning or critical suffix when memory exceeds configurable thresholds or orphaned daemons accumulate. One-click "Kill Orphaned Flutter Daemons" command re-queries live processes before killing, avoiding stale-PID risks. All thresholds configurable via extension settings under "System Health".
- Process Health panel (Command Palette → "Process Health"): live table of all Dart/Flutter processes with PID, parent, RSS, type classification (process/daemon/orphan), and per-process kill buttons for orphaned daemons.
Fixed #
- Register 25+ internal caches for eviction under memory pressure — previously only 10 of ~70 were managed, causing unbounded memory growth on large projects (7.8 GB observed on a 3,900-file codebase). No action required.
- Fix memory estimator to measure actual per-file cache sizes instead of flat approximations that understated real usage by ~25×. No action required.
- Cap the per-file passed-rules cache with LRU eviction (default 500 files) — the single largest memory consumer at O(files × rules), previously unbounded. No action required.
- Cap the per-file diff cache with LRU eviction (default 250 files) — retained full source text of every analyzed file (~19.5 MB on a 3,900-file project), now bounded. No action required.
- Release per-file tracking maps after the analysis summary is reported — previously retained indefinitely, wasting memory for the rest of the session. No action required.
- Fix VS Code integrated terminal color detection on Windows — ANSI escape sequences now render correctly when
TERM_PROGRAMis set. No action required.
Maintenance
- Add infrastructure bug report for orphaned
flutter daemonprocesses accumulating on Windows and exhausting system RAM. Includes hardened cleanup scripts with PID-reuse detection, a scheduled task to break the OOM feedback loop, and a Win32 Job Object permanent fix concept. - Add
PID,RSS,Daemonto MT do-not-translate list and expand skip logic for emoji+placeholder patterns (⚠ {size},🔴 {size}), resolving 71 false-positive missing-translation entries across 24 locales. No action required.
Historical Changelog Archive #
Looking for older changes? See CHANGELOG_ARCHIVE.md for older versions.