saropa_lints 17.10.2
saropa_lints: ^17.10.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
2350+ 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
17.10.2 #
require_error_widget stops asking for an error branch that can never run, and the VS Code extension can now explain which baseline settings hide findings in a file. Accepted findings are now counted wherever suppressions are broken down by kind. log
Fixed #
require_error_widgetno longer reports aFutureBuilderwhose future comes from a same-file async method that catches every error and only logs and returns a fallback, since its error state is unreachable; futures from other files, overridable methods and handlers that can still throw are still reported. No action required.- The scan CLI, scan daemon and language server now apply each package's own baseline when one run covers a folder with several packages; before, only the first analyzed package's baseline was used for every file. No action required.
- On Windows the plugin no longer starts a PowerShell process to read total RAM at startup, so each plugin isolate is ready about 0.4 s sooner and
dart analyzeon a folder holding several packages no longer drops the second package's findings in the tested two-package case. No action required. - The GitHub Action no longer prefixes an absolute Windows
sarif-filepath with the working directory, which broke the SARIF upload on Windows runners. No action required. scan --check-acceptednow also scans files that accepted entries name in places a normal scan skips (such asexample/andbin/), so their stale entries are reported, and "Check Accepted Findings" no longer counts unchecked entries as checked. A check that passed before can now report stale entries.
Added (Extension) #
- New "Explain Baseline for This File" command in the editor and Explorer context menus for Dart files shows which baseline settings hide findings in that file, in the Output panel. On Windows, if the file path holds a character the shell cannot pass safely, the error message says so. No action required.
Changed (Extension) #
- The exported OWASP report now lists findings hidden by
saropa_accepted.yamlnext to the ignore and baseline counts, so the kinds add up to the total. No action required.
Fixed (Extension) #
- Urdu text that had been written with Arabic words or letters, or with Sindhi-only letters, is corrected. No action required.
- "Package Vibrancy" and "Code Health" now appear in English in every language, and warning icons that showed as translated text appear as icons again. No action required.
- The word "Total" in the Rule Packs "Suppressions (export)" strip is now translated. No action required.
Internal #
- A translation guard and the locale parity test now fail when an Urdu value contains a Sindhi-only letter.
- New process-level tests run the scan daemon and the language server on a temporary package to check that
max:insaropa_accepted.yamlhides only the first findings and that ignored findings do not count toward it. - A new CI job runs the date-baseline and accepted
max:process tests on macOS. - Fixed the CI Python tests: the GitHub Action tests now cover the
jobsandmax-memory-mbinputs, and the coverage metrics now find theprefer_generated_data_classestests. - Fixed the release script on Windows not moving the major version tag (such as
v17) that GitHub Action users reference. - Diagnosed why
dart analyzeon a folder holding two packages reports plugin findings for only one: the analysis server tracks one shared "plugin analyzing" flag for all plugin isolates, so it reports idle once the first isolate finishes, before a slower second isolate starts. Upstream; the limit is documented in the configuration guide.
17.10.0 #
Upgrade note: A plain
dart run saropa_lints scanno longer skips when the plugin block inanalysis_options.yamlis commented out, which the language server does by default andinitcan leave behind, so git hooks and CI that passed by skipping can now report findings and fail. To keep skipping, set"saropaLints.enabled": falsein.vscode/settings.jsonand commit that file; a switch in user settings or a.code-workspacefile is not seen by the scan.
Many lint rules report fewer false positives, covering paths, caches, async guards, parsing, secrets, long tasks, HTTP responses, and Firebase calls. The adaptive widget rule now targets different code than before. log
Added #
- A
saropa_accepted.yamlbeside a package'spubspec.yaml(rule, file and reason, no line numbers) hides reviewed findings from Problems, scan, audit and violations exports; each file uses the list of its nearestpubspec.yaml. An optionalmax:count hides only the first findings by source position and reports the rest.scan --check-acceptedchecks every list under the target and fails on stale or invalid entries. The VS Code extension adds "Accept {rule} in this file" and "Check Accepted Findings".
Changed #
prefer_platform_widget_adaptiveno longer reportsMaterialApp; it now reports Material controls that leave an available.adaptiveconstructor unused and are not already branched by platform, in resolved analysis such as the editor. Review any new reports.- The homepage link of the package and the VS Code extension now opens the product page at saropa.com/developers/saropa-lints. No action required.
Fixed #
avoid_case_sensitive_path_comparisonno longer flags a comparison against a MIME type, so content type checks are not treated as file path checks (a named constant is recognized only in resolved analysis such as the editor). No action required.require_file_path_sanitizationnow reports only when the path actually uses a parameter, not when a property or literal text merely shares its name. No action required.avoid_path_traversalnow reports only when the path actually uses a parameter, not when a property or literal text merely shares its name. It also no longer stays silent when a literal-only parameter precedes a user-supplied one in the same path. No action required.avoid_unbounded_cache_growthno longer flags a private cache map that is only ever replaced whole by a freshly built map, since old entries cannot accumulate. No action required.require_cache_expirationno longer asks for expiration on a private cache map that is only ever replaced whole, since each replacement already refreshes it. No action required.no_equal_nested_conditionsno longer flags a condition checked again afterawaitoryieldwhen its value can change during the suspension, such as a getter, mutable field, or method call. The same applies to a check repeated inside a closure that may run later, and to a check after a call when a closure in the same declaration writes the condition's variable or field. No action required.prefer_try_parse_for_dynamic_datano longer flags, in the unresolved scan,Uri.parseof an interpolation of constants declared in the same file, including static class fields. No action required.prefer_try_parse_for_dynamic_datanow recognizes digit-only regex checks declared in an outer block or seen by the unresolved scan, and reports guarded parses that can still receive empty or non-digit text (such as an unanchored pattern or an open-endedsubstring). A pattern variable or local function that reuses a checked name no longer counts as checked. Review any new reports.require_envied_obfuscationno longer reportsboolfields, which cannot hold a secret and losestatic constwhen obfuscated. No action required.require_notification_for_long_tasksno longer reports asyncAll,processAll,exportAll, orimportAllcall whose same-file function provably does only short work, in resolved analysis such as the editor. No action required.require_http_status_checkno longer reports a private send helper that returns the HTTP response unread when all its callers in the file are methods, which now carry the status check requirement (assigning to a local before returning is still reported). Add a status check to any newly reported caller.require_refresh_indicatorandrequire_refresh_indicator_on_listsno longer report a list in a private widget that its file only shows in a dialog, popup, menu or bottom sheet (includingshow...Dialogwrappers), or a list whoseitemCountis the length of a constant list. A screen pushed from a dialog button, and a list name shadowed by a local or by a member of the same class, are still reported. No action required.require_firebase_error_handlingno longer reports a Firebase call in a private async helper when every reference in the library is an awaited call inside try-catch, directly or through a private or@visibleForTestingfunction field. No action required.dart run saropa_lints:baselinenow activates the baseline as a top-levelbaseline:section inanalysis_options_custom.yaml, where it is read; it previously wrote it intoanalysis_options.yaml, where it never took effect. The baseline file now resolves against the project root instead of the analysis server's working directory. Re-run the command once if you created a baseline before; an old nestedbaseline:entry inanalysis_options.yamlcan be removed.dart run saropa_lints:baseline(including--update) no longer drops entries that are still present when a baseline is already active, because its analysis run now ignores the current baseline JSON (date:andpaths:still apply). A relative output path now lands in the analyzed project when a project path is given. No action required.dart run saropa_lints:baseline ./my_projectnow analyzes the named project instead of the current directory. When abaseline:section already exists, the command adds or updates itsfile:line (keeping the other keys) and prints the change. No action required.- The
baseline:section now accepts trailing# commentsand inline lists such asonly_impacts: [info], which were previously misread; legacy impact names (low,medium,high,critical) map to the current severities. Check that the filtered baseline hides what you expect. - In the editor, each project in a multi-root workspace now uses its own
baseline:section, so one project's entries and paths no longer hide findings in another. No action required. baseline: date:now hides findings on lines committed before the date in the editor,dart analyze, the language server andscan; it previously hid nothing. Uncommitted, unsaved and untracked code still reports. It runsgit blameonce for each file with findings (about 0.1 to 0.3 seconds each), so expect a slower first analysis on large projects and fewer reported findings.dart run saropa_lints:baseline --explain <file>shows which baseline settings (paths:, JSON entries,date:,only_impacts:) hide findings in that file, without running analysis. No action required.- "Check Accepted Findings" in the VS Code extension now also checks a workspace folder whose
pubspec.yamlsits one folder down, and a folder that uses saropa_lints without listing it inpubspec.yaml. A package nested inside a folder that is not checked is no longer skipped. No action required. - "Migrate Renamed Rules" in the VS Code extension now also renames rules in
saropa_accepted.yaml, so renamed rules keep their reviewed entries. Entries for removed rules are kept and reported by--check-acceptedfor you to delete. - The Hebrew VS Code extension no longer shows Arabic or Japanese characters and garbled words in six accepted-findings and stale-override messages, and the language picker title no longer carries extra trailing words. No action required.
- Translated VS Code extension text no longer falls back to English in the status bar's install-route labels and a few other strings, keeps the command links and code samples that several walkthrough steps and settings had lost, and shows a clean language picker title in 17 languages. The Hebrew accepted-findings messages use consistent wording. No action required.
- Translated VS Code extension text no longer shows the translator's own instructions ("Strict rules: 1. Return only the translated string…"), labels repeated three or four times ("Linea Linea Linea Linea"), or sentences that run on far past the English, in walkthrough steps, settings, column headers and messages across all 24 languages. No action required.
- Translated VS Code extension text no longer contains sentences the translator invented (such as "Es el nombre de la persona que tiene…" after "Saropa Lints:") or nonsense labels such as "El mensaje es el mensaje." for "Message", and buttons and column headers no longer end in a stray full stop, in all 24 languages. No action required.
scanand other command-line scans given a relative folder such as.now apply that project's baselines, configuration and// ignore:matching as they do for a full path. No action required.- "Check Accepted Findings" and
scan --check-acceptednow run when the VS Code extension has commented out the plugin block (its default with the language server on) instead of skipping without a result. No action required. - Scans run by the language server, scan-on-save and
--tiernow keep the rule settings in a plugin block the extension commented out, so rules turned off there stay off. No action required. - A plain
scannow runs with the commented-out rule settings, instead of printing "scan skipped", when the plugin block is commented out because the language server is on orinitleft it that way, so hooks and CI that passed this way can now report findings. To keep skipping, set"saropaLints.enabled": falsein.vscode/settings.jsonand commit it; a switch set only in a.code-workspacefile or user settings is not seen. scan --find-stale-ignoresno longer reports a live// ignore:as stale, and--fix-stale-ignoresno longer deletes it. A comment is reported only when its rule ran on a fully scanned file and did not fire there; comments for rules that did not run, files that could not be scanned, and comments the check cannot place are kept. Both modes now use a resolved, single-process scan (slower on large projects) and also run when the VS Code extension has commented out the plugin block. Re-check any ignore an earlier--fix-stale-ignoresrun removed.
Internal #
- The locale parity test and
bad_translations.pynow fail on a leaked numbered translator prompt, a word or phrase repeated three times in a row, or a long value more than 2.5 times the English length; flagged entries are also pruned from the translation cache. - The same guards now also fail on 85 known invented phrases (
extension/scripts/i18n/invented_phrases.json, each excused when the English justifies it) and on Chinese, Japanese or Korean text repeated back to back; the hand repairs live inextension/scripts/i18n/invented_repairs/. - Added behavioral tests for
require_copy_with_null_handlingand documented that it judges thecopyWithdeclaration only, not callers or clear-by-empty conventions; detection is unchanged.
17.9.1 #
Package Vibrancy is more accurate about which dependency_overrides entries are still needed, and now records in its log why a check was skipped instead of failing silently. log
Fixed (Extension) #
- Package Vibrancy no longer flags a needed override as stale when the parent package's constraint line carries a trailing comment; skipped constraint reads are now logged. No action required.
- The Package Vibrancy stale-override warning can now be dismissed for a deliberate override with a quick fix, "Suppress (override is intentional)", which adds
# saropa_lints:ignore stale-overrideto the line. No action required. - Overrides whose check could not complete (dependency graph failed, or a parent package's pubspec was unreadable) now show as "Unverified" instead of "Stale", so they are never presented as safe to remove. Re-run the scan once the cause (named in the tooltip and log) is fixed.
17.9.0 #
Package Vibrancy no longer rewrites pubspec.lock in FVM-pinned projects, now uses the project's pinned SDK and respects saropaLints.enabled; avoid_screenshot_sensitive reports fewer false positives and catches more real authentication and verification screens; and prefer_test_find_by_key is now opt-in. log
Added #
- Explain Last Vibrancy Skip: when Package Vibrancy skips a pub query to protect
pubspec.lock, a status-bar item now appears; clicking it (or running the command) shows which SDK was selected, where it came from, the project SDK version, and the rule that caused the skip, with a button to runpub getusing the project SDK (dart pub getfor pure-Dart projects,flutter pub getfor Flutter projects, with an extra confirmation when the SDK would come from PATH). Multi-root workspaces list each skipped folder.
Fixed #
- Package Vibrancy no longer rewrites
pubspec.lockwith the wrong SDK. Itsdart pub outdated/dart pub deps/fluttercalls now use the workspace SDK (dart.sdkPath,dart.flutterSdkPath, or the FVM pin) instead of whatever is first on PATH, and a pub query is skipped when the SDK differs from the one that last resolved the project. The startup scan and the new-version watcher also respectsaropaLints.enabled: false. avoid_screenshot_sensitivematched sensitive words as substrings of class names (pininside "mapping" or "shipping"); it now matches whole camelCase words, so only classes that name a screen, page, view or widget for payment, login, PIN and similar flows are reported. The debug/tooling exclusion is also whole-word now, soviewerno longer hidesReviewerPaymentScreen. State, ViewModel and controller classes are skipped, and a StatefulWidget is cleared when itsStateclass appliesFLAG_SECURE. It also now catches authentication, authorization, verification and passcode screens (for exampleAuthenticationScreen,VerificationScreen), which were missed before; no action required.
Changed #
prefer_test_find_by_keyis now opt-in: it moved from the Recommended tier to the stylistic (opt-in) set and left thetestingrule pack, because it flagged everyfind.byType()and fixing it meant adding Keys to production widgets. Enable it explicitly indiagnostics:if the project wants key-based finders.
Internal #
- Vibrancy pub-guard strings are hand-translated in all 24 locales, and the stale
pubGuard.skippedkey (leaked machine-translation prompt text) is removed. No action required. - The locale audit (
generate_locales.py --fail-on-missing, the publish gate) now reads the shipped catalogs: keys absent from a locale, leaked MT prompt text, repeat loops and wrong-script characters fail the gate, and coverage badges count them. About 340 corrupted catalog values across 20+ locales were hand-retranslated so the gate passes; new standaloneextension/scripts/i18n/check_locale_garbage.py.
17.8.0 #
Fewer false positives: over 20 rules no longer flag code that was already correct (cached notifiers, loop-disposed controllers, InkWell hover/focus, button busy spinners, projects without an ios/ folder and more), the VS Code LSP server stops rewriting pubspec.lock in FVM-pinned projects, and published rule counts and the Vietnamese comparison label are fixed. log
Changed #
- Rule-count claims in the README, extension README, extension manifest strings, translated catalogs, welcome panel fallback, About pages, Professional Services page and every migration guide now say "2350+" instead of a mix of 1400+, 1500+, 2100+ and 2300+; no action required.
Internal #
- New
scripts/checks/check_report_attribution.pyproves a reported diagnostic is a saropa_lints rule before a bug is filed or fixed;bugs/ISSUE_REPORT_GUIDE.mdnow routes Dart SDK diagnostics upstream and asks reporters to retest on the latest release.
Added #
- New rule
prefer_generated_data_classes(Professional, INFO): in projects that depend on dart_mappable, freezed or json_serializable, flags a class that hand-writescopyWith,==together withhashCode, ortoJson/fromJsonusing two or more string keys. Classes annotated@MappableClass,@freezed,@unfreezedor@JsonSerializable, classes using a generated mixin, and abstract classes are skipped;toStringalone does not trigger it. Reported in #415. - VS Code: Saropa Lints: Scan with Latest Engine (Older Dart Projects) runs the newest scan engine under a newer Dart SDK (PATH
dart, orsaropaLints.externalEngine.dartSdkPath) against a project pinned below Dart 3.11, and lists the findings in the Problems panel. It also appears as a Scan with latest engine row in the sidebar Actions list, shown only when the project's Dart SDK is below 3.11. The first run asks before installing the engine globally; the project'spubspec.yamland SDK pin are untouched. New guide:doc/guides/older_dart_sdks.md.
Fixed #
- VS Code: the LSP server never started because the extension passed
--no-pubtodart run, an option Dart 3.8 and 3.14 both reject. It now launchesbin/lsp_server.dartdirectly against the project'spackage_config.json, which also avoids any implicitpub get. - VS Code: the LSP server no longer crash-loops five times when the project's locked
saropa_lintsis older than 15.2.10 (nobin/lsp_server.dart, e.g. 4.15.1); the extension skips the spawn and shows one warning naming the installed version, the minimum, the exactpubspec.yamledit (or the Dart SDK upgrade needed first when the project is below Dart 3.9), and an Open pubspec.yaml button. avoid_skipped_testsno longer flags askip:driven bybool.fromEnvironment/String.fromEnvironment/Platform.environment(directly or via a variable initialized from one), since that is an opt-in gate;skip: trueand string reasons are still reported; no action required.- VS Code: Run analysis in the sidebar now restarts the Dart analysis server, shows scan progress with a Cancel button, and refreshes the views and status bar with the issue count; previously it only re-copied existing diagnostics and showed nothing when issues were found.
- VS Code: the LSP server now launches with the workspace's pinned Dart SDK (
dart.sdkPath,dart.flutterSdkPath, or.fvm/flutter_sdk, falling back to PATH) and runs with--no-pub, so it no longer rewritespubspec.lockorpackage_config.jsonin FVM-pinned projects. - VS Code: the Package Vibrancy
sdk-constraintwarning onpubspec.yamlcan now be silenced with# saropa_lints:ignore sdk-constrainton thesdk:/flutter:line or the line above, or via the new "Suppress (intentional old SDK)" quick fix, for projects that deliberately pin an old SDK. A# saropa_lints:ignore-filecomment (optionally followed by codes) now silences those codes for a wholepubspec.yaml. avoid_change_notifier_in_widgetno longer flags a notifier created with_field ??= Notifier()insidebuild(), since it is cached in a State field; no action required.avoid_ios_hardcoded_status_barno longer flagsSizedBox(height: 20/44/47/59)used as spacing or a fixed row height inside achildrenlist; no action required.avoid_keyboard_overlapno longer flags a TextField inside a widget that returns a bare Column/Row with no Scaffold of its own, because the scroll view is owned by the hosting page; no action required.avoid_undisposed_instancesno longer flags controllers disposed by afor (final c in [_a, _b]) c.dispose();loop indispose(); no action required.- Hover, focus, cursor, refresh-indicator, scroll-controller, intrinsic-dimensions and gesture-behavior lints no longer fire on map-marker or
Semantics(button: true)tap targets, non-scrolling or dialog/popup lists, or stretch Columns whose width is already bounded; no action required. prefer_abstraction_injectionno longer flags factory-function parameters such asDio Function()? dioFactory, since the closure is the injection seam; no action required.prefer_number_formatno longer flagsDateTimeday/hour/minute/month/weekday values in text, since they never need locale grouping; no action required.prefer_positioned_directionalno longer flagsPositionedwhoseleft/rightderive from Offset.dx/.dygeometry (absolute canvas layouts); no action required.prefer_scalable_textno longer flags a literalTextStyle(fontSize:), since Flutter scales it by default; it now reports onlyTextorRichTextthat disables scaling (TextScaler.noScalingortextScaleFactor: 1); no action required.prefer_skeleton_over_spinnerno longer flags a progress indicator used as a button's busy icon (icon:,child:orlabel:of a*Buttonwidget); spinners outside buttons are still reported; no action required.prefer_static_methodno longer flags instance methods that read only barefinalinstance fields (for example immutable value classes); no action required.require_copy_with_null_handlingno longer flags acopyWiththat clears a nullable field through a boolean flag such asnoExtraorclearExtra; no action required.require_hover_states,prefer_cursor_for_buttonsandrequire_focus_indicatorno longer flagInkWell/InkResponse, which already provide hover, focus and click cursor; onlyGestureDetectoris reported; no action required.require_ios_multitasking_supportno longer fires in projects with noios/directory (for example Android/Windows-only apps); no action required.require_semantic_label_iconsno longer flags decorative icons passed asicon:,prefixIcon:,suffixIcon:orleading:to a widget that already has a text label (ButtonSegment,FilledButton.icon,InputDecoration.labelText); no action required.require_text_overflow_handlingno longer flags dynamicTextused as thetitle/subtitleof ListTile-family widgets or as the direct child ofExpanded/Flexible, since those slots already wrap and bound width; no action required.- The Vietnamese label under the package count in the comparison view no longer reads "so sánh trong khi so sánh." and now reads "đang so sánh"; no action required.
17.7.0 #
Scanning now uses your computer's cores while staying careful with its memory: large projects scan several times faster, the VS Code whole-project scan finishes in about a minute instead of tens of minutes, and a scan that would strain your machine slows itself down — and tells you how to fix it — instead of freezing it. log
Added #
scanruns in parallel by default (--jobs <n|auto|off>), sized from your CPUs, free memory and container limits, so large scans finish sooner on CI and desktops alike — use--jobs 1for the old serial behavior.scanwatches its own memory (--max-memory-mb), sheds workers under pressure, and stops early with exit code 3 rather than risk the machine — a gate can no longer pass on a partial scan.scanrecovers from a file that hangs a worker (--chunk-timeout), skips and names it, and reports slow files (--slow-file-ms) so you can see what makes a scan slow.scan --progress plainprints a status line every 15 seconds, which is readable in CI logs; the GitHub Action gainedjobsandmax-memory-mbinputs.- VS Code: Scan Whole Project for Issues now defaults to a fast parallel scan (
saropaLints.scanOnSave.baselineMode) and offers the type-aware deep scan afterwards with a time and memory estimate; no action required. - VS Code: Saropa Lints: Scan Performance and Memory Settings… shows what each profile (
gentle,balanced,fast) would do on your machine and recommends one; fine-tune withsaropaLints.scan.maxWorkersandsaropaLints.scan.maxMemoryMb. scan --max-issues <n>(alsoSAROPA_LINTS_MAX) sets how many non-error issues are reported; the default is now unlimited so reports and--fail-on-countthresholds are complete, and errors are never capped — pass--max-issues 500to restore the old cutoff.- A new
max_rss_mbkey inanalysis_options_custom.yamlsets the live analyzer plugin's hard memory cap without needing an environment variable;SAROPA_LINTS_MAX_RSS_MBstill overrides it. - VS Code: choosing the gentle profile (or opening a project on a small computer with no limits set) offers a one-click, machine-sized memory limit and graceful rule shedding for live analysis, then offers to restart the analysis server.
- VS Code:
saropaLints.scan.maxIssuescontrols the issue cap for whole-project and on-save scans (default unlimited). - VS Code: when free memory is low, the multi-GB type-aware scan is skipped or paused with a notification offering one-click fixes (use the fast scan, turn off type resolution, resume, or open settings) instead of starting on a struggling computer.
Changed #
- The scan CLI and VS Code scan daemon no longer silently drop non-error issues beyond 500, which previously made reports and count-based CI thresholds incomplete; the analyzer plugin keeps its 500-issue Problems-tab default.
- VS Code scan processes now run at reduced CPU priority (
saropaLints.scan.lowPriority, on by default) so typing stays smooth during a scan; no action required. - A fast whole-project scan no longer overwrites findings from files that were already scanned with type resolution; no action required.
Internal #
- New locale strings (
scanResources.*) ship in English in every locale until the translation pipeline is run; they are allowlisted inenglish_allowed.json.
17.6.0 #
The extension's rating prompts, welcome panel, scan progress message and several other strings now read natively in all 24 supported languages instead of falling back to English. Eleven false positives are also fixed. log
Fixed #
avoid_context_after_navigationno longer reports the awaited navigator call itself (e.g.await Navigator.maybePop(context)). Thecontextargument is evaluated before the await, so only uses after the await are checked.avoid_gesture_only_interactionsno longer flags a GestureDetector when an ancestorSemanticssuppliesonTap/onLongPress, or when it is an opaqueSizedBox/ColoredBoxhit region with nothing to focus.avoid_variable_shadowingno longer reports Dart 3 wildcard_locals, loop variables or parameters.require_ios_accessibility_large_textno longer flags a literalTextStyle(fontSize:)consumed byText/RichText(ambientTextScaler) or aTextPainterwith atextScaler:. It still reports bare styles and consumers that pin scaling off (TextScaler.noScaling,textScaleFactor: 1).invalid_field_nameno longer reports contextual keywords (e.g.when) used as record field names; only reserved words are flagged.prefer_static_methodno longer flags a state-free method that other code in the library calls through an instance receiver (widget.button.buildTile()). Making it static would break those callers.avoid_motion_without_reduceno longer reports animated widgets whose duration (or enclosing class) is gated through a project reduce-motion helper such asisMotionReduced, or that useDuration.zero.avoid_public_members_in_statesno longer flags@overridemembers that implement a user-defined mixin or base-class contract.prefer_stream_distinctno longer fires when thelistencallback ignores its event parameter ((_) => ...or an unused parameter).require_permission_manifest_androidnow reads the project's AndroidManifest.xml. It no longer reportspermission_handlerimports when the manifest already declares permissions or when there is no manifest to check.avoid_implicitly_nullable_extension_typesnow reports only extension types with a nullable or bare-type-parameter representation. Non-nullable representations (int,List<T>) are no longer flagged.avoid_public_members_in_statesnow exempts an@overrideonly when it comes from a mixin or an SDK/Flutter type, and again reports overrides of app-defined State base classes. It also now checks transitive State subclasses.avoid_gesture_only_interactionsignoresSemantics(onTap: null)and no longer accepts a distant page-levelSemantics; only a near ancestor counts.avoid_motion_without_reducematches reduce-motion helper names on identifier boundaries, sounreducedMotionDurationno longer counts as a guard.require_ios_accessibility_large_texttreatsTextScaler.linear(1)andtextScaleFactor: 1.0as pinned scaling.avoid_implicitly_nullable_extension_typesalso flagsdynamicandNullrepresentation types.require_permission_manifest_androidalso reads debug/profile manifests, ignores commented-out<uses-permission>entries, and looks up the manifest only once apermission_handlerimport is seen. Flutter's default debug manifest declares INTERNET, so the reminder is now silent for default projects.prefer_static_methodnow also treats cascade calls, tear-offs andthis.m()as instance use, with one pass per file instead of one per method.
Changed #
- Added hand-written translations for the rate-and-feedback prompts, "What's New" panel, workspace scan progress and roughly 100 smaller strings across the translated locales. They have not had native-speaker review.
Internal #
- Scan tests (
git_changed_files_test,scan_analyzer_exclude_test) now compare separator-neutral paths on Windows; the anti-pattern.contains()guard is satisfied by the iOS large-text rule. - Fixed
ScanRunner.runResolvedsilently skipping explicitly requested files that the project'sanalyzer: exclude:removes, which broke the resolved-superset-of-syntactic invariant. Also normalized the path in_createContextUnitso mixed-separator targets no longer throw "Path must be normalized" on Windows, and made the git-changed-files and analyzer-exclude tests separator-neutral. - i18n dictionaries: technical labels (pubspec/plugin-route version sources, RSS/heap readout,
WASM,GitHub Actions CI,N/A,UPDATE) are now passthroughs in every locale, anddevis a cognate in the nine locales that kept it. Hand translations live inextension/scripts/i18n/manual_translations.pyandmanual_translations_gaps.py.
17.5.0 #
Polish translations in the extension are refreshed, and the release tooling no longer stalls on a stale version number. log
Changed #
- Refreshed the Polish extension translations. No action required.
Internal #
- Publish script: a stale
pubspec.yamlversion found at the pre-commit check is now auto-corrected (and re-staged along withextension/package.json) instead of dead-ending at the Retry/Abort menu.
17.4.9 #
Scan notifications are quieter: one progress notification replaces the stack of "N issues found" toasts while the workspace scan runs. The What's New panel no longer shows the red engine-change warning to fresh installs or unconfirmed upgrades, and it gains a "Rate Us" card, a rating nudge after your 5th successful scan, and Help Hub entries for the Marketplace and Open VSX review pages. log
Changed #
- The "N issues found" warning no longer stacks a new toast for every auto-triggered analysis while the workspace scan is still running; a single progress notification shows the scan percentage and the running issue count, and the final toast appears once when the scan completes.
- The What's New panel now shows the red "Default Diagnostic Engine Changed" card and its warning subtitle only when upgrading from a version before v16; fresh installs and upgrades the extension cannot confirm no longer see it. No action required.
Added #
- Added a "Rate Us" call-to-action on the What's New welcome panel with links to the VS Code Marketplace, Open VSX review pages, and GitHub Issues — a gradient-accented card with animated stars, centered between the discovery grid and the show-next-time checkbox.
- Added a scan-gated rating nudge toast that appears after the user's 5th successful scan, linking to both extension stores and the GitHub issues page. Respects the proactive-nudge opt-out and defers gracefully on "Not now".
- Added "Rate on VS Code Marketplace" and "Rate on Open VSX" entries to the Help Hub quick pick, so users can reach the review pages at any time.
- Added
saropaLints.rateOnMarketplaceandsaropaLints.rateOnOpenVsxcommands (Command Palette + Command Catalog).
17.3.0 #
Rules & Tiers results and the "Explain rule" panel can now turn a rule off without a trip to the Overrides tab, and several Health Panel dashboards render correctly again after a CSP directive was silently dropping their inline style updates. The scan CLI is more reliable on large or unusual project layouts: it no longer runs out of memory with --resolve, and --exclude-globs no longer crashes when the excluded path contains a directory the scan can't read. log
Added #
- Added a disable/enable action directly on Rules & Tiers rule-search results and on the standalone "Explain rule" panel, so a rule can be turned off without switching to the Overrides tab.
- Added
--strict-filesflag to the scan CLI: exits 2 when ANY--filesentry is skipped (outside the analysis root), not just when all are skipped. Use in CI pipelines that must guarantee every named file was analyzed.
Changed #
- Removed the duplicate rule
prefer_named_boolean_parameters;avoid_positional_boolean_parameters_with_fixreports the same positionalboolparameters and adds a quick fix. Existinganalysis_options.yamlentries naming the old rule (disable or severity override) still apply to the surviving rule; a// ignore: prefer_named_boolean_parameterscomment no longer suppresses it, so rename it toavoid_positional_boolean_parameters_with_fix.
Fixed #
require_data_encryptionno longer reports writes to network or stream sinks (HttpResponse,IOSink,Socket,WebSocket); sending a response body is transport, not storage.File.writeAsStringand similar persistence calls still report.- Fixed a webview CSP directive that combined a nonce with
unsafe-inlineforstyle-src, which per spec silently dropped inline style writes across several dashboards (the Rules & Tiers coverage gauge, chart bars, and score pills now render correctly again). No action required. - The removed
saropaLints.scanOnSave.enabledsetting is now detected and flagged (output channel plus a one-time notification) instead of silently doing nothing; remove it fromsettings.json. - Fixed the "Explain rule" panel showing "Run analysis to see it in context" for a disabled rule that has never fired; it now explains the rule is disabled and suggests re-enabling it. No action required.
- Fixed the "Explain rule" fallback panel showing an unbounded pack-label list; it now caps at 3 labels with a "(+N more)" indicator. No action required.
- Fixed
scan --resolveexceeding its memory limit after a single file on most projects by sharing one analysis context across all files instead of creating one per file (#402). No action required. - Fixed
scan --exclude-globscrashing with a permission error when the excluded path contained an unreadable directory, because the scan listed every subdirectory before applying exclusions (#408). No action required. - Fixed
scan --files --resolvesilently exiting 0 when requested files fell outside the analysis context root, letting CI pass having scanned nothing. The scan now exits non-zero and prints which files were skipped. No action required. - Fixed
avoid_case_sensitive_path_comparisonfalse positive on route handler methods wherepathis aStringparameter alongside anHttpRequestparameter. The rule now recognizes the route-handler signature and exempts comparisons in that context. No action required. - Added regression coverage for
avoid_case_sensitive_path_comparisonconfirming that the upward directory-walk root check (parent.path == dir.pathwithdir = parent;afterwards, on a realdart:ioDirectory) and!=route comparisons against a local fromreq.uri.pathare not flagged, whileFile(a).path == File(b).pathstill lints. No action required. - Fixed
require_isolate_for_heavyfalse positive onjsonEncode/jsonDecodeof a map or list literal (e.g. a small error-response body in a server handler); literal payloads have fixed small size so no isolate is needed. Non-literal arguments still lint. - Fixed
avoid_unnecessary_nullable_fieldsfalse positive when a constructor initializer can yield null (e.g.cond ? Value() : null, or a??chain ending in a nullable expression); only literalnullwas recognized before. No action required. - Fixed
prefer_cached_getterfalse positive on repeated reads of plaindart:SDK accessors such asHttpRequest.method; lazyIterableandStreamgetters and user-declared getters are still flagged. - Fixed
prefer_utc_for_storagefalse positive on afinalfield that is UTC by construction (Entry(DateTime now) : at = now.toUtc();orfinal at = x.toUtc();); fields set throughthis.ator from non-UTC values still lint. - Fixed
avoid_platform_specific_importsfalse positive on files reachable only through thedart.library.iobranch of a conditional import or export; the whole io-only subtree is now skipped, while files that the stub/web path can also reach are still reported.
Internal #
- Added "Dart SDK", "Flutter SDK", "Flutter daemons", and "Vibrancy" to
DO_NOT_TRANSLATEinextension/scripts/i18n/dictionaries.py; these proper nouns no longer show as missing translations in every locale. - Added
extension/scripts/i18n/bad_translations.py: detects mechanically defective machine translations (leaked shield sentinels and⁇, prompt echo, wrong script, hallucinated length, placeholder drift, blocklisted domain-term renderings frombad_translations_blocklist.json).generate_locales.pynow auto-prunes flagged cache entries on every run so they are re-translated;--checkexits 1 on any flagged shipped string and--purgeclears the cache on demand. - Fixed
mt_fallback._SHIELD_RESIDUE_REmissing bareZZ,_PH<n>_, andПХ<n>shield leaks, so such translations were accepted and cached at write time; they are now rejected before caching, matchingbad_translations.py.bad_translations.py --purgenow backs the cache up tomt_strings.json.bakfirst. - Fixed
generate_locales.pyaborting a locale (and discarding its translations) when Qwen failed on a few pruned short labels: the cache is now saved before the english-regression guard, and a string that falls back to English keeps its existing shipped translation instead of regressing. - Fixed
generate_locales.pyappearing to hang for minutes after a locale's "engines ->" line: the mapping pass re-ran every string the engines had just failed on through Qwen and Google (28 s timeout plus backoff each). The pass is now cache-only (HybridTranslator(cache_only=True)), so failed strings fall straight back to English or their shipped translation. - Qwen translation now runs 2 requests at once (
SAROPA_QWEN_PARALLEL, 1-4, default 2; sets the daemon'sOLLAMA_NUM_PARALLELto match) because a single stream left the GPU 10-30% busy. Each result is keyed to its own source string; progress, checkpoints and Ctrl-C stay on the main thread. SetSAROPA_QWEN_PARALLEL=1for the old serial behavior. Speedup unmeasured. generate_locales.pynow prints a VRAM report before a Qwen run (vram_report.py): used/free MB, the apps holding GPU memory (Windows counter, allocation not residency), and a per-app tip for turning off hardware acceleration in VS Code, Firefox, Chrome, Edge, Discord, Slack and Teams. Report only; best-effort and silent withoutnvidia-smi.- Added
extension/scripts/i18n/coverage_report.py: prints a per-locale translation coverage table and rewrites the marked "Extension language coverage" block inREADME.md.generate_locales.pyrefreshes the block on every coverage write, from the samelocale_coverage.jsonthe language picker uses. - Added
extension/scripts/i18n/semantic_check.py: ranks shipped translations by cross-lingual embedding similarity (local Ollama, defaultbge-m3) to surface meaning drift the mechanical detector cannot see. Report only, no translation performed; precision unmeasured. - CI now runs
extension/scripts/check_l10n_keys.py --check-params, failing when a literall10n()key is missing fromen.jsonor its call-site params do not match the catalog placeholders. Five checker false positives (variable, spread and webview-substituted params) are markedl10n:passthrough. - Added a GitHub Actions workflow that runs saropa_lints on pull requests.
- Added a master switch card (
saropaLints.enabled) to the Health Panel's Diagnostic Engines section; the Scan on Save card dims when it is off, since that is the only engine the setting gates. A folder-level override of the setting is flagged on the card and in a warning after a click. - Eliminated redundant
contextForlookups in the resolved scan path: the analysis context is resolved once per file and passed through, removing 1-2 extra hash-map probes per file in_scanFilesResolvedandrunResolvedWithCollection. - The publish script now writes the known-issues review list to the ignored
reports/folder and prints the queued packages, instead of committing a file tobugs/. - The Qwen translation prompt now includes a short glossary of domain terms (audit, suppress, gate, transitive, hotspot, tier, …) when a string contains them, fixing word-sense mistranslations found in a side-by-side review.
17.2.0 #
Adds a rule that suggests the narrower width and height lookups on MediaQuery, so widgets rebuild only when the dimension they read changes. log
Added #
prefer_media_query_width_height_of: new rule (comprehensive tier, INFO, quick fix) that flagsMediaQuery.sizeOf(context).widthand.height, themaybeSizeOfform, andMediaQuery.of(context).size.width, because the whole screen size is watched when only one dimension is read; it stays silent on Flutter older than 3.35, wherewidthOfandheightOfdo not exist, so no action is required there (#406).
Changed #
- Bug report form is shorter (#404): only the rule name, a summary, a code sample that shows the problem, expected versus actual behavior, and the saropa_lints version are required. Severity, frequency, the rule's source file and the attribution check are optional. The form says that reports without a code sample, or without replies to follow-up questions, may be closed.
- Rule pack lists regenerated: the VS Code extension's pack and tier lists now include every rule.
avoid_reexportsis no longer in the "Migrate from awesome_lints" and "Migrate from DCM" packs, because neither tool has a matching rule; it stays in the architecture pack.
Fixed #
scan --exclude-globsand--include-globsmatch relative to the scanned folder (#405): a pattern such aspackages/**now matchespackages/mypackage/lib/src/x.dartunder the folder being scanned. Before, only**/packages/**worked. Every pattern that worked before still works.scanhonorsanalyzer: exclude:(#403):dart run saropa_lints scannow skips the paths listed underanalyzer: exclude:. It uses the nearestanalysis_options.yamlat or above the scanned folder, with patterns relative to that file's folder, which matches howdart analyzepicks the options file.--find-stale-ignoresand--fix-stale-ignoresskip the same files. Explicit--fileslists are not filtered, same as--exclude-globs. No action required.
17.1.0 #
The 17 line is out of beta: this is the first stable release since the 17.0.1 betas, and it includes all of their changes. It also removes false positives from avoid_hardcoded_colors where colors define the theme rather than bypass it. log
Upgrading from 16.x #
- Requirements: the 17 line needs Dart 3.11 or newer and analyzer 13 or 14. Projects held on analyzer 12 stay on
^16.7.0. - Rule renamed:
deprecated_new_in_comment_referenceis nowdeprecated_new_in_comment_reference_extended. Update any// ignore:comments,ignore_for_filelines andanalysis_options.yamlentries that use the old name. The extension's compatibility card offers to rewrite them for you.
Fixed #
- New-project setup picks a current version (extension): enabling Saropa Lints in a project that does not depend on it yet now writes the newest
saropa_lintsits Dart SDK supports (the same choice the compatibility card makes) instead of the frozen^16.2.1. If the Dart version or the pub.dev list cannot be read, it writes^16.7.0, and it does the same when the pub.dev lookup takes longer than 8 seconds.^16.7.0needs Dart 3.9 or newer. avoid_hardcoded_colors: no longer flags colors written insideColorScheme,TextTheme,*ThemeDataconstructors orThemeExtensionclasses, or a private constant used only there (such as a seed passed toColorScheme.fromSeed), so theme definitions stay clean. No action required.avoid_hardcoded_colors: no longer flags fully transparent colors (Colors.transparent, alpha 0), which look the same in every theme. No action required.
Changed #
- Package Vibrancy known issues: the pricing notes for 11 hosted-service packages (AppsFlyer, CometChat, Datadog, UXCam, Mapbox, RevenueCat, Scanbot, Stream, Superwall, Syncfusion, ZEGOCLOUD) were re-checked against vendor pricing pages and reworded to plain facts. AppsFlyer and CometChat now show as freemium, as both offer a free tier. The AppsFlyer migration notes no longer recommend Firebase Dynamic Links, which Google shut down in 2025. A new optional
reasonVerifiedfield in the known-issues schema records the date a person last checked an entry's reason text; those 11 entries carry it. No action required. - Package Vibrancy known issues: the warnings for flutter_sticky_header, google_api_availability and blinkid_flutter were re-checked and reworded to match their changelogs and repositories (blinkid_flutter's wrapper is open source and only the Microblink SDK needs a license key), with statuses unchanged. No action required.
Internal #
- Known-issues review queue is now a tracked dated file: the publish-time report is written to
bugs/YYYY-MM-DD_known_issues_review_queue.mdon every run (even with zero entries) instead of the gitignoredplans/known_issues_review.md; older dated files are kept. - CI tests the newest analyzer: the analyzer matrix now pins analyzer 14.7.0 (with
analysis_server_plugin0.3.26) for its Dart 3.13 row instead of 14.6.0, so the range users actually get on Dart 3.13 is the one tested. - Known-issues review report skips recently verified paid-package warnings: the publish-time review no longer re-lists business-model (paid/commercial) entries whose human-set
reasonVerifieddate is within the last 183 days, so a warning a person just checked is not flagged again on every release. Tooling-refreshedas_ofdates do not count. - Known-issues review report skips entries verified since the latest release: any entry (every tier) whose human-set
reasonVerifieddate is on or after the package's latest pub.dev release date is no longer re-listed; a newer release brings it back. The publish step and generator write no review file when nothing needs review. - CI never changes dependency versions: jobs now run on the Dart SDK the lockfile requires, fail if installing dependencies would change the lockfile, and the formatting bot can only commit source and test files, so it can no longer push a downgraded analyzer to a pull request.
Historical Changelog Archive #
Looking for older changes? See CHANGELOG_ARCHIVE.md for older versions.