@@ -26,8 +26,9 @@ Future<void> runExcerpter(final List<String> arguments) async {
2626 final excludePaths = results[_excludeOption] as List <String >? ?? const [];
2727 final plasterContent = results[_plasterContentOption] as String ? ?? '...' ;
2828 final replaceInstructions = results[_replaceOption] as String ? ;
29- final baseSourcePath =
30- path.absolute (results[_baseSourcePathOption] as String ? ?? path.current);
29+ final baseSourcePath = path.absolute (
30+ results[_baseSourcePathOption] as String ? ?? path.current,
31+ );
3132
3233 if (results.rest.length != 1 ) {
3334 _printUsageAndExit (
@@ -36,12 +37,13 @@ Future<void> runExcerpter(final List<String> arguments) async {
3637 }
3738 final updatePath = path.absolute (results.rest.first);
3839
39- final replaceTransforms = replaceInstructions == null
40- ? const < ReplaceTransform > []
41- : stringToReplaceTransforms (
42- replaceInstructions,
43- (e) => _printUsageAndExit (message: e),
44- );
40+ final replaceTransforms =
41+ replaceInstructions == null
42+ ? const < ReplaceTransform > []
43+ : stringToReplaceTransforms (
44+ replaceInstructions,
45+ (e) => _printUsageAndExit (message: e),
46+ );
4547
4648 final updater = Updater (
4749 baseSourcePath: baseSourcePath,
@@ -68,11 +70,13 @@ Future<void> runExcerpter(final List<String> arguments) async {
6870 print ('' );
6971 }
7072
71- print ('Processed ${result .filesVisited } out of '
72- '${result .totalFilesToVisit } files: '
73- '${result .excerptsNeedingUpdates } out of '
74- '${result .excerptsVisited } excerpts visited '
75- '${result .madeUpdates ? 'were updated' : 'need to be updated' }.' );
73+ print (
74+ 'Processed ${result .filesVisited } out of '
75+ '${result .totalFilesToVisit } files: '
76+ '${result .excerptsNeedingUpdates } out of '
77+ '${result .excerptsVisited } excerpts visited '
78+ '${result .madeUpdates ? 'were updated' : 'need to be updated' }.' ,
79+ );
7680
7781 if (result.errors.length case final amountOfErrors when amountOfErrors > 0 ) {
7882 io.exitCode = amountOfErrors;
@@ -81,38 +85,44 @@ Future<void> runExcerpter(final List<String> arguments) async {
8185 }
8286}
8387
84- final _argParser = ArgParser ()
85- ..addFlag (
86- _dryRunFlag,
87- negatable: false ,
88- help: 'If the updater should only report if excerpts need to be updated.' ,
89- )
90- ..addFlag (
91- _failOnUpdateFlag,
92- negatable: false ,
93- help:
94- 'Report a non-zero exit code if an excerpt is or needs to be updated.' ,
95- )
96- ..addMultiOption (
97- _excludeOption,
98- help: 'Regular expressions of paths to exclude when '
99- 'processing a directory recursively.\n '
100- 'Dot files and directories are always excluded.' ,
101- )
102- ..addOption (
103- _baseSourcePathOption,
104- help: 'The path to the directory containing the source files that '
105- 'excerpt regions should be retrieved from.' ,
106- )
107- ..addOption (
108- _plasterContentOption,
109- help: 'The default plaster content, such as "..." or "···".' ,
110- )
111- ..addOption (
112- _replaceOption,
113- help: 'A replacement to run on every excerpt.\n '
114- 'Refer to the package docs for syntax help.' ,
115- );
88+ final _argParser =
89+ ArgParser ()
90+ ..addFlag (
91+ _dryRunFlag,
92+ negatable: false ,
93+ help:
94+ 'If the updater should only report if excerpts need to be updated.' ,
95+ )
96+ ..addFlag (
97+ _failOnUpdateFlag,
98+ negatable: false ,
99+ help:
100+ 'Report a non-zero exit code if '
101+ 'an excerpt is or needs to be updated.' ,
102+ )
103+ ..addMultiOption (
104+ _excludeOption,
105+ help:
106+ 'Regular expressions of paths to exclude when '
107+ 'processing a directory recursively.\n '
108+ 'Dot files and directories are always excluded.' ,
109+ )
110+ ..addOption (
111+ _baseSourcePathOption,
112+ help:
113+ 'The path to the directory containing the source files that '
114+ 'excerpt regions should be retrieved from.' ,
115+ )
116+ ..addOption (
117+ _plasterContentOption,
118+ help: 'The default plaster content, such as "..." or "···".' ,
119+ )
120+ ..addOption (
121+ _replaceOption,
122+ help:
123+ 'A replacement to run on every excerpt.\n '
124+ 'Refer to the package docs for syntax help.' ,
125+ );
116126
117127/// Print the usage information for this command,
118128/// optionally with the specified error [message] and [exitCode] ,
0 commit comments