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