no_duplicate_imports

SeverityQuick FixOptions
Info

Details

DO avoid duplicate imports as they can lead to confusion.

Bad
import 'dart:math' as math show max;
import 'dart:math';

final a = math.max(1, 10);
final b = min(1, 10);
Good
import 'dart:math' as math show max, min;

final a = math.max(1, 10);
final b = math.min(1, 10);

Usage

To enable the no_duplicate_imports rule, add no_duplicate_imports under plugins > pyramid_lint > diagnostics in your analysis_options.yaml file:

plugins:
  pyramid_lint: <version>
    diagnostics:
      no_duplicate_imports: true