mirror of
https://github.com/encounter/engine.git
synced 2026-03-30 11:09:55 -07:00
[License] Enable prefer_is_empty lint
This commit is contained in:
@@ -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]))
|
||||
|
||||
Reference in New Issue
Block a user