Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ci/licenses_golden/tool_signature
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Signature: acd8a02ea76b205ea2dbea4c91961320
Signature: c3d53eebec5b6c8992029095408c2d8c

2 changes: 1 addition & 1 deletion tools/licenses/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ linter:
- avoid_init_to_null
# - avoid_js_rounded_ints # only useful when targeting JS runtime
- avoid_null_checks_in_equality_operators
# - avoid_positional_boolean_parameters # not yet tested
- avoid_positional_boolean_parameters
# - avoid_private_typedef_functions # we prefer having typedef (discussion in https://github.com/flutter/flutter/pull/16356)
- avoid_relative_lib_imports
- avoid_renaming_method_parameters
Expand Down
8 changes: 5 additions & 3 deletions tools/licenses/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import 'dart:math' as math;
import 'package:args/args.dart';
import 'package:crypto/crypto.dart' as crypto;
import 'package:licenses/patterns.dart';
import 'package:meta/meta.dart';
import 'package:path/path.dart' as path;

import 'filesystem.dart' as fs;
Expand Down Expand Up @@ -1181,13 +1182,13 @@ class _RepositoryDirectory extends _RepositoryEntry implements LicenseSource {
final List<License> licenses = file.licenses;
assert(licenses != null && licenses.isNotEmpty);
result.addAll(licenses);
progress.advance(true);
progress.advance(success: true);
} catch (e, stack) {
system.stderr.writeln('error searching for copyright in: ${file.io}\n$e');
if (e is! String)
system.stderr.writeln(stack);
system.stderr.writeln('\n');
progress.advance(false);
progress.advance(success: false);
}
}
}
Expand Down Expand Up @@ -2137,7 +2138,8 @@ class _Progress {
update();
}
}
void advance(bool success) {
void advance({@required bool success}) {
assert(success != null);
if (success)
_withLicense += 1;
else
Expand Down