Describe the issue
It seems like directives_ordering only complains when my dart: imports are wrong, not any other imports.
To Reproduce
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import 'package:cloud_firestore/cloud_firestore.dart' show DocumentSnapshot, Firestore;
import 'package:foo/lib/call_manager.dart' show CallManager;
import 'package:foo/lib/authentication.dart' show Authentication;
import 'package:foo/lib/theme.dart' show theme;
import 'package:foo/lib/messaging.dart' show Messaging;
import 'package:foo/globals.dart' show navigatorKey;
import 'package:foo/logged_in_user.dart' show LoggedInUser;
import 'package:foo/pages/landing.dart' show LandingPage;
import 'package:foo/jobs_page_routing.dart' show JobsPageRouting;
import 'package:package_info/package_info.dart';
import 'package:foo/app_blocker.dart' show platformId;
import 'package:pub_semver/pub_semver.dart';
import 'package:foo/lib/router.dart' show Router;
import 'package:url_launcher/url_launcher.dart' as UrlLauncher;
鈽濓笍 this code doesn't error even though I've grouped the imports wrong, and have them in the wrong sort order inside the larger group.
Expected behavior
I expected it to only accept this order:
import 'dart:io';
import 'package:cloud_firestore/cloud_firestore.dart' show DocumentSnapshot, Firestore;
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:package_info/package_info.dart';
import 'package:pub_semver/pub_semver.dart';
import 'package:url_launcher/url_launcher.dart' as UrlLauncher;
import 'package:foo/app_blocker.dart' show platformId;
import 'package:foo/globals.dart' show navigatorKey;
import 'package:foo/jobs_page_routing.dart' show JobsPageRouting;
import 'package:foo/lib/authentication.dart' show Authentication;
import 'package:foo/lib/call_manager.dart' show CallManager;
import 'package:foo/lib/messaging.dart' show Messaging;
import 'package:foo/lib/router.dart' show Router;
import 'package:foo/lib/theme.dart' show theme;
import 'package:foo/logged_in_user.dart' show LoggedInUser;
import 'package:foo/pages/landing.dart' show LandingPage;
Additional context
package:foo is the Flutter app I'm currently working on, thus those imports should be by themselves.
analysis_options.yml:
include: package:flutter/analysis_options_user.yaml
linter:
rules:
- directives_ordering
- file_names
I can confirm this.
It is not detecting:
It is detecting:
Thanks for taking a look @kuhnroyal. 馃憤
Most helpful comment
I can confirm this.
It is not detecting:
It is detecting: