INNER CODE UNIT · Dart

includeMatch

VeryGoodOpenSource/very_good_analysis · tool/verify_version/main.dart:43

  final includeMatch = RegExp(
    r'include:\s*package:very_good_analysis/analysis_options\.(\d+\.\d+\.\d+)\.yaml',
  ).firstMatch(analysisContent);

  if (includeMatch == null) {
    stderr.writeln('❌ Could not find version in lib/analysis_options.yaml.');
    exit(1);
  }

  final analysisVersion = includeMatch.group(1)!;

  // Compare versions
  if (pubspecVersion != analysisVersion) {
    stderr.writeln(
      '❌ Version mismatch:\n'
      '- pubspec.yaml version: $pubspecVersion\n'
      '- lib/analysis_options.yaml version: $analysisVersion\n\n'
      'Please update lib/analysis_options.yaml to match pubspec.yaml.',

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…