From 31e171846da785dcd526a0d5df35285ffd293c37 Mon Sep 17 00:00:00 2001 From: Chris Bracken Date: Thu, 20 Dec 2018 12:31:26 -0800 Subject: [PATCH] [License] Enable flutter_style_todos lint --- engine/src/flutter/tools/licenses/analysis_options.yaml | 1 + engine/src/flutter/tools/licenses/lib/filesystem.dart | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/engine/src/flutter/tools/licenses/analysis_options.yaml b/engine/src/flutter/tools/licenses/analysis_options.yaml index 20c0737b24..aefe3c993b 100644 --- a/engine/src/flutter/tools/licenses/analysis_options.yaml +++ b/engine/src/flutter/tools/licenses/analysis_options.yaml @@ -39,6 +39,7 @@ linter: - constant_identifier_names - control_flow_in_finally - empty_constructor_bodies + - flutter_style_todos - implementation_imports - library_names - library_prefixes diff --git a/engine/src/flutter/tools/licenses/lib/filesystem.dart b/engine/src/flutter/tools/licenses/lib/filesystem.dart index 07dfd0a456..cf1cddbb31 100644 --- a/engine/src/flutter/tools/licenses/lib/filesystem.dart +++ b/engine/src/flutter/tools/licenses/lib/filesystem.dart @@ -275,8 +275,10 @@ FileType identifyFile(String name, Reader reader) { return FileType.binary; // GIF89a if (matchesSignature(bytes, [0x64, 0x65, 0x78, 0x0A, 0x30, 0x33, 0x35, 0x00])) return FileType.binary; // Dalvik Executable - if (matchesSignature(bytes, [0x21, 0x3C, 0x61, 0x72, 0x63, 0x68, 0x3E, 0x0A])) - return FileType.binary; // Unix archiver (ar) // TODO(ianh): implement .ar parser + if (matchesSignature(bytes, [0x21, 0x3C, 0x61, 0x72, 0x63, 0x68, 0x3E, 0x0A])) { + // TODO(ianh): implement .ar parser, https://github.com/flutter/flutter/issues/25633 + return FileType.binary; // Unix archiver (ar) + } if (matchesSignature(bytes, [0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0a])) return FileType.binary; // PNG if (matchesSignature(bytes, [0x58, 0x50, 0x43, 0x4f, 0x4d, 0x0a, 0x54, 0x79, 0x70, 0x65, 0x4c, 0x69, 0x62, 0x0d, 0x0a, 0x1a]))