Skip to content

Warn on duplicate doc import lines? #64275

Open

Description

@navaronbracke

It seems that duplicate doc imports are not underlined with a warning?

I.e. do the following on Dartpad (which correctly shows a warning for invalid doc imports like "foo.dart")

/// @docImport 'dart:ui';
/// @docImport 'dart:ui'; // I expect a lint here but I get none
library;

void main() {}

Dart SDK 3.14.0-180.0.dev

cc @FMorschel

Activity

  1. added
    area-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.
    on Sep 13, 2026
  2. FMorschel commented on Sep 13, 2026

    @FMorschel
    Contributor

    Yeah, we currently are missing many diagnostics regarding to them. We don't even have anything about the unused ones or anything:

    I think I can probably start looking into this again now. Thanks!

    CC @bwilkerson @srawlins

  3. added
    P3A lower priority bug or feature request
    devexp-warningIssues with the analyzer's Warning codes
    type-enhancementA request for a change that isn't a bug
    on Sep 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3A lower priority bug or feature requestarea-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.devexp-warningIssues with the analyzer's Warning codestype-enhancementA request for a change that isn't a bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions