parselyzer 0.1.0 parselyzer: ^0.1.0 copied to clipboard
Parse `dart analyze --format=json` output into Dart objects.
import 'dart:io';
import 'package:parselyzer/parselyzer.dart';
void main() {
final result = Process.runSync('dart', ['analyze', '--format=json']);
final analysis = AnalyzerResult.fromConsole(result.stdout as String);
final issues = analysis?.diagnostics.length ?? 0;
print('Found $issues issues');
}