pubspec_doctor 0.5.0 copy "pubspec_doctor: ^0.5.0" to clipboard
pubspec_doctor: ^0.5.0 copied to clipboard

CLI that audits pubspec.yaml dependencies: finds unused packages and flags discontinued or stale ones using the pub.dev API.

example/main.dart

import 'dart:io';

import 'package:pubspec_doctor/pubspec_doctor.dart';

/// Programmatic usage. Most people want the CLI instead:
///
/// ```sh
/// dart pub global activate pubspec_doctor
/// pubspec_doctor --fail-on-stale
/// ```
Future<void> main() async {
  final report = await Doctor().diagnose(
    Directory.current,
    DoctorOptions(staleDays: 365),
  );

  print(report.toConsole());

  if (report.hasProblems(failOnStale: false)) {
    exitCode = 1;
  }
}
3
likes
0
points
799
downloads

Publisher

unverified uploader

Weekly Downloads

CLI that audits pubspec.yaml dependencies: finds unused packages and flags discontinued or stale ones using the pub.dev API.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

args, http, pub_semver, yaml

More

Packages that depend on pubspec_doctor