Skip to content

style: resolve analyzer issues across all packages#252

Open
spydon wants to merge 5 commits into
corbado:mainfrom
spydon:chore/fix-analysis-issues
Open

style: resolve analyzer issues across all packages#252
spydon wants to merge 5 commits into
corbado:mainfrom
spydon:chore/fix-analysis-issues

Conversation

@spydon

@spydon spydon commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

What

Brings melos run analyze (dart analyze --fatal-infos) to zero issues for every package except corbado_auth_firebase (see below).

  • Auto-fixes: ran dart fix --apply for the mechanically-fixable lints (annotate_overrides, prefer_const_constructors, use_super_parameters, unused_import, directives_ordering, etc.).
  • Docs: added concise /// doc comments for ~545 public_member_api_docs violations across the packages.
  • Safe fixes: removed unused imports/elements, printdebugPrint, added context.mounted guards (use_build_context_synchronously), explicit type arguments (inference_failure_*), StringBuffer usage, @deprecated@Deprecated('...'), etc.
  • Generated code excluded from analysis: added analyzer: exclude: ['**/*.g.dart'] to the analysis options, and suppressed the few lints in the vendored telemetry_api_client.

API-breaking lints are suppressed, not "fixed"

Some lints can only be resolved by changing public APIs (renaming public constants/files, changing method signatures, replacing public static factory methods). Per the decision to avoid breaking changes, these are silenced with targeted // ignore_for_file: / // ignore: directives rather than altered: constant_identifier_names, non_constant_identifier_names, file_names, avoid_positional_boolean_parameters, prefer_constructors_over_static_methods, library_private_types_in_public_api, use_setters_to_change_properties. No public identifier, file name, or signature was changed.

Out of scope

corbado_auth_firebase is not included — it currently does not compile (pre-existing undefined_getter), so its lints can't be validated. It will be fixed in a separate follow-up PR.

Verification

  • melos run analyze reports 0 issues for all packages except corbado_auth_firebase.
  • melos run format:check passes (435 files, 0 changed).

Merge order

Stacked on #251#250. Merge those first; this diff then reduces to just the analyzer fixes.

spydon added 5 commits June 29, 2026 10:06
The json_serializable / json_annotation versions used need Dart 3.8.0.
Constraints are left as-is so consumers on Dart 3.8.0 still resolve the
3.8-compatible json versions rather than being forced to 3.9.0.
Add doc comments for public members, suppress API-breaking lints via
ignore directives without changing public APIs, and apply safe local
fixes. Generated files and corbado_auth_firebase (broken, separate PR)
are out of scope.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant