saropa_lints 15.2.12
saropa_lints: ^15.2.12 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.12 #
Hardens the LSP server against normal editor traffic and adds a doctor command to catch misconfigured project settings before they cause confusing warnings. log
Fixed #
- LSP server handles all standard notifications without crashing. Added explicit no-op cases for
textDocument/didChange,$/cancelRequest,$/setTrace, andworkspace/didChangeConfigurationso the inert server stays alive under normal VS Code traffic. Two-level logging surfaces server activity in the Output channel: lifecycle events always log, high-frequency messages (didChange, codeAction) are suppressed unless$/setTraceis set toverbose. No action required.
Added #
- New
doctorcommand scans consumer project configuration for misplaced keys, missing custom file, and other issues that produce SDK warnings. Rundart run saropa_lints doctor [directory]. --traceflag for LSP server enables verbose logging from startup without waiting for the editor to send$/setTrace. Useful for standalone debugging:dart run saropa_lints:lsp_server --trace.
Maintenance
- Pre-commit hook now auto-regenerates category map and migration pack codes when rule files, tier definitions, or migration guides change — eliminates the recurring CI failures from stale generated indexes.
- Closed
unsupported_optionbug forrule_packsandlog_level— investigation confirmed the fix was already implemented; consumer projects just need to rundart run saropa_lints migrate-config. migrate-confignow removes orphanrule_packs:keys that have noenabled:child, and handles trailing comments on the key line.- Config parser (
_leadingSpaces) now counts tabs as indentation, matching the scalar parser — fixes silent parse failures on tab-indented YAML. doctorcommand now scopes key detection to thesaropa_lints:plugin block — no longer false-positives on identically named top-level keys.- Publish script supports
--log-file,--log-append,--mode,--auto-retry, and--output-levelflags for non-interactive/CI execution. Auto-detects non-TTY stdin. Mode definitions are unified in a single table driving both CLI and interactive menu.
15.2.11 #
Removed Phase 0 fake LSP test diagnostics that shipped in 15.2.10. The standalone LSP server infrastructure remains (off by default) but no longer emits test squiggles. log
Fixed #
- LSP server no longer emits fake test diagnostics. Phase 0 proof-of-concept diagnostics were being published to every open
.dartfile when the LSP server was enabled. No action required — the setting now defaults to off.
Changed #
saropaLints.lspServer.enablednow defaults tofalse. Previously defaulted totrue, which activated the fake LSP server for all users. No action required.
Maintenance
- Regenerated category map and migration pack codes for 18 new rules added in 15.2.10 that were missing from the generated indexes.
15.2.10 #
Known issue: This release shipped
saropaLints.lspServer.enableddefaulting totrue, causing fake test diagnostics to appear in every open.dartfile. Update to 15.2.11 immediately.
Seventeen new lint rules across testing, equality, control flow, constructor style, widget lifecycle, formatting, code quality, documentation, and architecture. Cross-platform SARIF output fix, dead-link hardening for published docs, and orphan-publish recovery for the publish script. log
Fixed #
- Fixed SARIF writer emitting
../C:/project/...URIs on Linux CI — switched fromp.relative()to prefix stripping after forward-slash normalization so Windows-style paths resolve correctly cross-platform. - Fixed broken links in
README.mdanddoc/README.mdto removed guide files (upgrading_to_v7.md,migration_v4_to_v5.md). - Fixed wrong relative path in
using_with_flutter_lints.mdlink to VGA migration guide. - Fixed
always_put_doc_comments_before_annotationsfalse-negative — the old token-walking detection assumeddocumentationComment == nullfor misplaced comments, but the analyzer populates it regardless of position. Replaced with offset comparison against the first annotation.
Added #
- New rule
avoid_focused_tests(Essential) — flagstest()/group()calls withsolo: trueleft in committed code, which silently skips the rest of the suite in CI. - New rule
avoid_exit_outside_entrypoint(Recommended) — flagsexit()calls outside the top-levelmain()function, which kill the process bypassing cleanup andfinallyblocks. - New rule
avoid_labeled_statements(Comprehensive) — flags labeled statements (label: for/while/switch) that force readers to track names across nested blocks instead of reasoning locally. - New rule
avoid_null_checks_in_equality_operators_extended(Recommended) — flags deadother == nullchecks insideoperator ==overrides under sound null safety. Named with_extendedsuffix to avoid collision with the core Dart lint. - New rule
avoid_unnecessary_else_after_control_flow(Recommended) — flagselseblocks afterifbodies that end withreturn,throw,break, orcontinue. - New rule
prefer_initializing_formals_extended(Comprehensive) — flags constructor body assignments that could bethis.paraminitializing formals. Named with_extendedsuffix to avoid collision with the core Dart lint. - New rule
avoid_skipped_tests(Recommended) — flagstest()/group()calls withskip: trueor a skip message left in committed code. - New rule
no_optional_operators_in_tests(Comprehensive) — flags?.and??operators in test files that silently swallow failures. - New rule
avoid_public_members_in_states(Recommended) — flags public fields and methods inStatesubclasses that leak internal state as public API. - New rule
prefer_blank_line_before_break(Stylistic) — requires a blank line beforebreakin multi-statement blocks for visual separation. - New rule
prefer_blank_line_before_continue(Stylistic) — requires a blank line beforecontinuein multi-statement blocks. - New rule
prefer_blank_line_before_throw(Stylistic) — requires a blank line beforethrowstatements in multi-statement blocks. - New rule
avoid_unnecessary_parentheses(Comprehensive) — flags redundant parentheses that don't change evaluation order or precedence. - New rule
always_put_doc_comments_before_annotations(Recommended) — flags///doc comments placed after annotations instead of before, which breaks dartdoc association. - New rule
start_comments_with_space(Pedantic) — flags//commentmissing a space after the slashes. - New rule
constructor_parameters_and_fields_should_have_the_same_order(Comprehensive) — flags constructors where parameter order doesn't match field declaration order. - New rule
todo_with_story_links(Professional) — flags TODO/FIXME comments lacking an issue tracker reference. - New quick fix for
always_put_doc_comments_before_annotations— auto-moves misplaced///doc comments above all annotations with correct indentation. Supports bulk "Fix All" application across files. - New rule
prefer_doc_comment_after_annotations(Stylistic) — inverse ofalways_put_doc_comments_before_annotations, for teams that prefer///doc comments adjacent to the declaration keyword rather than above annotations. Registered as a conflicting pair. Includes quick fix with bulk "Fix All" support.
Maintenance
- Added doc-link validation to
.githooks/pre-commit— broken or excluded-path links in shipped docs are now caught before commit, not just in CI. - Publish script now detects orphaned version bumps from aborted publishes at startup and offers to reset versions, preventing cascading state corruption.
- New publish mode 9) Pub.dev only — runs the full publish pipeline (audit, format, analyze, tests, version, commit, tag, pub.dev publish, GitHub release) but skips all extension packaging and Marketplace/Open VSX publishing. Use when the VSIX was already published separately or when only the Dart package needs a release.
- Fixed
--fail-on errorscan test failing when error-level diagnostics exist in the fixture — test now uses--fail-on-count 9999to decouple exit-code assertion from project error count. - Fixed CI failure:
.pubignorenow excludesdoc/guides/migration_guides/so shipped docs no longer contain dead links to.pubignore-excludedplans/proposals. - Fixed
check_doc_links_excluded_paths.pynot filtering out source docs that are themselves.pubignore-excluded — the script now skips docs under excluded prefixes instead of scanning them for link targets. - New
scripts/fix_ignores.pymigration tool rewrites stale// ignore:comments andanalysis_options.yamlrule names from pre-rename saropa_lints rule names to their current_extended/_strict/_with_fixequivalents. Runpython scripts/fix_ignores.py <dir>(dry run) or--applyto rewrite. - Publish audit now checks
CORE_DART_LINT_NAMESfreshness against the live Dart SDK linter — warns (non-blocking) if the reference set is stale. - New
test/integrity/core_lint_collision_test.dartcatches rule name collisions with core Dart lints duringdart test, not only at publish time.
15.2.9 #
The system health monitor now separates memory used by Saropa Lints from the total across all Dart processes, so users can see the real footprint instead of being blamed for the entire analysis server. The scan daemon auto-suspends under heavy memory pressure to reclaim its analyzer cache, and orphaned scan daemons are now detected and cleaned up alongside Flutter daemons. A new Full Audit command scans a project against every rule regardless of its configured tier and opens the results in a filterable report panel. log
Added #
- New Full Audit command scans a project against every lint rule regardless of the configured tier — choose the whole project, only changed files versus a branch, or a comparison against a saved baseline. Results open in a dedicated report panel with tier/severity/category filters, search, file grouping, and a "Copy JSON" export. Run it from the Explorer context menu ("Saropa: Audit Folder...") or the audit icon in the dashboards sidebar.
- Full Audit supports
--format sariffor SARIF 2.1.0 output, so results can feed GitHub code-scanning annotations directly on a PR diff — particularly useful combined with--since <ref>. - Status bar tooltip now shows Saropa Lints process count and memory separately from the system-wide Dart total — no more blaming the extension for the entire analysis server. No action required.
- Scan daemon auto-suspends when memory-pressure shedding reaches level 2+ (most rules shed), reclaiming the daemon's warm analyzer cache; resumes automatically when pressure drops. No action required.
- Orphaned scan daemon detection — scan daemons left running after a VS Code crash are now identified and included in the Clean Up command alongside Flutter daemons. No action required.
- Health panel marks Saropa Lints processes with a "Saropa" type pill so they are visually distinct from analysis servers and other Dart processes. No action required.
- Standalone LSP server infrastructure (Phase 0) — proves two LSP servers coexist in the same VS Code Problems panel. Bug:
saropaLints.lspServer.enabledshipped defaulting totrue, causing fake test diagnostics to appear in every open.dartfile. Fixed in 15.2.11 — setting now defaults tofalseand test diagnostics have been removed. - Debug Panel sidebar — shows status and toggle controls for all three diagnostic engines (Analyzer Plugin, Scan Daemon, LSP Server) with PID, rule count, RSS, and a live log tail. Bug: Debug panel was enabled by default, which also activated the LSP server toggle. Disable via
saropaLints.debug.enabledif not needed. - Migration packs for 24 alternative lint packages — when a project still depends on an alternative (e.g.
pyramid_lint,solid_lints,dcm), the extension surfaces a "Migrate from …" pack in the Rule Packs dashboard that enables all equivalent saropa rules in one click. No action required.
Fixed #
- Fixed double-unescape vulnerability in pub.dev changelog entity decoder —
&lt;was incorrectly decoded to<instead of the literal<(CodeQL #19, CWE-116). - Fixed case-insensitive script-tag matching in snapshot harness so upper-case
<SCRIPT>tags are normalized correctly (CodeQL #20). - Status bar warning/critical suffix now shows Saropa Lints RSS when available instead of the misleading system-wide total. No action required.
- Fixed 12 rule files (28 rule classes) that accessed
.constructorName.type.elementwithout declaringusesTypeResolution => true— these rules silently produced zero findings in the light analysis lane. The integrity test now detects this access pattern. - Fixed Full Audit showing a confusing second "output could not be read" error after canceling an audit — the forced process-tree kill on cancel could still fire a late completion event with truncated output.
- Fixed Full Audit cancellation silently failing to stop the underlying
dartprocess on macOS/Linux — the audit CLI kept running in the background after the "Audit canceled" toast, because killing the shell process alone (withshell: true) doesn't reach itsdartchild on POSIX. - Fixed Full Audit accumulating a temp file per run for large (>10MB) result sets with no cleanup, and silently swallowing a temp-file write failure instead of warning the user.
- Fixed accuracy report and audit CLI showing most rules as silent — the Problems-tab issue cap (500) was silently dropping diagnostics before they reached the listener. Added
disableIssueCapparameter toScanRunnerso batch CLI tools opt out of the IDE cap at construction, rather than each caller needing to know aboutProgressTracker. - Fixed LSP server failing to spawn on Windows —
dart.batrequiresshell: truefor PATHEXT resolution, matching the convention used by every other dart spawn in the extension. - Fixed fake LSP test diagnostics inflating the real score — changed the diagnostic source to
saropa_lsp_testand added a source filter inliveDiagnosticsModelso status bar, Issues tree, and dashboard ignore them. - Fixed stop/dispose race when toggling the LSP server setting —
dispose()was called beforestop()completed, causing a double-stop. Now awaits stop before dispose. - Wired Kill All / Restart All buttons in the Debug Panel — previously they were rendered but nothing subscribed to the click events.
- Replaced hardcoded English engine names and status words in the Debug Panel with
l10n()calls — added explicitkeyfield toEngineStatusso toggle messages don't depend on locale-sensitive substring matching. - Removed hand-typed rule counts (203, 2140) from the Debug Panel engine status — these drifted as rules were added. The LSP server retains its fixed count of 4 (the actual test diagnostic count).
- Fixed 4 migration packs that had drifted from their source guides:
migrate_dcmwas missing 9 documented rules and carried one typo'd rule name that never matched anything;migrate_dart_code_metrics_presetswas missing 1 rule;migrate_dart_code_linterandmigrate_awesome_lintseach carried rules not backed by any guide row. Enabling these packs previously gave less (or, for the typo, slightly wrong) coverage than the migration guide promised. - Fixed 5 migration guides (
dcm,dart_code_linter,pyramid_lint,mad_lint,solid_lints) that mapped a source rule to a saropa Dart class name (NewlineBeforeReturnRule) or a rule that never existed (avoid_magic_numbers) instead of the real rule codes (prefer_blank_line_before_return,no_magic_number). Every affected migration pack was silently missing that rule's coverage — the phantom code matched nothing. - Fixed
many_lintsmigration pack referencing the removed ruleprefer_returning_shorthandsinstead of its replacementprefer_arrow_functions— the pack was silently missing coverage for that rule.
Maintenance
- Compiled alternative landscape gap analysis (
plans/GAP_ANALYSIS.md) — rule-by-rule audit of 48 Dart/Flutter lint packages against saropa_lints' catalog, with gap themes and per-package detail sections for planning future rule additions. - Hardened dead-package language in migration guides for
accessibility_lint(archived),design_system_lints(defunct since 2022), andflutter_refactor_plugin(source repo 404) — migration is mandatory, not optional. - Added migration packs plan (
plans/MIGRATION_PACKS_PLAN.md) — rule packs that surface saropa equivalents for each alternative package in the extension's Config dashboard. - Added
// LINT_MESSAGE:,// LINT_NOT:, and// LINT_COUNT:fixture marker infrastructure — declarative message validation, false-positive guards, and whole-fixture count assertions for resolved harness tests. auditCLI: fixedRuntimeTierCapsilently capping the rule set — addedbypassTierCapflag onScanRunnerso audit runs every rule regardless of the project's configured tier.auditCLI: fixed tier enrichment bug — was looking upentry['rule']instead ofentry['ruleName'], so tier field was never populated in JSON output.auditCLI: added per-diagnosticcategoryfield to JSON output (derived from rule source file directory), with generated category map and drift-catching unit tests.- Fixed l10n diagnostic param-extraction by replacing the regex with a state-machine parser that handles nested expressions, spread syntax, template literal interpolations, regex literals, and value-expression skipping after explicit keys. Also added comment-aware scanning to prevent false positives from code comments.
- Moved
PACKAGE_VIBRANCY.mdfromplans/guides/to the repo root to match the path the extension's SDK vibrancy table expects; excludedplans/from the pub.dev package (already public on GitHub, this only trims the published tarball); added CI checkscripts/check_doc_links_excluded_paths.pyto catch shipped docs linking into.pubignore-excluded paths (resolves link targets relative to the linking file, reads exclusion prefixes directly from.pubignore, and checks both inline and reference-style Markdown links). Fixed 6 dead links it found acrossREADME.md,doc/troubleshooting.md, anddoc/guides/. - Added GitHub issue form templates (
.github/ISSUE_TEMPLATE/) for bug reports and feature requests, enforcing the structure frombugs/ISSUE_REPORT_GUIDE.mdat filing time. Blank issues disabled. - Moved
rule_packsconfig fromplugins > saropa_lints:block inanalysis_options.yamlto top-level key inanalysis_options_custom.yaml, eliminating the falseunsupported_optionwarning from the Dart SDK's plugin-block validator. Existing configs are read with deprecation fallback; rundart run saropa_lints migrate-configto migrate automatically. - Added
--dry-runflag tomigrate-configCLI — previews what would change without writing files. - Fixed CRLF line-ending handling in
rule_packswrite/migrate paths (Windows files with\r\ncould silently corrupt regex matches). - Filed 336 new-rule and extension proposals (
bugs/proposal_*.md) covering every DCM gap, partial-coverage rule, and all 46 alternative-package migration-guide gaps, each traceable back toplans/GAP_ANALYSIS.mdvia a "Closes gap" line. All migration-guide TODO rows now link to their proposal. - Created 46 migration guides (
doc/guides/migration_guides/) — one per alternative lint package audited in the gap analysis — with rule-mapping tables (HAVE / PARTIAL / TODO) and migration steps. - Added cross-referencing requirement to
bugs/ISSUE_REPORT_GUIDE.md: implementing a proposal that closes a migration-guide gap must flip the corresponding table row from TODO/PARTIAL to HAVE/ENHANCED. - Corrected stale
prefer-containerfalse-gap entry inplans/GAP_ANALYSIS.md— saropa already covers this viaPreferContainerRule. - Closed 11 i18n translation gaps across 8 locales (de, fil, id, it, nl, pl, pt, sw) via curated dictionary entries — cognate passthroughs (
Status:,Debug), manual translations (Panel ng Debug,tulivu), and fixed SwahiliactiveMT garbage. - Added dictionary locale-integrity validator (
_check_dictionary_locale_integrity) — AST-based check that detects entries misrouted to the wrong locale section, with duplicate-key detection and cross-locale diagnostic hints. Runs as a hard gate before translation. - Added unit tests for the Full Audit POSIX process-group kill path (5 cases covering Linux, macOS, fallback, Windows, and no-pid edge cases) and the >10MB deferred-payload temp-file lifecycle (write, cleanup, and fallback behavior) — 11 new tests total.
- Documented the circular-fallback risk when
globalStorageUritemp-file write fails for large audit payloads — the fallback inlines a payload that was too large for inlining, which may stall the webview for 50MB+ results. - Documented GitHub code-scanning CI recipe in
doc/guides/cli.md— example workflow using--sinceand--format sarifwithupload-sarif@v3for inline PR annotations. - Confirmed SARIF
propertiesbag carryingtier/category/baselineStatusis compatible with GitHub code-scanning and VS Code SARIF Viewer per SARIF 2.1.0 §3.8 — added spec-reference comment. - Eliminated redundant JSON.stringify of the full diagnostics array in the audit report render path — the array is now serialized once in
openAuditReportand the same string feeds both the size check and the inline embed. - Added
test/config/rule_packs_migration_guide_sync_test.dart— re-derives each migration pack's expected rule set from its guide's HAVE/ENHANCED table and fails if the pack file drifts from the guide (caught the 4 packs fixed above). rule_pack_migration_codes.dartis now generated, not hand-maintained:tool/generate_migration_pack_codes.dartparses the HAVE/ENHANCED rows out of every migration guide, validates each referenced saropa rule againsttiers.dart, and rewrites the pack file — run it after editing any migration guide instead of hand-syncing the pack'sSet<String>. Shared parsing lives intool/migration_pack_guide_sync.dartso the generator and the drift test can't disagree.- Hardened the migration pack generator's tiers.dart validation to skip comment lines (commented-out rule names were false-passing), added validation for the carried-forward
flutter_skill_lintscode set, and extracted a shared dedup constant so the generator and drift test can't silently disagree on the count. - Hardened migration pack generator further:
extractBlock/extractPackCodesnow use balanced brace counting instead of fragile\n};/\n },string markers;activeQuotedIdentifiersstrips/* */block comments in addition to//lines;.dart_tool/temp directory is created before use; diff output shows per-pack+ added/- removedcodes in both normal and--checkmodes. - l10n diagnostic provider: excluded
l10nParsers.test.tsfrom validation (false positives from dummy keys in test fixtures), added extra-params detection (Hint when code passes params the template doesn't use), added// l10n-ignore-next-linecomment directive for per-call suppression, and added dead-key detection with single and bulk quick-fixes to remove unreferenced en.json keys from all 25 locale files at once.
15.2.8 #
Rule shedding under memory pressure is now cost-aware — expensive rules that drive the most memory consumption are shed first, keeping cheap syntactic rules running longer. The Config Dashboard surfaces which rules are currently shed and why, and the status bar tooltip shows shed category breakdowns. log
Added #
- Config Dashboard now shows a "Shed rules" section when memory pressure is active — lists every temporarily disabled rule grouped by shed category (type-resolving, high-cost, INFO, WARNING) with clickable links to each rule's explanation.
- Shed rules are marked with a "shed" badge inside expanded pack rows so you can see at a glance which rules in a pack are temporarily inactive.
- "Restart analyzer" button in the shed section clears memory pressure by restarting the analysis server — shed rules restore automatically when RSS resets. No action required.
Changed #
- Cost-aware rule shedding: memory pressure now sheds type-resolving and high-cost rules first (level 1), then INFO-severity (level 2), then WARNING-severity (level 3). No action required.
- Status bar tooltip shows shed rule breakdown by category (type-resolving, high-cost, INFO, WARNING) when shedding is active. No action required.
15.2.7 #
Adds graduated rule shedding under memory pressure — the analyzer plugin now progressively disables low-severity rules when RSS approaches its cap, keeping essential rules running. The VS Code extension surfaces shedding state in the status bar and tooltip. Also includes publish script hardening. log
Added #
- Graduated memory-pressure rule shedding (opt-in via
shed_rules: trueinanalysis_options_custom.yaml): shed level 1 disables INFO-severity rules, level 2 adds WARNING-severity rules, essential-tier rules are always protected. Without opt-in, soft-limit warnings still log but no rules are shed. - Memory pressure indicator in the VS Code status bar and tooltip, fed by
memory_state.jsonwritten on shed-level transitions — no polling. - VS Code warning notification when the analyzer hits memory pressure but rule shedding is not enabled — "Enable" writes
shed_rules: truedirectly intoanalysis_options_custom.yaml, "Learn More" opens the docs. Shows once per workspace root per session, with a persistent status-bar indicator so pressure stays visible after dismissing the toast. memory_mode: aggressiveoption inanalysis_options_custom.yaml— applies balanced-mode unchanged-file skipping to the scan daemon and CLI too, reducing daemon RSS on incremental scans at the cost of potentially missing violations in unchanged files whose dependencies changed.
Maintenance
- Publish script: preflight version verification — a visible "PREFLIGHT: VERSION VERIFICATION" step now runs early in the publish pipeline (before badge validation, CI gate, and extension packaging), checking that
pubspec.yamlandextension/package.jsoncarry the correct version. Two additional safety-net gates run later (after staging and before tagging) as a last resort. No action required. - Severity registration at plugin startup maps each rule to a 0-based shed index for the graduated shedding mechanism.
memory_state.jsonstate file written alongsideplugin.logon shed-level transitions for extension consumption.- Periodic memory log line now includes soft limit and shed level.
PluginLogger.logFilePathpublic getter for the memory-state writer.getStats()now includessoftLimitMb,softLimitTripped,shedLevel, andshedRuleCount.- Fixed negative recovery thresholds when the hard RSS limit is below ~366 MB — soft-limit recovery and de-escalation checks now clamp to zero instead of going negative, which would lock shedding on permanently.
- Shed level updates skip the full rule-set rebuild when the level hasn't actually changed.
- Shedding opt-in moved from the env-var-only
SAROPA_LINTS_SHED_RULES=trueto ashed_rules: truekey inanalysis_options_custom.yaml(the env var still works, but is no longer the only way in —dart run saropa_lints:initnow writes a commentedshed_rulesline so the setting is discoverable)._refreshSoftLimitsplit into_tripSoftLimit/_recoverSoftLimit/_refreshEscalationhelpers. Status-bar and tooltip memory-pressure text now share one priority-order function (memoryPressureTooltipLine) instead of two independently maintained decision trees. usesTypeResolutionaudit complete — 180 false claims flipped tofalseacross 9 rule files, freeing those rules from unnecessary scan-daemon routing. Integrity test unskipped and now guards both directions (missing flag + false claim). Test regex extended withformalParametersto catch modern element-model resolution APIs.- Full Audit i18n — added all 50 missing
audit.*keys toen.json(scope picker, progress, errors, and report webview) plus 3 missingfindingsDash.script.*accessibility keys, and localized the inline progress-bar message. No action required. check_l10n_keys.py— new CI script cross-references everyl10n()call inextension/src/againsten.json, with--check-paramsto validate interpolation tokens match between call sites and catalog values. Handles template-literal${}interpolations, spread properties, and dynamic-key prefixes. No action required.- Live l10n diagnostics — new
saropa-l10ndiagnostic provider shows inline warnings for missingen.jsonkeys and param mismatches on save. Re-validates whenen.jsonchanges. No action required. check_l10n_keys.pyparam checker hardened — fixed false positives: consecutive shorthand properties ({ a, b }) were missed due to trailing-delimiter consumption; template-literal interpolations (${suffix}) were misidentified as extra params; plural keys (*One/*Other) with{count}are now skipped sincepluralize()handles substitution. No action required.usesTypeResolutionfalse flips fixed — 8 rules across 4 files (stylistic_rules.dart,ui_ux_rules.dart,widget_lifecycle_rules.dart,widget_patterns_ux_rules.dart) were incorrectly set tousesTypeResolution: falsedespite usingNamedType.elementfor superclass resolution; integrity test regex now catches.superclass.element. No action required.- Reports-dir single source of truth — extracted
REPORTS_DIRandSAROPA_LINTS_DATA_DIRconstants plus path-builder helpers intoreportsPaths.ts, replacing 27 hardcoded'reports'/'.saropa_lints'string literals across 18 production files. No action required. - Config loader deduplication — extracted
_resolveEnvThenYamlshared helper inconfig_loader.dart, replacing duplicated env-var-then-yaml lookup logic in_loadShedRulesConfigand_loadMemoryMode. No action required. - Scan-loop RSS guard — the scan CLI now samples RSS between files and stops early (returning partial results) when memory exceeds the configured hard limit, preventing OOM on very large codebases. No action required.
- CodeQL security fixes (13 alerts) — added
permissions: contents: readto 2 workflow YAMLs; fixed incomplete Markdown escaping in issue-tree tooltips; replaced substring URL check with parsed-hostnameisGitHubUrl(); hardened pub.dev changelog HTML-to-markdown against tag-stripping bypasses and double-unescaping. No action required. - Shared
markdownUtils.ts— extractedescapeMarkdown()and addedbuildMarkdownString()structured builder for safe MarkdownString construction with mixed trusted/untrusted segments. Applied defense-in-depth escaping to hover-provider for external metadata (package names, vulnerability advisories, issue titles, file paths). No action required.
15.2.6 #
Restores the Full Audit sidebar button and fixes require_ignore_comment_plugin_prefix showing the wrong diagnostic message when an ignore comment uses saropa_lints/ prefix with an unregistered rule name. No new rules or breaking changes. log
Fixed #
- Full Audit sidebar button — the "Full Audit" entry was missing from the extension sidebar despite being documented in 15.2.5. Now appears between Findings Dashboard and Command Catalog with a shield icon, plus a title-bar shortcut icon in the Editor Dashboards view header (visible only in Dart projects).
require_ignore_comment_plugin_prefixwrong message for unknown prefixed rule —// ignore: saropa_lints/nonexistent_ruleshowed the "add prefix" message instead of the "not a registered rule" message. The reporter always readsdiagnosticCodeand ignores per-diagnosticLintCodeoverrides; fixed by temporarily swappingdiagnosticCodeduring the unknown-prefix report.- Tier-change toast count mismatch with Findings Dashboard — changing tier showed a toast with a violation count from the stale
violations.jsonfile while the dashboard read live diagnostics (often empty during re-analysis), producing "toast says N, dashboard shows 0". The toast now defers until the first diagnostics refresh settles, so both surfaces show the same count. The dashboard shows a "Re-analyzing..." progress indicator during the gap. A 15-second safety fallback fires if the analysis server never produces results.
Maintenance
generate_translations.pyauto-commits — the translation wrapper script now auto-detects every file the pipeline touches (no hardcoded path list) and commits them after a successful run. Pre-staged files are left untouched. Null-delimited git output handles unusual filenames. SIGINT is restored before git calls so Ctrl+C can abort a stuck commit. Pass--no-committo skip the auto-commit for CI or review workflows.
15.2.5 #
This patch moves log_level, lane, and memory_mode configuration from the plugins > saropa_lints: block in analysis_options.yaml to top-level keys in analysis_options_custom.yaml, eliminating false unsupported_option warnings from the Dart SDK's plugin-block validator. Projects using the old location get a deprecation warning and automatic fallback — the keys still work from the plugin block, but moving them to the custom file silences the warnings. log
Added #
- Full Audit CLI —
dart run saropa_lints audit <dir>runs every rule (pedantic + stylistic) against a codebase regardless of the project's configured tier. Produces enriched JSON with per-diagnostictierandcategoryfields. Supports--since <ref>to audit only changed files,--min-severity/--min-impactpost-filters,--profiletiming, and--exclude-globs/--include-globs. - Full Audit sidebar button — new "Full Audit" entry in the extension sidebar launches the audit with a scope quick-pick (full project, changed vs main, or pick a branch) and opens a filterable report webview with search, tier/severity/impact filter chips, sortable columns, and JSON export. The progress notification shows real-time percentage, file count, issue count, and current filename.
- Audit report keyboard navigation — use ↑/↓ arrow keys to move between rows and Enter to open the file at that diagnostic. A "no matches" state now appears when filters exclude all results.
- Audit baseline diffing —
--save-baselinesaves the current audit as a project baseline at.saropa/audit_baseline.json;--baselinecompares against the saved baseline and tags each diagnostic as new or unchanged. The sidebar quick-pick shows a "Compare to baseline" option when a baseline exists, and the report webview has a "Save as baseline" button and new/unchanged filter chips. - Migrate Config —
dart run saropa_lints migrate-configand a sidebar button ("Migrate config keys") automatically movelog_level,lane, andmemory_modefrom the old plugin block toanalysis_options_custom.yaml. Safe to run multiple times; already-migrated keys are skipped. - Configurable
max_declarations_per_file— setmax_declarations_per_file: Ninanalysis_options_custom.yamlto allow up to N top-level declarations beforeprefer_single_declaration_per_filefires (default 1). No action required — existing behavior is unchanged. - Sealed hierarchy size nudge — set
max_sealed_hierarchy_lines: Ninanalysis_options_custom.yamlto get a lint when a sealed class file exceeds N lines, suggestingpart/part ofto split subtypes while keeping them in the same library (default 0 = disabled).
Fixed #
log_level,lane, andmemory_modeplugin configuration keys no longer triggerunsupported_optionwarnings from the Dart SDK analyzer. These keys now live as top-level entries inanalysis_options_custom.yamlinstead of underplugins > saropa_lints:. Projects still using the old location get a deprecation warning with the key's value honored as a fallback;dart run saropa_lints initgenerates the updated layout automatically.prefer_sorted_parametersno longer conflicts withdart format. The rule now respectsalways_put_required_named_parameters_first: required named parameters come first, then optional named parameters, each group sorted alphabetically. Includes a quick fix that reorders parameters automatically. (#321)require_text_overflow_handlingandrequire_text_overflow_in_rowcorrection messages no longer default toTextOverflow.ellipsis. The guidance now recommends wrapping inExpanded/Flexiblefirst — ellipsis is a last resort when truncation is intentional. Both rules offer context-aware quick fixes: "Wrap in Expanded" inside Row/Column/Flex, or "Add maxLines" elsewhere. (#320)prefer_single_declaration_per_fileno longer fires on sealed class hierarchies. Dart requires sealed subtypes in the same library, so co-locating them is mandatory, not a style violation. (#322)avoid_unused_parametersno longer fires on abstract, external, or native method declarations. These methods have no implementation body, so their parameters define the interface contract and cannot be "used." (#319)
Changed (Extension) #
- The lane picker now reads and writes
lane:fromanalysis_options_custom.yamlinstead ofanalysis_options.yaml. No action required — the extension handles the new location transparently.
15.2.4 #
This patch release focuses on refining the avoid_unguarded_debug rule to eliminate several false positives. The rule now correctly recognizes early-exit returns and safely resolves variable-indirection chains for debug mode checks. Behind the scenes, early-exit and guard-evaluation utilities were unified across multiple core rules to ensure consistent behavior moving forward. log
Fixed #
avoid_unguarded_debugno longer false-positives whendebugPrint()is dominated by an early-return guard (if (!kDebugMode) return;) at the top of the enclosing block. Also recognizeskDebugMode == false,kDebugMode != true, reversed operand order (false == kDebugMode), and multi-statement then-blocks ending inreturn. No action required.
Added #
avoid_unguarded_debugnow recognizes variable-indirection guards:final isDebug = kDebugMode; if (!isDebug) return;is accepted, including chained assignments up to 3 levels deep and top-level/staticconstfields in the same file. Onlyfinalandconstare trusted — mutable assignments are correctly rejected. No action required.
Maintenance
- Extracted shared
early_exit_guard_utils.dart—containsEarlyExit,endsWithEarlyExit,findPrecedingGuardInBlock, andhasDominatingEarlyExitGuardreplace five independent reimplementations acrossdebug_rules.dart,collection_rules.dart,async_rules.dart,type_rules.dart, andcode_quality_avoid_rules.dart. hasDominatingEarlyExitGuardnow supports astopAtClosureBoundaryparameter — runtime-mutable guards (collection emptiness) stop at closure/function boundaries; compile-time constants (kDebugMode) opt out since closures in the guarded zone are safe.endsWithEarlyExitnow recognizesbreakandcontinuestatements, matching the coverage ofcontainsEarlyExit.- Variable-indirection resolver follows chained
final/constassignments up to 3 levels with cycle detection, and resolves top-level/static class fields via pure AST walk (no type resolution — rule stays in the light analysis lane). _findLocalInitializernow only considers declarations preceding the usage site (offset-based guard prevents forward-reference resolution).
15.2.3 #
Major scan CLI expansion: lane control (--lane full|light, --lane-stats), CI gating by rule impact or tier (--fail-on-impact, --fail-on-tier), stale-ignore detection (--find-stale-ignores), SDK compatibility audit (--check-sdk-compat), and include/exclude glob filters for fine-grained file targeting. Eight false-positive fixes across core rules including avoid_context_in_async_static, avoid_large_list_copy, avoid_datetime_constructor, no_equal_nested_conditions, and the context-across-async family. An OOM crash fix for projects over 4 000 files adds per-file memory budgeting and adaptive RSS caps. Two new rules: prefer_primary_constructor (Dart 3.13+ syntax) and require_sdk_syntax_match (catches AI-generated code using syntax the project's SDK constraint doesn't support). log
The
analyzer ^13.1.0migration (Dart 3.13+ / Flutter 3.47.1+, released 2026-08-19) is complete and tested but held offmain— adoption of 3.47.1 is near zero. It is parked on theanalyzer-13-migrationbranch and will ship as a<n+1>.0.0 major bump once adoption is widespread.
Fixed #
avoid_context_in_async_staticno longer false-positives whenBuildContextis passed solely as an argument to the awaited call and never read after theawaitresumes (e.g.await showDialog(context: context)). The rule now walks all context usages in the method body and suppresses the diagnostic when every usage is consumed synchronously inside the awaited expression. No action required.avoid_large_list_copyno longer false-positives when.toList()feeds a??expression, aList<T>-typed argument, an explicitList<T>variable, aList<T>return type, a cascade, a property access, or a collection literal — all cases where removing.toList()would cause a compile error. No action required.avoid_datetime_constructorandavoid_datetime_constructor_unvalidatedno longer flagDateTime()/DateTime.utc()calls when all three date components (year, month, day) are property accesses on aDateTime-typed expression, since the source object already guarantees valid components. Day arithmetic (dt.day ± N) is also suppressed because Dart documents rollover behavior. No action required.no_equal_nested_conditionsno longer false-positives when the condition variable is reassigned between the outer and inner checks (e.g.if (x == null) { x = compute(); if (x == null) ... }). Simple, null-aware (??=), and compound (+=) assignments are all recognized. No action required.avoid_future_in_build(v3) removed name-prefix heuristic that only caught methods starting withfetch/load/get/etc. Now flags ANY method invocation inFutureBuilder(future:)insidebuild(). Also detects non-deterministicFutureconstructors while exemptingFuture.value()andFuture.error(). Scoped toFutureBuilderonly (no longer flags custom widgets with afuture:parameter). Widget class detection now covers third-party bases (HookWidget,ConsumerWidget, etc.). No action required.pass_existing_future_to_future_builder(v9) no longer flagsFuture.value()andFuture.error()constructors. Cache-method exemption now also recognizes@cachedFutureannotation frompackage:saropa_lints/annotations.dart. No action required.require_error_widgetno longer false-positives when error handling is delegated to an extension method on the snapshot parameter (e.g.snapshot.snapLoadingProgress()). Any method invocation on the snapshot is now recognized as delegated error handling. No action required.- OOM crash on large projects (4000+ files): The in-process analyzer plugin could exhaust memory on projects with thousands of files because forward-accumulating trackers were never evicted under pressure, the hard RSS safety valve defaulted too high, and violation tracking continued after the valve tripped. The plugin now sheds tracker data under memory pressure, stops accumulating records while memory-critical, adapts the default RSS cap to 60% of system RAM (capped at 8 GB on high-RAM machines), warns when the project exceeds 2000 files, and includes tracker sizes in the memory estimate. No action required — set
SAROPA_LINTS_MAX_RSS_MBto override the adaptive cap. - Scan CLI: Rules with
usesTypeResolution, INFO severity, or cost abovelowwere silently blocked by the analysis-server lane gate, which defaulted tolightin the CLI path. The scanner now runs at full lane coverage so all enabled rules fire correctly. No action required. avoid_context_across_asyncandavoid_retaining_disposed_widgetsnow check the resolved type (when type information is available, e.g. in-editor or--resolvescans) instead of matching on the bare identifier/type name alone. Fixes false positives on non-Flutter classes that happen to be namedcontextorElement(an analyzerElement, a customContexttype, etc.). No action required.- Scan CLI now excludes platform ephemeral directories (
ephemeral/,.plugin_symlinks/) by default. Previously these symlinked plugin sources appeared in scan results even though the user doesn't control them. No action required — the exclusion is automatic. (#313)
Added #
DateUtils.dateOnly()quick fix foravoid_datetime_constructorandavoid_datetime_constructor_unvalidated— recognizes the strip-time idiomDateTime(x.year, x.month, x.day)and the explicit-midnight-zeros variantDateTime(x.year, x.month, x.day, 0, 0, 0), replacing both withDateUtils.dateOnly(x). Appears above the existingDateTime.tryParse()fix when both apply. Not offered for.utc()constructors, nullable receivers, non-DateTime types, or pure Dart projects without Flutter. No action required.- Per-file memory budget: On large projects approaching the RSS cap, the plugin now skips cold (unmodified >24h) files and prioritizes recently edited files for lint analysis — partial coverage instead of all-or-nothing OOM. The analysis summary reports how many files were skipped. No action required.
@cachedFutureannotation (package:saropa_lints/annotations.dart) — marks a method as returning a cached Future, suppressingpass_existing_future_to_future_builderwithout needing the heuristic (private method +Future?field). Use when your naming convention doesn't match the heuristic.- New rule:
prefer_primary_constructor(Professional, INFO) — flags classes eligible for Dart 3.13+ primary constructor syntax when the project's SDK lower bound is >=3.13.0. Reduces boilerplate for simple data classes that AI generators consistently produce in the verbose pre-3.13 form. Detection only for now — the quick fix ships with the analyzer 13 migration on theanalyzer-13-migrationbranch. No action required. - New rule:
require_sdk_syntax_match(Comprehensive, WARNING) — flags Dart syntax features that require a newer SDK than the lower bound declared in pubspec.yaml, with a quick fix to raise the SDK lower bound. Catches AI-generated code that uses records, switch expressions, extension types, or digit separators when the project's SDK constraint doesn't support them. No action required. - Scan CLI:
--lane full|lightflag controls which rule lane the scanner uses. Defaults tofull(every enabled rule);lightrestricts to the same cheap, resolution-free subset the analysis server runs in its default lane. No action required — existing scans are unaffected. - Scan CLI:
--lane-statsprints how many of the loaded rules are light-lane vs full-only; when in light lane, lists every blocked rule name so the gate's effect is fully observable. - Scan CLI:
--check-sdk-compatstandalone audit cross-references the pubspec SDK lower bound against Dart syntax features inlib/. Prints a grouped summary showing which files force each version bump. Exits 1 on mismatch, 0 when compatible — suitable for CI gating. - Scan CLI:
--exclude-globs <pattern>...flag excludes files matching glob patterns from the scan. Supports**(any path segments),*(any non-separator chars), and?(single char). Use it to skip vendored code, generated directories, or any paths the hardcoded exclusions don't cover. (#313) - Scan CLI:
--include-globs <pattern>...flag overrides the hardcoded exclusions for matching paths — when a path matches both a default exclusion and an include-glob, the include wins. Use it to force-scan third-party plugin code in ephemeral or generated directories. (#313) - Scan CLI:
--fail-on-impact <level>flag exits 1 when any saropa rule's declared impact meets the threshold (info/warning/error). Unlike--fail-on(which uses analyzer severity), this checks the rule author's business-consequence rating — use it to gate CI on high-impact rules regardless of their configurable severity. Pair with--fail-on-impact-count <n>to tolerate a known baseline during migration. (#312) - Scan CLI:
--fail-on-tier <name>flag exits 1 only when a diagnostic comes from a rule in the specified tier or below. Scan at a high tier for visibility but only fail on essential-tier findings during incremental adoption — e.g.--tier comprehensive --fail-on-tier essential. (#312) - Scan CLI:
--find-stale-ignoresflag detects// ignore:comments whose suppressed saropa_lints rule no longer fires on the target line — the code was fixed but the ignore was left behind. Reports each stale ignore with file path, line number, and rule name. Supports--format jsonfor CI integration. Exits 1 if any stale ignores found, 0 if clean. No action required. - Scan CLI:
--fix-stale-ignoresflag detects AND automatically removes stale// ignore:directives from source files. Standalone comments are deleted entirely; inline comments are stripped preserving the code; multi-rule comments have only the stale rules pruned. Prints a summary of files modified. No action required. - VS Code extension: Stale Ignore commands — two new command palette entries ("Find Stale Ignore Comments" and "Fix Stale Ignore Comments") plus sidebar action rows in the Settings panel. Find runs the scan and publishes stale ignores as warnings in the Problems panel with squiggly lines on the offending comment lines. Fix confirms before auto-removing dead
// ignore:comments from source files. A lightbulb quick fix on each stale-ignore diagnostic offers a file-scoped "Fix stale ignores in this file" action with no confirmation prompt, for cleaning up one file at a time without leaving the editor. No action required.
Changed #
avoid_wildcard_cases_with_enums(v6) now suppresses the diagnostic when the switched enum has more than 20 members, where exhaustive case listing is impractical and adefault:catch-all is the correct design choice. Also upgraded from string heuristic to properEnumElementresolution when type information is available. No action required.avoid_stream_in_build(v3) now also detectsStreamBuilder(stream: method())where a method invocation creates a new subscription on every rebuild. Previously only caughtStreamController()instantiation insidebuild(). Excludes safe constructors (Stream.value(),Stream.empty()) and the??=caching idiom. A new quick fix converts a simpleStatelessWidgetflagged this way into aStatefulWidgetwith the stream cached ininitState(). No action required.- known_issues.json — reviewed 51 flagged entries against live pub.dev data. Version-scoped 2 entries (flutter_calendar_carousel, keyboard_actions) whose issues were fixed in newer releases. Updated workmanager and flutter_email_sender from stale caution to active. Fixed missing reason on flutter_vibrate. Updated better_player from stale maintenance_mode to active.
- known_issues.json — source-verified the remaining 10 UNCLEAR entries from that review. Removed 5 entries with no corroborating evidence in changelogs or issue trackers (agora_rtc_engine end-of-life claim, badges Material 3 bug, flutter_cache_manager disk-space bug, fluttertoast overlay/context leak, google_fonts thread-blocking claim). Version-scoped or corrected 6 entries against confirmed fix versions (animations, audioplayers, flutter_downloader, flutter_modular, graphql, shimmer). No action required.
Maintenance
- Extracted shared
isWidgetOrStateClass()andisInsideBuildMethod()utilities intotarget_matcher_utils.dart— used byavoid_stream_in_buildandavoid_future_in_build; replaces per-rule private duplicates. - Publish script: fixed Dart frontend_server crash —
dart test -j <all-cores>(24 on a 24-core machine) caused native access violations (STATUS_ACCESS_VIOLATION) andfront_endcompiler exceptions during test compilation. The test step now auto-tunes concurrency by probing a single test at increasing-jlevels (4, 6, 8, 10, 12), caching the result inbuild/.dart_test_max_j; crash retries halve concurrency automatically, the failure prompt offers[F]ewer workersto halve manually, and setSAROPA_TEST_MAX_J=Nto skip the probe entirely. - Publish script: fixed test temp dir location — kernel-cache
.dillfiles were written inside the project tree (build/test_tmp/), causinguri_does_not_existscan errors and filling the C: drive. Temp dir now defaults to<system_temp>/saropa_dart_testoutside the project tree; setSAROPA_TEST_TMPto override (validated: falls back if inside project tree). - Removed
plans/known_issues_review.mdfrom git tracking (generated file, regenerated each publish run). - New
dart run saropa_lints:memory_reportcommand — summarizes the analysis server's RSS trend fromplugin.logfor post-crash diagnosis. The in-process plugin now writes a memory sample line roughly every 30 seconds; the command reports min/max/latest RSS, percent of the configured cap, and a CAVEAT whenplugin.logwas rotated mid-session (so the summary is known to be incomplete rather than silently wrong). A one-time log line now also flags when RSS sampling itself is unavailable on the current platform, so an empty trend log is diagnosable instead of looking identical to "plugin never ran". - Reorganized the memory-monitor proposal into
plans/PLAN_analyzer_memory_monitor.md(phased checklist: soft RSS threshold, selective rule shedding, VS Code status-bar integration), matching the repo'sPLAN_*convention. Addedscripts/check_plan_naming.py— an informational, non-blocking report ofplans/*.mdfiles that don't follow thePLAN_<name>.mdnaming convention. - Publish script:
--dry-runCLI flag — runs dependency resolution, audit, format, analysis, tests, anddart pub publish --dry-runwith no commit, tag, version bump, or publish. Needs no pub.dev credentials; intended for CI pre-merge validation. - Publish script: further crash-detection hardening — test-temp-dir contents are wiped before each run instead of accumulating across publish attempts, the temp dir is write-verified before use (falls back to system temp on failure), and the auto-tune concurrency cache key now includes an available-RAM bucket so a level probed safe on an idle machine doesn't get trusted indefinitely under memory pressure.
- known_issues review script — now skips entries with
appliesToMaxVersionorreplacementObsoleteFromVersionto avoid false-positive flagging of version-scoped entries that are correct by design. require_sdk_syntax_matchquick fix: removed deadMap<Type, String>lookup (analyzer concrete types are private*Implclasses that never matched abstract keys); hardened regex with triple-quoted raw string to handle embedded quotes.bugs/BUG_REPORT_GUIDE.mdrenamed tobugs/ISSUE_REPORT_GUIDE.mdand extended with a feature request template, proposal naming patterns, and lifecycle, alongside the existing bug report process._rule_metrics.py's bug counter now reports open feature proposals separately from unsolved bugs in the publish "WORK REPORT" banner, instead of lumping both into one count.- Scan daemon and accuracy report now pass
lane: RuleLane.fullexplicitly instead of relying on the constructor default. - Scan CLI warns when
--lane lightis combined with--exclude-light-lane(degenerate: zero rules to scan). - Fixed the 17 real ERROR-severity findings the full-lane self-scan surfaced against this package's own source:
double.parse(x.toStringAsFixed(n))round-trip patterns in the project-health/vibrancy models now round arithmetically via a sharedroundToDecimalPlaceshelper instead of parsing a self-produced string; a regex-guaranteed-digitsint.parsetriple in the pubspec constraint parser is annotated as a verified false positive. - Changelog version-drift guard — new
scripts/hooks/changelog_guard.py(dual-mode: Claude PostToolUse + git pre-commit) blocks commits that introduce multiple unreleased sections in CHANGELOG.md or bump version numbers in pubspec.yaml / package.json ahead of the publish script. Publish script also gainedassert_single_unreleased_section()as a belt-and-suspenders gate. - Publish script: live test progress —
dart testoutput now streams to the terminal with a real-time progress bar showing elapsed time, pass/skip/fail counts, and the current test name. Failure details print immediately instead of silently accumulating in a log file. Full output is still written toreports/for post-mortem analysis. - Publish script: delta-first testing — the test step now automatically detects changed files via
git diff, maps them to corresponding test files, and runs only those first (seconds instead of minutes). If the delta pass fails, it stops immediately without compiling the full 340+ file suite. Infrastructure changes (tiers, registration, pubspec) bypass delta and run the full suite. - Full Audit plan — design for a "run every rule" audit feature: CLI subcommand (
dart run saropa_lints audit), visible sidebar button + Explorer context menu, filterable webview report with tier/severity/impact/category facets, diff mode (--since <ref>) as a UI quick-pick, and baseline diffing (--save-baseline/--baseline) with datetime-stamped outputs. Plan atplans/PLAN_full_audit.md. - i18n translation pipeline: deferred Qwen/Ollama provisioning —
extension/scripts/i18n/generate_locales.pyandmt_fallback.pypreviously resolved the primary MT engine (self-provisioning Ollama: starting the daemon, pulling a multi-GB model on first use) unconditionally before checking whether any locale actually had untranslated strings. A fully-cached run now never touches Qwen/Ollama at all — engine resolution is deferred until a string is confirmed missing from every cached engine's keyspace. - Publish script: no more forced retry on real test failures — a failing test pass used to always re-run once automatically before asking the user anything, silently doubling the wait on a run that was never going to pass. The automatic retry now only fires when the failure is diagnosed as transient (VM crash or file lock) AND the pass is cheap (delta); the expensive full-suite ("fast") pass always goes straight to the Continue/Retry/Abort prompt on any failure, transient or not, so a multi-minute compile is never silently repeated without the user deciding.
scan_cli_args_test.dart: five untagged process groups now markedtags: ['slow']— the(process)groups shell out to realdart run saropa_lints:scansubprocesses (including full essential-tier scans of the project itself) and were timing out at 2 minutes each under full-suite-jcontention, failing the fast publish pass. Only the process-spawning groups are tagged; the ~250 in-memoryparseScanArgsunit tests in the same file remain in the fast pass.- Publish script: fixed
dart fixaudit crash on Windows — the twodart fixsubprocess calls in the pre-publish audit were the onlydartinvocations in the publish modules missing shell mode, so they crashed withWinError 2on Windows wheredartresolves to a.batwrapper thatCreateProcesscannot launch directly. Both calls now pass shell mode like every other subprocess in the pipeline. scan_cli_args_test.dart: slow process groups given an explicit 5-minute timeout — the publish delta pass runs changed test files with tag filters deliberately ignored, so theslowtag alone could not protect these tests there; each cold-starts an uncompiled scan CLI that can exceed the 2-minute default. Known limitation: the--fail-ongroup can still exceed even 5 minutes under contention — the durable fix (a precompiled scan snapshot) is tracked separately.
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.
Historical Changelog Archive #
Looking for older changes? See CHANGELOG_ARCHIVE.md for older versions.