Skip to content

Commit 2352521

Browse files
committed
New internal/debug tag to filter for multiple-license packages.
1 parent fe2dee1 commit 2352521

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

app/lib/scorecard/models.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ class PanaReport {
126126
final reportStatus = summary == null
127127
? ReportStatus.aborted
128128
: ReportStatus.success;
129+
final licenses = summary?.result?.licenses;
129130
return PanaReport(
130131
timestamp: summary?.createdAt,
131132
panaRuntimeInfo: summary?.runtimeInfo,
@@ -137,10 +138,11 @@ class PanaReport {
137138
PackageVersionTags.isDart3Incompatible,
138139
if (packageStatus.isObsolete) PackageVersionTags.isObsolete,
139140
if (packageStatus.isDiscontinued) PackageTags.isDiscontinued,
141+
if (licenses != null && licenses.length > 1)
142+
PackageTags.hasMultipleLicenses,
140143
}.toList(),
141144
allDependencies: summary?.allDependencies,
142-
// ignore: deprecated_member_use
143-
licenses: summary?.result?.licenses,
145+
licenses: licenses,
144146
report: summary?.report,
145147
result: summary?.result,
146148
urlProblems: summary?.urlProblems,

pkg/_pub_shared/lib/search/tags.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ abstract class PackageTags {
4545

4646
/// The `publisher:<publisherId>` tag.
4747
static String publisherTag(String publisherId) => 'publisher:$publisherId';
48+
49+
/// Package has more than one detected license.
50+
static const String hasMultipleLicenses = 'has:multiple-licenses';
4851
}
4952

5053
/// Collection of version-related tags.

0 commit comments

Comments
 (0)