mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
[License] Enable prefer_is_empty lint
This commit is contained in:
parent
bd648bad6e
commit
48be433ce2
@ -55,6 +55,7 @@ linter:
|
||||
- prefer_final_fields
|
||||
- prefer_final_locals
|
||||
- prefer_initializing_formals
|
||||
- prefer_is_empty
|
||||
- prefer_is_not_empty
|
||||
- prefer_single_quotes
|
||||
- prefer_void_to_null
|
||||
|
||||
@ -230,7 +230,7 @@ FileType identifyFile(String name, Reader reader) {
|
||||
return FileType.binary;
|
||||
}
|
||||
bytes ??= reader();
|
||||
assert(bytes.length > 0);
|
||||
assert(bytes.isNotEmpty);
|
||||
if (matchesSignature(bytes, <int>[0x1F, 0x8B]))
|
||||
return FileType.gz; // GZip archive
|
||||
if (matchesSignature(bytes, <int>[0x42, 0x5A]))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user