Skip to content

Commit 09d09ba

Browse files
committed
chore: update SPDX licenses
1 parent 06ba551 commit 09d09ba

7 files changed

Lines changed: 44 additions & 47 deletions

File tree

lib/src/cli/flutter_cli.dart

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -83,42 +83,42 @@ class CoverageMetrics {
8383
}
8484
}
8585

86-
return records.fold<CoverageMetrics>(
87-
const CoverageMetrics(),
88-
(current, record) {
89-
final found = record.lines?.found ?? 0;
90-
final hit = record.lines?.hit ?? 0;
91-
if (globs.isNotEmpty && record.file != null) {
92-
for (final glob in globs) {
93-
if (glob.matches(record.file!)) return current;
94-
}
86+
return records.fold<CoverageMetrics>(const CoverageMetrics(), (
87+
current,
88+
record,
89+
) {
90+
final found = record.lines?.found ?? 0;
91+
final hit = record.lines?.hit ?? 0;
92+
if (globs.isNotEmpty && record.file != null) {
93+
for (final glob in globs) {
94+
if (glob.matches(record.file!)) return current;
9595
}
96+
}
9697

97-
final file = record.file;
98-
final details = record.lines?.details;
99-
final uncoveredLines = Map<String, List<int>>.from(
100-
current.uncoveredLines,
101-
);
102-
103-
if (file != null && details != null) {
104-
for (final line in details) {
105-
if ((line.hit ?? 1) == 0 && line.line != null) {
106-
uncoveredLines.update(
107-
file,
108-
(lines) => [...lines, line.line!],
109-
ifAbsent: () => [line.line!],
110-
);
111-
}
98+
final file = record.file;
99+
final details = record.lines?.details;
100+
final uncoveredLines = Map<String, List<int>>.from(
101+
current.uncoveredLines,
102+
);
103+
104+
if (file != null && details != null) {
105+
for (final line in details) {
106+
if ((line.hit ?? 1) == 0 && line.line != null) {
107+
uncoveredLines.update(
108+
file,
109+
(lines) => [...lines, line.line!],
110+
ifAbsent: () => [line.line!],
111+
);
112112
}
113113
}
114+
}
114115

115-
return CoverageMetrics(
116-
totalFound: current.totalFound + found,
117-
totalHits: current.totalHits + hit,
118-
uncoveredLines: uncoveredLines,
119-
);
120-
},
121-
);
116+
return CoverageMetrics(
117+
totalFound: current.totalFound + found,
118+
totalHits: current.totalHits + hit,
119+
uncoveredLines: uncoveredLines,
120+
);
121+
});
122122
}
123123

124124
/// Total number of lines hit (covered) across all included files.

lib/src/cli/test_cli_runner.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ enum CoverageCollectionMode {
2525
imports,
2626

2727
/// Collect coverage from all files in the project.
28-
all
29-
;
28+
all;
3029

3130
/// Parses a string value into a [CoverageCollectionMode].
3231
static CoverageCollectionMode fromString(String value) {

lib/src/commands/packages/commands/check/commands/licenses.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -541,8 +541,7 @@ enum ReporterOutputFormat {
541541
/// List all licenses in a CSV format.
542542
///
543543
/// Example: very_good_cli,MIT
544-
csv
545-
;
544+
csv;
546545

547546
/// Convenience parsing method from user input.
548547
///

lib/src/mcp/mcp_command.dart

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@ import 'package:very_good_cli/src/mcp/mcp_server.dart';
1010

1111
/// Type definition for a factory that creates a [VeryGoodMCPServer].
1212
typedef ServerFactory =
13-
MCPServer Function({
14-
required StreamChannel<String> channel,
15-
});
13+
MCPServer Function({required StreamChannel<String> channel});
1614

1715
/// Factory function to create a [StreamChannel] from input and output streams.
1816
typedef ChannelFactory = StreamChannel<String> Function();
@@ -27,11 +25,9 @@ StreamChannel<String> _defaultChannelFactory() {
2725
/// {@endtemplate}
2826
class MCPCommand extends Command<int> {
2927
/// {@macro mcp_command}
30-
MCPCommand({
31-
ChannelFactory? channelFactory,
32-
ServerFactory? serverFactory,
33-
}) : _channelFactory = channelFactory ?? _defaultChannelFactory,
34-
_serverFactory = serverFactory ?? VeryGoodMCPServer.new;
28+
MCPCommand({ChannelFactory? channelFactory, ServerFactory? serverFactory})
29+
: _channelFactory = channelFactory ?? _defaultChannelFactory,
30+
_serverFactory = serverFactory ?? VeryGoodMCPServer.new;
3531

3632
/// The [name] of the command. But static.
3733
static const String commandName = 'mcp';

lib/src/pub_license/spdx_license.gen.dart

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/src/pubspec_lock/pubspec_lock.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,7 @@ enum PubspecLockPackageDependencyType {
152152
/// See also:
153153
///
154154
/// * [Dart's dependency override documentation](https://dart.dev/tools/pub/dependencies#dependency-overrides)
155-
directOverridden._('direct overridden')
156-
;
155+
directOverridden._('direct overridden');
157156

158157
const PubspecLockPackageDependencyType._(this.value);
159158

tool/spdx_license/test/spdx_license.gen.dart

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)