提交 48be433c 编写于 作者: C Chris Bracken

[License] Enable prefer_is_empty lint

上级 bd648bad
......@@ -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]))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册