Skip to content

Commit

Permalink
Deprecate a few public API method and field. (#1382)
Browse files Browse the repository at this point in the history
  • Loading branch information
isoos authored Jul 1, 2024
1 parent 8649259 commit 1d769a9
Showing 1 changed file with 3 additions and 0 deletions.
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

0 comments on commit 1d769a9

Please sign in to comment.