stackchain_analyzer 0.2.1 copy "stackchain_analyzer: ^0.2.1" to clipboard
stackchain_analyzer: ^0.2.1 copied to clipboard

Flutter project health analyzer — architecture, performance, security, dependencies, release readiness, and code quality in one CLI.

example/example.dart

/// Minimal example for StackChain Analyzer.
///
/// Run from the package root:
/// ```sh
/// dart run example/example.dart
/// ```
library;

import 'package:stackchain_analyzer/stackchain_analyzer.dart';

Future<void> main() async {
  final engine = AnalysisEngine(
    registry: AnalyzerRegistry(
      analyzers: [
        ArchitectureAnalyzer(),
        SecurityAnalyzer(),
        QualityAnalyzer(),
        DependencyAnalyzer(checkPubDev: false),
      ],
    ),
  );

  // Point at any Flutter project path.
  const projectPath = 'test/fixtures/sample_flutter';

  try {
    final report = await engine.run(projectPath: projectPath);

    // Human-readable terminal report
    ConsoleReporter(color: false).write(report);

    // Machine-readable JSON (useful for CI dashboards)
    // JsonReporter().write(report);

    // ignore: avoid_print
    print('Overall health: ${report.overallScore}/100');
    // ignore: avoid_print
    print('Issues: ${report.totalIssues}');
  } on StateError catch (e) {
    // ignore: avoid_print
    print(e.message); // "This is not a Flutter project"
  }
}
2
likes
160
points
166
downloads

Documentation

Documentation
API reference

Publisher

verified publisherevenlogix.com

Weekly Downloads

Flutter project health analyzer — architecture, performance, security, dependencies, release readiness, and code quality in one CLI.

Homepage
Repository (GitHub)
View/report issues

Topics

#flutter #analyzer #cli #architecture #dx

License

MIT (license)

Dependencies

analyzer, args, collection, http, meta, path, yaml

More

Packages that depend on stackchain_analyzer