Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate a few public API method and field. #1382

Merged
merged 1 commit into from
Jul 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/src/model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ class Report {
abstract class ReportSectionId {
static const analysis = 'analysis';
static const convention = 'convention';
@Deprecated('The value will be removed.')
static const dart3Compatibility = 'dart3-compatibility';
static const dependency = 'dependency';
static const documentation = 'documentation';
Expand All @@ -257,6 +258,7 @@ enum ReportStatus {
}

/// Returns the lowest of [statuses] to represent them.
@Deprecated('The method will be removed from public API.')
ReportStatus summarizeStatuses(Iterable<ReportStatus> statuses) {
return statuses.fold(ReportStatus.passed, (a, b) => minStatus(a, b)!);
}
Expand All @@ -266,6 +268,7 @@ ReportStatus summarizeStatuses(Iterable<ReportStatus> statuses) {
/// Example: `minStatus(ReportStatus.failed, ReportStatus.partial) == ReportStatus.partial`.
///
/// Returns `null` when any of them is `null` (may be the case with old data).
@Deprecated('The method will be removed from public API.')
ReportStatus? minStatus(ReportStatus? a, ReportStatus? b) {
if (a == null || b == null) return null;
return ReportStatus.values[min(a.index, b.index)];
Expand Down