@@ -22,6 +22,190 @@ package class Formatter {
22
22
}
23
23
24
24
package func format( captureGroup: any CaptureGroup ) -> String ? {
25
- renderer. beautify ( group: captureGroup)
25
+ switch captureGroup {
26
+ case let group as AggregateTargetCaptureGroup :
27
+ return renderer. formatTargetCommand ( command: " Aggregate " , group: group)
28
+ case let group as AnalyzeCaptureGroup :
29
+ return renderer. formatAnalyze ( group: group)
30
+ case let group as AnalyzeTargetCaptureGroup :
31
+ return renderer. formatTargetCommand ( command: " Analyze " , group: group)
32
+ case let group as BuildTargetCaptureGroup :
33
+ return renderer. formatTargetCommand ( command: " Build " , group: group)
34
+ case is CheckDependenciesCaptureGroup :
35
+ return renderer. formatCheckDependencies ( )
36
+ case let group as CheckDependenciesErrorsCaptureGroup :
37
+ return renderer. formatError ( group: group)
38
+ case let group as ClangErrorCaptureGroup :
39
+ return renderer. formatError ( group: group)
40
+ case let group as CleanRemoveCaptureGroup :
41
+ return renderer. formatCleanRemove ( group: group)
42
+ case let group as CleanTargetCaptureGroup :
43
+ return renderer. formatTargetCommand ( command: " Clean " , group: group)
44
+ case let group as CodesignCaptureGroup :
45
+ return renderer. formatCodeSign ( group: group)
46
+ case let group as CodesignFrameworkCaptureGroup :
47
+ return renderer. formatCodeSignFramework ( group: group)
48
+ case let group as CompilationResultCaptureGroup :
49
+ return renderer. formatCompilationResult ( group: group)
50
+ case let group as CompileCaptureGroup :
51
+ return renderer. formatCompile ( group: group)
52
+ case let group as SwiftCompileCaptureGroup :
53
+ return renderer. formatCompile ( group: group)
54
+ case let group as SwiftCompilingCaptureGroup :
55
+ return renderer. formatSwiftCompiling ( group: group)
56
+ case let group as CompileCommandCaptureGroup :
57
+ return renderer. formatCompileCommand ( group: group)
58
+ case let group as CompileErrorCaptureGroup :
59
+ return renderer. formatCompileError ( group: group)
60
+ case let group as CompileStoryboardCaptureGroup :
61
+ return renderer. formatCompile ( group: group)
62
+ case let group as CompileWarningCaptureGroup :
63
+ return renderer. formatCompileWarning ( group: group)
64
+ case let group as CompileXibCaptureGroup :
65
+ return renderer. formatCompile ( group: group)
66
+ case let group as CopyHeaderCaptureGroup :
67
+ return renderer. formatCopy ( group: group)
68
+ case let group as CopyPlistCaptureGroup :
69
+ return renderer. formatCopy ( group: group)
70
+ case let group as CopyStringsCaptureGroup :
71
+ return renderer. formatCopy ( group: group)
72
+ case let group as CpresourceCaptureGroup :
73
+ return renderer. formatCopy ( group: group)
74
+ case let group as CursorCaptureGroup :
75
+ return renderer. formatCursor ( group: group)
76
+ case let group as DuplicateLocalizedStringKeyCaptureGroup :
77
+ return renderer. formatDuplicateLocalizedStringKey ( group: group)
78
+ case let group as ExecutedWithoutSkippedCaptureGroup :
79
+ return renderer. formatExecutedWithoutSkipped ( group: group)
80
+ case let group as ExecutedWithSkippedCaptureGroup :
81
+ return renderer. formatExecutedWithSkipped ( group: group)
82
+ case let group as FailingTestCaptureGroup :
83
+ return renderer. formatFailingTest ( group: group)
84
+ case let group as FatalErrorCaptureGroup :
85
+ return renderer. formatError ( group: group)
86
+ case let group as FileMissingErrorCaptureGroup :
87
+ return renderer. formatFileMissingError ( group: group)
88
+ case let group as GenerateCoverageDataCaptureGroup :
89
+ return renderer. formatGenerateCoverageData ( group: group)
90
+ case let group as GeneratedCoverageReportCaptureGroup :
91
+ return renderer. formatCoverageReport ( group: group)
92
+ case let group as GenerateDSYMCaptureGroup :
93
+ return renderer. formatGenerateDsym ( group: group)
94
+ case let group as GenericWarningCaptureGroup :
95
+ return renderer. formatWarning ( group: group)
96
+ case let group as LDErrorCaptureGroup :
97
+ return renderer. formatError ( group: group)
98
+ case let group as LDWarningCaptureGroup :
99
+ return renderer. formatLdWarning ( group: group)
100
+ case let group as LibtoolCaptureGroup :
101
+ return renderer. formatLibtool ( group: group)
102
+ case let group as LinkerDuplicateSymbolsCaptureGroup :
103
+ return renderer. formatLinkerDuplicateSymbolsError ( group: group)
104
+ case let group as LinkerDuplicateSymbolsLocationCaptureGroup :
105
+ return renderer. formatLinkerDuplicateSymbolsLocation ( group: group)
106
+ case let group as LinkerUndefinedSymbolLocationCaptureGroup :
107
+ return renderer. formatLinkerUndefinedSymbolLocation ( group: group)
108
+ case let group as LinkerUndefinedSymbolsCaptureGroup :
109
+ return renderer. formatLinkerUndefinedSymbolsError ( group: group)
110
+ case let group as LinkingCaptureGroup :
111
+ return renderer. formatLinking ( group: group)
112
+ case let group as ModuleIncludesErrorCaptureGroup :
113
+ return renderer. formatError ( group: group)
114
+ case let group as NoCertificateCaptureGroup :
115
+ return renderer. formatError ( group: group)
116
+ case let group as PackageCheckingOutCaptureGroup :
117
+ return renderer. formatPackageCheckingOut ( group: group)
118
+ case let group as PackageFetchingCaptureGroup :
119
+ return renderer. formatPackageFetching ( group: group)
120
+ case let group as PackageGraphResolvedItemCaptureGroup :
121
+ return renderer. formatPackageItem ( group: group)
122
+ case is PackageGraphResolvingEndedCaptureGroup :
123
+ return renderer. formatPackageEnd ( )
124
+ case is PackageGraphResolvingStartCaptureGroup :
125
+ return renderer. formatPackageStart ( )
126
+ case let group as PackageUpdatingCaptureGroup :
127
+ return renderer. formatPackageUpdating ( group: group)
128
+ case let group as ParallelTestCaseAppKitPassedCaptureGroup :
129
+ return renderer. formatParallelTestCaseAppKitPassed ( group: group)
130
+ case let group as ParallelTestCaseFailedCaptureGroup :
131
+ return renderer. formatParallelTestCaseFailed ( group: group)
132
+ case let group as ParallelTestCasePassedCaptureGroup :
133
+ return renderer. formatParallelTestCasePassed ( group: group)
134
+ case let group as ParallelTestCaseSkippedCaptureGroup :
135
+ return renderer. formatParallelTestCaseSkipped ( group: group)
136
+ case let group as ParallelTestingFailedCaptureGroup :
137
+ return renderer. formatParallelTestingFailed ( group: group)
138
+ case let group as ParallelTestingPassedCaptureGroup :
139
+ return renderer. formatParallelTestingPassed ( group: group)
140
+ case let group as ParallelTestingStartedCaptureGroup :
141
+ return renderer. formatParallelTestingStarted ( group: group)
142
+ case let group as ParallelTestSuiteStartedCaptureGroup :
143
+ return renderer. formatParallelTestSuiteStarted ( group: group)
144
+ case let group as PbxcpCaptureGroup :
145
+ return renderer. formatCopy ( group: group)
146
+ case let group as PhaseScriptExecutionCaptureGroup :
147
+ return renderer. formatPhaseScriptExecution ( group: group)
148
+ case let group as PhaseSuccessCaptureGroup :
149
+ return renderer. formatPhaseSuccess ( group: group)
150
+ case let group as PodsErrorCaptureGroup :
151
+ return renderer. formatError ( group: group)
152
+ case let group as PreprocessCaptureGroup :
153
+ return renderer. formatPreprocess ( group: group)
154
+ case let group as ProcessInfoPlistCaptureGroup :
155
+ return renderer. formatProcessInfoPlist ( group: group)
156
+ case let group as ProcessPchCaptureGroup :
157
+ return renderer. formatProcessPch ( group: group)
158
+ case let group as ProcessPchCommandCaptureGroup :
159
+ return renderer. formatProcessPchCommand ( group: group)
160
+ case let group as ProvisioningProfileRequiredCaptureGroup :
161
+ return renderer. formatError ( group: group)
162
+ case let group as RestartingTestCaptureGroup :
163
+ return renderer. formatRestartingTest ( group: group)
164
+ case let group as ShellCommandCaptureGroup :
165
+ return renderer. formatShellCommand ( group: group)
166
+ case let group as SymbolReferencedFromCaptureGroup :
167
+ return renderer. formatSymbolReferencedFrom ( group: group)
168
+ case let group as TestCaseMeasuredCaptureGroup :
169
+ return renderer. formatTestCaseMeasured ( group: group)
170
+ case let group as TestCasePassedCaptureGroup :
171
+ return renderer. formatTestCasePassed ( group: group)
172
+ case let group as TestCaseSkippedCaptureGroup :
173
+ return renderer. formatTestCaseSkipped ( group: group)
174
+ case let group as TestCasePendingCaptureGroup :
175
+ return renderer. formatTestCasePending ( group: group)
176
+ case let group as TestCaseStartedCaptureGroup :
177
+ return renderer. formatTestCasesStarted ( group: group)
178
+ case let group as TestsRunCompletionCaptureGroup :
179
+ return renderer. formatTestsRunCompletion ( group: group)
180
+ case let group as TestSuiteAllTestsFailedCaptureGroup :
181
+ return renderer. formatTestSuiteAllTestsFailed ( group: group)
182
+ case let group as TestSuiteAllTestsPassedCaptureGroup :
183
+ return renderer. formatTestSuiteAllTestsPassed ( group: group)
184
+ case let group as TestSuiteStartCaptureGroup :
185
+ return renderer. formatTestSuiteStart ( group: group)
186
+ case let group as TestSuiteStartedCaptureGroup :
187
+ return renderer. formatTestSuiteStarted ( group: group)
188
+ case let group as TIFFutilCaptureGroup :
189
+ return renderer. formatTIFFUtil ( group: group)
190
+ case let group as TouchCaptureGroup :
191
+ return renderer. formatTouch ( group: group)
192
+ case let group as UIFailingTestCaptureGroup :
193
+ return renderer. formatUIFailingTest ( group: group)
194
+ case let group as UndefinedSymbolLocationCaptureGroup :
195
+ return renderer. formatUndefinedSymbolLocation ( group: group)
196
+ case let group as WillNotBeCodeSignedCaptureGroup :
197
+ return renderer. formatWillNotBeCodesignWarning ( group: group)
198
+ case let group as WriteAuxiliaryFileCaptureGroup :
199
+ return renderer. formatWriteAuxiliaryFile ( group: group)
200
+ case let group as WriteFileCaptureGroup :
201
+ return renderer. formatWriteFile ( group: group)
202
+ case let group as XcodebuildErrorCaptureGroup :
203
+ return renderer. formatError ( group: group)
204
+ case let group as SwiftDriverJobDiscoveryEmittingModuleCaptureGroup :
205
+ return renderer. formatSwiftDriverJobDiscoveryEmittingModule ( group: group)
206
+ default :
207
+ assertionFailure ( )
208
+ return nil
209
+ }
26
210
}
27
211
}
0 commit comments