Skip to content

🧹 Resolve linter warnings and remove ignore comments - #334

Draft
NITISH-R-G wants to merge 1 commit into
mainfrom
fix-linter-warnings-and-ignores-13274632722440842117
Draft

NITISH-R-G wants to merge 1 commit into
mainfrom
fix-linter-warnings-and-ignores-13274632722440842117

Conversation

@NITISH-R-G

@NITISH-R-G NITISH-R-G commented Aug 25, 2026 •

Copy link
Copy Markdown
Owner

🎯 What:

  • Add header: "" to l10n.yaml to prevent // ignore: unused_import generation in localization files.
  • Exclude lib/l10n/** from analysis in analysis_options.yaml to prevent existing warnings in generated code from failing the build.
  • Remove unused _ref fields in family_circle_service.dart and webrtc_voice_call_service.dart while retaining Ref ref in the constructor to maintain call-site contract.
  • Replace // ignore: discarded_futures with unawaited() in first_aid_screen.dart.

💡 Why:

  • To ensure production-grade code quality by resolving unused_field and discarded_futures linter warnings without suppressing them locally with // ignore comments.
  • Modifying auto-generated files (like l10n) manually is an anti-pattern. Properly configuring l10n.yaml and analysis_options.yaml ensures a clean analysis without manual overrides.

✅ Verification:

  • dart analyze passes with no issues.
  • flutter test passes successfully.

✨ Result:

  • A cleaner codebase with zero outstanding linting issues and no inline suppressions.

PR created automatically by Jules for task 13274632722440842117 started by @NITISH-R-G

Summary by Sourcery

Clean up lint warnings and replace local suppressions with appropriate project configuration and code practices.

Enhancements:

  • Resolve unused-field and discarded-future lint warnings without inline ignore directives.
  • Retain service constructor compatibility while removing unused provider references.

Build:

  • Configure localization generation and analysis exclusions to prevent warnings from generated localization code.

- Add `header: ""` to `l10n.yaml` to prevent `// ignore: unused_import` generation
- Exclude `lib/l10n/**` from analysis in `analysis_options.yaml`
- Remove unused `_ref` fields in `family_circle_service.dart` and `webrtc_voice_call_service.dart` while retaining constructor contract
- Replace `// ignore: discarded_futures` with `unawaited()` in `first_aid_screen.dart`

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your trial has ended. Reactivate Greptile to resume code reviews.

@coderabbitai

coderabbitai Bot commented Aug 25, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

Seems you are using me but didn't get OPENAI_API_KEY seted in Variables/Secrets for this repo. you could follow readme for more information

@sourcery-ai

sourcery-ai Bot commented Aug 25, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

This PR removes inline lint suppressions by configuring localization generation and analysis appropriately, eliminating unused service fields while preserving constructor contracts, and explicitly marking a best-effort asynchronous call as unawaited; the stated verification is that dart analyze and flutter test both pass.

Sequence diagram for best-effort first-aid advice loading

sequenceDiagram
    participant FirstAidScreen
    participant FirstAidStore

    FirstAidScreen->>FirstAidStore: getVerifiedAdvice(query)
    FirstAidStore-->>FirstAidScreen: Future advice
    Note over FirstAidScreen: unawaited future continues independently
Loading

File-Level Changes

Change Details Files
Configure generated localization files to avoid generated lint noise without modifying generated output.
  • Add an empty localization file header to stop unused-import ignore comments from being generated.
  • Exclude the localization output directory from analyzer checks.
l10n.yaml
analysis_options.yaml
Remove unused service reference fields while preserving constructor compatibility.
  • Stop storing the injected provider reference in both services.
  • Retain the constructor reference parameter so existing provider call sites remain unchanged.
  • Remove the associated unused-field suppressions.
lib/services/family_circle_service.dart
lib/services/webrtc_voice_call_service.dart
Replace a discarded-future suppression with explicit fire-and-forget semantics.
  • Wrap the best-effort advice refresh in unawaited().
  • Remove the discarded_futures ignore comment.
lib/ui/first_aid_screen.dart

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

This branch had an error being deployed

1 failed deployment
github-pages — 2944ec16 Deployed Aug 25, 2026 by NITISH-R-G via Generate & Deploy Dashboard #363
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