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

Commit b8c514f

Browse files
committed
licenses: skip Brotli's binary files
1 parent db561b6 commit b8c514f

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tools/licenses/lib/filesystem.dart

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,17 @@ FileType identifyFile(String name, Reader reader) {
8686
path.split(name).reversed.take(6).toList().reversed.join('/') == 'third_party/angle/src/common/fuchsia_egl/fuchsia_egl_backend.h') { // has bogus but benign "authors" reference, reported to author and legal team
8787
return FileType.binary;
8888
}
89+
if (path.split(name).reversed.take(6).toList().reversed.join('/') == 'flutter/third_party/brotli/c/common/dictionary.bin.br') { // Brotli-compressed Brotli dictionary
90+
return FileType.binary;
91+
}
92+
if (path.split(name).reversed.take(8).toList().reversed.join('/') == 'flutter/third_party/brotli/java/org/brotli/integration/fuzz_data.zip' ||
93+
path.split(name).reversed.take(8).toList().reversed.join('/') == 'flutter/third_party/brotli/java/org/brotli/integration/test_corpus.zip' ||
94+
path.split(name).reversed.take(8).toList().reversed.join('/') == 'flutter/third_party/brotli/java/org/brotli/integration/test_data.zip' ||
95+
path.split(name).reversed.take(5).toList().reversed.join('/') == 'flutter/third_party/brotli/js/test_data.tar') {
96+
// These are test data files that include a lot of binary files. Since they
97+
// are not part of the build, let's skip them.
98+
return FileType.notPartOfBuild;
99+
}
89100
final String base = path.basename(name);
90101
if (base.startsWith('._')) {
91102
bytes ??= reader();

0 commit comments

Comments
 (0)