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

Audit pubspec.yaml dependencies and assets: unused, discontinued and stale packages, wrong sections, leftover overrides, missing assets. Built for CI.

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
160
points
799
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Audit pubspec.yaml dependencies and assets: unused, discontinued and stale packages, wrong sections, leftover overrides, missing assets. Built for CI.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

args, http, pub_semver, yaml, yaml_edit

More

Packages that depend on pubspec_doctor