Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 10a3ab0

Browse files
authored
Fix missing return lint (#9246)
A recent Dart roll improved the detection of missing return statements. Since we enforce that all enum values must be covered in switch statements, this isn't an issue, but we add a return to fix the lint.
1 parent 4d68474 commit 10a3ab0

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

ci/licenses_golden/tool_signature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Signature: ad6590b867473860a1e6b08bf9e98667
1+
Signature: 5b10e36374c7d600de6c632fde955f7d
22

tools/licenses/lib/licenses.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ abstract class License implements Comparable<License> {
176176
if (!reformatted)
177177
body = _reformat(body);
178178
final License result = _registry.putIfAbsent(body, () {
179+
assert(type != null);
179180
switch (type) {
180181
case LicenseType.bsd:
181182
case LicenseType.mit:
@@ -200,6 +201,7 @@ abstract class License implements Comparable<License> {
200201
case LicenseType.libpng:
201202
return BlankLicense._(body, type, origin: origin);
202203
}
204+
return null;
203205
});
204206
assert(result.type == type);
205207
return result;

0 commit comments

Comments
 (0)