Skip to content

Commit

Permalink
Better documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasfj committed Mar 6, 2024
1 parent bff6b71 commit d5d7432
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions test/crash_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -92,18 +92,6 @@ void main() async {
archiveUrl: entry['archive_url'] as String,
));
}

// To analyze all package versions use the following lines.
// beware that this extremely, and probably scans that same files
// many times for no good reason.
/*packageVersions.addAll(
((response['versions'] ?? <dynamic>[]) as List)
.map((entry) => PackageVersion(
package: package,
version: entry['version'] as String,
archiveUrl: entry['archive_url'] as String,
)),
);*/
count++;
status(
() => 'Listed versions for $count / ${packages.length} packages',
Expand Down Expand Up @@ -140,7 +128,7 @@ void main() async {
archive,
);

// If tar decoding fails
// If tar decoding fails.
if (result == null) {
skipped++;
return;
Expand Down Expand Up @@ -185,6 +173,14 @@ class PackageVersion {
});
}

/// Scans [gzippedArchive] for markdown files and tries to parse them all.
///
/// Creates a list of issues that arose when parsing markdown files. The
/// [package] and [version] strings are used to construct nice issues.
/// An issue string may be multi-line, but should be printable.
///
/// Returns a list of issues, or `null` if decoding and parsing [gzippedArchive]
/// failed.
Future<List<String>?> _findMarkdownIssues(
String package,
String version,
Expand Down Expand Up @@ -225,6 +221,6 @@ Future<List<String>?> _findMarkdownIssues(
return null;
}
}).timeout(const Duration(minutes: 2), onTimeout: () {
return ['package:$package-$version failed to be processed in 30s'];
return ['package:$package-$version failed to be processed in 2 minutes'];
});
}

0 comments on commit d5d7432

Please sign in to comment.